Function at 0x49d100
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x520e84
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2b0
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov dword [esp + 0x18], ebp
call fcn.0049eab0
xor esi, esi
mov dword [ebp + 0x85c], eax
cmp eax, esi
ja 0x49d13d
xor eax, eax
jmp 0x49d814
mov eax, dword [esp + 0x2d4]
push 1
push eax
mov ecx, ebp
call fcn.0049d010
test eax, eax
je 0x49d814
mov ecx, 0x8b
xor eax, eax
lea edi, [esp + 0x94]
mov dword [esp + 0x90], esi
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x85c]
mov dword [esp + 0x24], esi
cmp eax, esi
jbe 0x49d80f
cmp esi, dword [ebp + 0x850]
je 0x49d7fc
mov ecx, 0x8c
xor eax, eax
lea edi, [esp + 0x90]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x90]
push ecx
push esi
mov ecx, ebp
call fcn.0049eaf0
test byte [esp + 0x29c], 0x10
jne 0x49d7fc
mov dl, byte [esp + 0x17]
push 0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2c], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea eax, [esp + 0x94]
mov dword [esp + 0x2c8], 0
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea ecx, [esp + 0x94]
push eax
push ecx
lea ecx, [esp + 0x30]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
lea edx, [esp + 0x28]
mov ecx, ebp
push edx
call fcn.0049c8e0
lea eax, [esp + 0x28]
lea ecx, [esp + 0x70]
lea ebx, [ebp + 0x860]
push eax
push ecx
mov ecx, ebx
call fcn.0049fb10
mov dl, byte [esp + 0x17]
push 0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3c], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov eax, dword [ebp + 0x864]
mov ecx, dword [esp + 0x70]
cmp ecx, eax
mov byte [esp + 0x2c8], 1
je 0x49d7d1
lea eax, [ecx + 0x1c]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov edx, dword [ecx]
lea ecx, [esp + 0x38]
push edx
push 0
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
push esi
mov ecx, ebp
call fcn.0049ec10
mov esi, eax
xor edi, edi
cmp esi, edi
mov dword [esp + 0x1c], esi
jne 0x49d2ae
push 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0x2cc], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2cc], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov esi, dword [esp + 0x24]
jmp 0x49d7fc
lea eax, [esp + 0x28]
lea ecx, [esp + 0x74]
push eax
push ecx
mov ecx, ebx
call fcn.004a0200
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
lea edx, [esp + 0x50]
mov dword [esp + 0x50], edi
push edx
push eax
push ecx
call fcn.004a0ba0
mov eax, dword [esp + 0x5c]
add esp, 0xc
cmp eax, edi
jle 0x49d75c
cmp eax, 1
jne 0x49d45c
mov edx, dword [esp + 0x2bc]
push edi
push edi
push eax
push esi
push edx
mov ecx, ebp
call fcn.0049dbe0
cmp eax, edi
jne 0x49d343
push esi
call fcn.0051d79a
add esp, 4
lea ecx, [esp + 0x38]
mov byte [esp + 0x2c8], 0
push 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2cc], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov esi, dword [esp + 0x24]
jmp 0x49d7fc
mov ecx, dword [esp + 0x2bc]
push eax
sub esp, 0x10
mov dword [eax + 4], ecx
lea edx, [esp + 0x4c]
mov ecx, esp
mov dword [esp + 0x30], esp
push edx
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__]
lea ecx, [ebp + 0x870]
call fcn.0049df60
mov esi, dword [esp + 0x3c]
cmp esi, edi
jne 0x49d37b
mov esi, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov eax, dword [0x5391a0]
cmp esi, edi
mov dword [esp + 0x10], eax
je 0x49d3be
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x49d3bc
push edi
lea ecx, [esp + 0x14]
call fcn.00405040
test eax, eax
je 0x49d3bc
lea ecx, [edi + edi]
mov edi, dword [esp + 0x10]
mov edx, ecx
mov ebp, dword [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor edi, edi
lea eax, [esp + 0x10]
lea ecx, [esp + 0x60]
push eax
mov byte [esp + 0x2cc], 2
call fcn.00497f40
mov dword [esp + 0x64], edi
lea ecx, [esp + 0x60]
lea edx, [esp + 0x88]
push ecx
mov ecx, dword [esp + 0x2d4]
push edx
mov byte [esp + 0x2d0], 3
call fcn.0049fba0
mov eax, dword [esp + 0x60]
mov edx, dword [0x539120]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x49d428
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x49d428
mov edx, dword [esp + 0x60]
lea eax, [edx - 0xc]
push eax
call fcn.0051d79a
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x539120]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x49d75c
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x49d75c
mov edx, dword [esp + 0x10]
lea eax, [edx - 0xc]
push eax
jmp 0x49d754
lea eax, [esp + 0x28]
lea ecx, [esp + 0x54]
push eax
push ecx
mov ecx, ebx
call fcn.0049fb10
lea edx, [esp + 0x28]
lea eax, [esp + 0x58]
push edx
push eax
mov ecx, ebx
call fcn.004a0200
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], edi
push ecx
push edx
push eax
call fcn.004a0ba0
mov eax, dword [esp + 0x2c]
add esp, 0xc
cmp eax, edi
je 0x49d753
mov ecx, dword [esp + 0x2bc]
inc ecx
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x49d74d
mov edx, dword [esp + 0x2bc]
xor eax, eax
mov edi, ebp
push 0
lea ecx, [edx + 1]
push 0
mov edx, ecx
push 1
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebp
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x2cc]
mov edi, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x2cc]
mov edi, dword [esp + 0x28]
push ecx
mov ecx, edi
call fcn.0049dbe0
mov esi, eax
test esi, esi
je 0x49d73c
mov edx, dword [esp + 0x2bc]
mov dword [esi + 4], edx
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov eax, dword [esp + 0x54]
mov edx, dword [ecx]
add eax, 0x1c
push edx
push 0
push eax
lea ecx, [esp + 0x44]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
push esi
lea eax, [esp + 0x3c]
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x24], esp
push eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__]
lea ecx, [edi + 0x870]
call fcn.0049df60
mov esi, dword [esp + 0x3c]
test esi, esi
jne 0x49d56c
mov esi, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov eax, dword [0x5391a0]
test esi, esi
mov dword [esp + 0x10], eax
je 0x49d5ad
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x49d5a9
push edi
lea ecx, [esp + 0x14]
call fcn.00405040
test eax, eax
je 0x49d5a9
lea ecx, [edi + edi]
mov edi, dword [esp + 0x10]
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 [esp + 0x10]
mov edx, dword [eax - 0xc]
lea ecx, [eax - 0xc]
xor esi, esi
mov byte [esp + 0x2c8], 4
cmp edx, esi
jl 0x49d5ce
push ecx
mov dword [esp + 0x4c], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x49d5e2
mov ecx, dword [0x5391a0]
push eax
mov dword [esp + 0x4c], ecx
lea ecx, [esp + 0x4c]
call fcn.00441a00
mov dword [esp + 0x4c], esi
mov ecx, dword [esp + 0x2d0]
lea edx, [esp + 0x48]
lea eax, [esp + 0x80]
push edx
push eax
mov byte [esp + 0x2d0], 5
call fcn.0049fba0
mov eax, dword [esp + 0x48]
mov edx, dword [0x539120]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x49d636
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x49d636
mov edx, dword [esp + 0x48]
lea eax, [edx - 0xc]
push eax
call fcn.0051d79a
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x539120]
mov byte [esp + 0x2c8], 1
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x49d66d
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x49d66d
mov edx, dword [esp + 0x10]
lea eax, [edx - 0xc]
push eax
call fcn.0051d79a
add esp, 4
lea eax, [esp + 0x28]
mov ecx, ebx
push eax
call fcn.004a08e0
mov ecx, dword [ebx + 4]
mov dword [esp + 0x10], eax
cmp eax, ecx
je 0x49d6a0
add eax, 0xc
lea ecx, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator__class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__]
add esp, 8
test al, al
jne 0x49d6a0
lea eax, [esp + 0x10]
jmp 0x49d6ab
mov eax, dword [ebx + 4]
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x6c]
mov eax, dword [eax]
lea edx, [esp + 0x7c]
push eax
push edx
mov ecx, ebx
call fcn.0049f6b0
lea eax, [esp + 0x28]
mov ecx, ebx
push eax
call fcn.004a08e0
mov ecx, dword [ebx + 4]
mov dword [esp + 0x10], eax
cmp eax, ecx
je 0x49d6ed
add eax, 0xc
lea ecx, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator__class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__]
add esp, 8
test al, al
jne 0x49d6ed
lea eax, [esp + 0x10]
jmp 0x49d6f8
mov eax, dword [ebx + 4]
mov dword [esp + 0x68], eax
lea eax, [esp + 0x68]
mov eax, dword [eax]
lea edx, [esp + 0x28]
mov dword [esp + 0x54], eax
lea eax, [esp + 0x58]
push edx
push eax
mov ecx, ebx
call fcn.004a0200
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], esi
push ecx
push edx
push eax
call fcn.004a0ba0
mov eax, dword [esp + 0x2c]
add esp, 0xc
cmp eax, esi
mov esi, dword [esp + 0x1c]
jne 0x49d4a5
jmp 0x49d74d
test ebp, ebp
je 0x49d749
push ebp
call fcn.0051d79a
add esp, 4
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
xor edi, edi
push esi
call fcn.0051d79a
add esp, 4
mov ecx, dword [esp + 0x3c]
cmp ecx, edi
je 0x49d782
mov al, byte [ecx - 1]
test al, al
je 0x49d776
cmp al, 0xff
je 0x49d776
dec al
mov byte [ecx - 1], al
jmp 0x49d782
lea eax, [ecx - 2]
push eax
call fcn.0051d79a
add esp, 4
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x3c], edi
cmp ecx, edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x2c8], 0xffffffff
je 0x49d7bf
mov al, byte [ecx - 1]
test al, al
je 0x49d7b3
cmp al, 0xff
je 0x49d7b3
dec al
mov byte [ecx - 1], al
jmp 0x49d7bf
add ecx, 0xfffffffe
push ecx
call fcn.0051d79a
add esp, 4
mov esi, dword [esp + 0x24]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
jmp 0x49d7fc
push 1
lea ecx, [esp + 0x3c]
mov byte [esp + 0x2cc], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2cc], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov eax, dword [ebp + 0x85c]
inc esi
cmp esi, eax
mov dword [esp + 0x24], esi
jb 0x49d17f
mov eax, 1
mov ecx, dword [esp + 0x2c0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x2bc
ret 8