Function at 0x1005e5a0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x100905c9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebp
mov ebp, dword [esp + 0x2c]
xor eax, eax
push esi
cmp ebp, eax
push edi
mov dword [esp + 0xc], eax
jne 0x1005e60b
mov esi, dword [esp + 0x30]
mov cl, byte [esp + 0x38]
mov edi, 0x100aba18
mov byte [esi], cl
or ecx, 0xffffffff
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x100aba18
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov eax, esi
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
push ebx
push ebp
call dword [sym.imp.MSVCRT.dll_wcslen]
mov esi, eax
inc esi
lea edi, [esi + esi]
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, edi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 8
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x38], ebx
and ecx, 3
dec esi
test esi, esi
rep stosb byte es:[edi], al
jbe 0x1005e65f
mov ecx, ebx
mov ax, word [ebp]
cmp ax, 0x200e
je 0x1005e659
cmp ax, 0x200f
je 0x1005e659
mov word [ecx], ax
add ecx, 2
add ebp, 2
dec esi
jne 0x1005e643
mov al, byte [esp + 0x3c]
push 0
lea ecx, [esp + 0x18]
mov byte [esp + 0x18], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [esp + 0x3c]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push ecx
mov dword [esp + 0x4c], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
test esi, esi
je 0x1005e725
inc esi
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, esi
mov ebp, eax
mov edx, ecx
xor eax, eax
mov edi, ebp
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
push 0
and ecx, 3
push esi
push ebp
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x4c]
push 0xffffffffffffffff
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x18]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x1005e714
mov edi, dword [esp + 0x18]
mov ecx, ebx
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ebx
mov byte [eax + ebx], 0
test ebp, ebp
je 0x1005e721
push ebp
call fcn.10088e50
add esp, 4
mov ebx, dword [esp + 0x38]
push ebx
call fcn.10088e50
mov esi, dword [esp + 0x1c]
add esp, 4
test esi, esi
jne 0x1005e73c
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ebp, dword [esp + 0x34]
mov cl, byte [esp + 0x3c]
xor eax, eax
mov edi, esi
mov byte [ebp], cl
or ecx, 0xffffffff
mov dword [ebp + 4], eax
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x1005e78a
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov ecx, dword [esp + 0x18]
pop ebx
test ecx, ecx
je 0x1005e7c1
mov al, byte [ecx - 1]
test al, al
je 0x1005e7b7
cmp al, 0xff
je 0x1005e7b7
dec al
pop edi
mov byte [ecx - 1], al
mov eax, ebp
pop esi
pop ebp
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret
dec ecx
push ecx
call fcn.10088e50
add esp, 4
mov ecx, dword [esp + 0x20]
pop edi
mov eax, ebp
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x20
ret