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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x56d898
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
push ebx
push esi
push edi
mov eax, dword [0x660038]
xor eax, esp
push eax
lea eax, [esp + 0xc8]
mov dword fs:[0], eax
mov dword [esp + 0x24], ecx
mov esi, dword [ebp + 0x14]
push esi
lea eax, [esp + 0x30]
push eax
call fcn.00506000
lea ecx, [esp + 0x50]
xor ebx, ebx
push ecx
mov dword [esp + 0xd4], ebx
call fcn.004fd550
push esi
lea ecx, [esp + 0x54]
mov byte [esp + 0xd4], 1
call fcn.00505b10
cmp esi, ebx
jbe 0x502437
xor edi, edi
mov dword [esp + 0x1c], edi
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
mov esi, dword [ebp + 0x10]
movzx ecx, al
push ecx
push esi
lea edx, [esp + 0x94]
push edx
xor ecx, ecx
call fcn.004fafc0
push eax
lea eax, [esp + 0x54]
push eax
mov byte [esp + 0xd8], 2
call fcn.00505c70
add esi, 0x14
mov dword [ebp + 0x10], esi
lea ecx, [esp + 0xa0]
mov byte [esp + 0xd0], 3
call fcn.004d1a40
lea ecx, [esp + 0x8c]
mov byte [esp + 0xd0], 1
call fcn.004d1a40
mov ecx, dword [esp + 0x60]
sub ecx, dword [esp + 0x5c]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ebx, ecx
jb 0x50237f
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edx, dword [esp + 0x5c]
lea esi, [edx + edi]
call fcn.004fb0b0
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x88], esp
push ecx
mov ecx, eax
call fcn.004d7d30
mov byte [esp + 0xec], 5
mov ecx, dword [esp + 0x7c]
sub ecx, dword [esp + 0x78]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x5023d7
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x78]
lea esi, [ecx + edi]
mov ecx, dword [esp + 0x58]
sub ecx, dword [esp + 0x54]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x502401
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x38]
add edx, ecx
mov ecx, dword [esi + 0x28]
dec ecx
mov eax, 1
shl eax, cl
mov byte [esp + 0xec], 1
mov ecx, eax
call fcn.00505760
add dword [esp + 0x1c], 0x18
inc ebx
add edi, 0x38
cmp ebx, dword [ebp + 0x14]
jb 0x5022f7
lea ecx, [esp + 0x70]
push ecx
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x18], 0
call fcn.004d7d30
mov byte [esp + 0xd0], 6
xor ebx, ebx
mov byte [esp + 0x13], 0
cmp dword [ebp + 0x14], ebx
jbe 0x502845
mov ecx, dword [esp + 0x5c]
xor edi, edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov esi, dword [esp + 0x60]
sub esi, ecx
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x502499
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x5c]
cmp byte [ecx + edi + 0x37], 0
jne 0x502618
mov esi, dword [esp + 0x60]
sub esi, ecx
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x5024cb
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x14]
cmp edx, dword [ecx + edi + 0x2c]
jne 0x502618
mov esi, dword [esp + 0x60]
sub esi, ecx
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x502500
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x3c]
lea esi, [ecx + edi]
mov edi, dword [esp + 0x38]
sub edx, edi
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x502530
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x1c]
mov esi, dword [esi + 0x30]
lea edx, [edi + eax + 0xc]
mov edi, dword [edi + eax + 0x10]
sub edi, dword [edx]
mov dword [esp + 0x28], edx
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
shr esi, 1
add eax, edx
cmp esi, eax
jb 0x502568
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
lea edx, [esi*8]
sub edx, esi
mov esi, dword [esp + 0x28]
mov esi, dword [esi]
sub eax, ecx
lea edi, [esi + edx*4]
mov esi, eax
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x5025a3
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x5c]
mov esi, dword [esp + 0x18]
cmp byte [ecx + esi + 0x35], 0
mov ecx, dword [esp + 0x24]
je 0x5025d3
mov eax, dword [ecx]
lea edx, [esp + 0x70]
mov dword [esp + 0x28], eax
mov eax, dword [eax + 0x10]
push edx
call eax
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
push eax
mov eax, dword [edx + 0x20]
push edi
call eax
jmp 0x5025e0
mov edx, dword [ecx]
mov edx, dword [edx + 0x20]
lea eax, [esp + 0x70]
push eax
push edi
call edx
mov ecx, dword [esp + 0x60]
sub ecx, dword [esp + 0x5c]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x502605
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x5c]
add esi, ecx
call fcn.004fb0b0
mov ecx, dword [esp + 0x5c]
mov edi, dword [esp + 0x18]
cmp byte [esp + 0x13], 0
jne 0x502652
mov esi, dword [esp + 0x60]
sub esi, ecx
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x502646
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x5c]
cmp byte [ecx + edi + 0x37], 0
mov byte [esp + 0x13], 0
jne 0x502657
mov byte [esp + 0x13], 1
add dword [esp + 0x1c], 0x18
inc ebx
add edi, 0x38
mov dword [esp + 0x18], edi
cmp ebx, dword [ebp + 0x14]
jb 0x502472
cmp byte [esp + 0x13], 0
je 0x502845
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
lea eax, [esp + 0x70]
push eax
call edx
mov ecx, dword [esp + 0x7c]
mov esi, eax
mov al, byte [esi]
mov byte [esp + 0x70], al
mov ebx, dword [esi + 8]
mov eax, dword [esp + 0x78]
mov dword [esp + 0x20], esi
mov edi, ecx
cmp eax, ebx
je 0x50271d
lea edx, [eax*4]
push edx
push 0
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
push edi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push ebx
call fcn.004d9000
add esp, 4
test ebx, ebx
jne 0x5026d3
xor eax, eax
jmp 0x50271b
lea edi, [ebx*4]
push edi
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
jne 0x502717
push 0
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
mov esi, eax
add esp, 4
test esi, esi
je 0x5027f5
push esi
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
add esp, 4
call esi
push edi
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
je 0x5026e8
mov esi, dword [esp + 0x20]
mov ecx, eax
lea eax, [ebx*4]
push eax
mov dword [esp + 0x80], ecx
mov dword [esp + 0x7c], ebx
mov edx, dword [esi + 0xc]
push edx
push eax
push ecx
call dword [sym.imp.MSVCR90.dll_memcpy_s]
mov ebx, dword [esi + 0x14]
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x98]
add esp, 0x10
mov edi, ecx
cmp eax, ebx
je 0x5027c7
add eax, eax
add eax, eax
push eax
push 0
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
push edi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push ebx
call fcn.004d9000
add esp, 4
test ebx, ebx
jne 0x502781
xor eax, eax
jmp 0x5027c5
lea edi, [ebx*4]
push edi
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
jne 0x5027c1
push 0
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
mov esi, eax
add esp, 4
test esi, esi
je 0x50281d
push esi
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
add esp, 4
call esi
push edi
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
je 0x502796
mov esi, dword [esp + 0x20]
mov ecx, eax
lea eax, [ebx*4]
push eax
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x88], ebx
mov edx, dword [esi + 0x18]
push edx
push eax
push ecx
call dword [sym.imp.MSVCR90.dll_memcpy_s]
add esp, 0x10
inc dword [esp + 0x14]
jmp 0x502454
push 1
push 0x660e74
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCR90.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const___int_]
push 0x63624c
lea eax, [esp + 0x48]
push eax
mov dword [esp + 0x4c], vtable.std::bad_alloc.0
call sub.MSVCR90.dll__CxxThrowException
push 1
push 0x660e74
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCR90.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const___int_]
push 0x63624c
lea ecx, [esp + 0x48]
push ecx
mov dword [esp + 0x4c], vtable.std::bad_alloc.0
call sub.MSVCR90.dll__CxxThrowException
xor eax, eax
mov dword [esp + 0x14], eax
cmp dword [ebp + 0x14], eax
jbe 0x502f53
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 8]
mov ebx, eax
add eax, 0x1c
mov dword [ebp + 8], eax
mov edx, esi
sub edx, ecx
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x28], ebx
cmp dword [esp + 0x14], eax
jb 0x502898
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
mov edi, dword [eax + ecx + 0x10]
sub edi, dword [eax + ecx + 0xc]
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov edi, edx
shr edi, 0x1f
add edi, edx
sub esi, ecx
mov eax, 0x2aaaaaab
imul esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x5028da
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
lea esi, [eax + ecx + 0xc]
mov ecx, dword [eax + ecx + 0x10]
sub ecx, dword [esi]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
dec edi
add ecx, edx
cmp edi, ecx
jb 0x502906
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [esi]
lea edx, [edi*8]
sub edx, edi
mov cl, byte [eax + edx*4]
lea eax, [eax + edx*4]
mov byte [ebx], cl
mov edi, dword [eax + 8]
mov esi, dword [ebx + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 8]
cmp eax, edi
jne 0x50292e
mov eax, esi
jmp 0x5029a7
lea edx, [eax*4]
push edx
push 0
push esi
call sub.MSVCR90.dll_memset
add esp, 0xc
push esi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push edi
call fcn.004d9000
add esp, 4
test edi, edi
jne 0x50295c
xor eax, eax
jmp 0x5029a7
lea eax, [edi*4]
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
jne 0x5029a7
push 0
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
mov esi, eax
add esp, 4
test esi, esi
je 0x502fa4
push esi
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
add esp, 4
call esi
lea eax, [edi*4]
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
je 0x502971
mov esi, dword [esp + 0x20]
mov dword [ebx + 8], edi
add edi, edi
add edi, edi
mov dword [ebx + 0xc], eax
mov ecx, dword [esi + 0xc]
push edi
push ecx
push edi
push eax
call dword [sym.imp.MSVCR90.dll_memcpy_s]
mov esi, dword [esi + 0x14]
mov eax, dword [ebx + 0x14]
mov edi, dword [ebx + 0x18]
add esp, 0x10
cmp eax, esi
jne 0x5029d9
mov eax, edi
jmp 0x502a56
lea edx, [eax*4]
push edx
push 0
push edi
call sub.MSVCR90.dll_memset
add esp, 0xc
push edi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push esi
call fcn.004d9000
add esp, 4
test esi, esi
jne 0x502a07
xor eax, eax
jmp 0x502a56
lea eax, [esi*4]
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
jne 0x502a56
lea esp, [esp]
push 0
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
mov edi, eax
add esp, 4
test edi, edi
je 0x502fcc
push edi
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
add esp, 4
call edi
lea eax, [esi*4]
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
je 0x502a20
mov ecx, dword [esp + 0x20]
mov dword [ebx + 0x14], esi
add esi, esi
add esi, esi
mov dword [ebx + 0x18], eax
mov edx, dword [ecx + 0x18]
push esi
push edx
push esi
push eax
call dword [sym.imp.MSVCR90.dll_memcpy_s]
mov esi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
mov edx, esi
sub edx, ecx
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
add esp, 0x10
cmp dword [esp + 0x14], eax
jb 0x502aa5
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x18]
mov edi, dword [ebx + ecx + 0x10]
sub edi, dword [ebx + ecx + 0xc]
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
jbe 0x502f3a
mov edx, esi
sub edx, ecx
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x502af6
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov edi, dword [ebx + ecx + 0x10]
sub edi, dword [ebx + ecx + 0xc]
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
lea edx, [edx + eax - 2]
cmp edx, 1
mov dword [esp + 0x1c], edx
jl 0x502c9f
lea eax, [edx*8]
sub eax, edx
add eax, eax
add eax, eax
inc edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x68], edx
mov edx, esi
sub edx, ecx
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x502b5f
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
mov edi, dword [eax + ecx + 0x10]
sub edi, dword [eax + ecx + 0xc]
lea ebx, [eax + ecx + 0xc]
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x68], eax
jb 0x502b96
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov edx, dword [ebx]
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x14]
lea eax, [edi + edx + 0x1c]
mov dword [esp + 0x6c], eax
sub esi, ecx
mov eax, 0x2aaaaaab
imul esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x502bc9
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
lea esi, [eax + ecx + 0xc]
mov ecx, dword [eax + ecx + 0x10]
sub ecx, dword [esi]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp dword [esp + 0x1c], ecx
jb 0x502bf6
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov edx, dword [edx + 0x20]
push eax
mov eax, dword [esi]
add eax, edi
push eax
call edx
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x502c34
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + esi + 0x10]
sub ecx, dword [eax + esi + 0xc]
lea edi, [eax + esi + 0xc]
mov esi, dword [esp + 0x1c]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp esi, ecx
jb 0x502c65
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [edi]
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov edx, dword [edx + 0x20]
add eax, edi
push eax
mov eax, dword [esp + 0x2c]
push eax
call edx
dec dword [esp + 0x68]
mov ecx, dword [esp + 0x38]
dec esi
sub edi, 0x1c
mov dword [esp + 0x1c], esi
cmp esi, 1
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x20], edi
jge 0x502b36
mov edx, esi
sub edx, ecx
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x502cc8
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
mov edi, dword [eax + ecx + 0x10]
sub edi, dword [eax + ecx + 0xc]
lea ebx, [eax + ecx + 0xc]
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
ja 0x502cfe
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov ebx, dword [ebx]
sub esi, ecx
mov eax, 0x2aaaaaab
imul esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
add ebx, 0x1c
cmp dword [esp + 0x14], eax
jb 0x502d26
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
lea esi, [eax + ecx + 0xc]
mov ecx, dword [eax + ecx + 0x10]
sub ecx, dword [esi]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x502d4f
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edi, dword [esp + 0x24]
mov edx, dword [edi]
mov eax, dword [esi]
mov edx, dword [edx + 0x20]
push ebx
push eax
mov ecx, edi
call edx
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
sub ecx, ebx
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x502d8b
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + ebx + 0x10]
sub ecx, dword [eax + ebx + 0xc]
lea esi, [eax + ebx + 0xc]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x502db6
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esi]
mov ebx, dword [edi]
mov edx, dword [ebx + 0x18]
push esi
mov esi, dword [esp + 0x2c]
push esi
mov ecx, edi
call edx
push eax
mov eax, dword [ebx + 0xc]
mov ecx, edi
call eax
mov cl, byte [eax]
mov byte [esi], cl
mov edi, dword [eax + 8]
mov ebx, dword [esi + 0xc]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 8]
cmp eax, edi
jne 0x502deb
mov eax, ebx
jmp 0x502e66
lea edx, [eax*4]
push edx
push 0
push ebx
call sub.MSVCR90.dll_memset
add esp, 0xc
push ebx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push edi
call fcn.004d9000
add esp, 4
test edi, edi
jne 0x502e19
xor eax, eax
jmp 0x502e66
lea eax, [edi*4]
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
jne 0x502e66
mov edi, edi
push 0
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x502ff4
push ebx
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
add esp, 4
call ebx
lea eax, [edi*4]
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
je 0x502e30
mov ebx, dword [esp + 0x28]
mov dword [esi + 8], edi
add edi, edi
add edi, edi
mov dword [esi + 0xc], eax
mov ecx, dword [ebx + 0xc]
push edi
push ecx
push edi
push eax
call dword [sym.imp.MSVCR90.dll_memcpy_s]
mov ebx, dword [ebx + 0x14]
mov eax, dword [esi + 0x14]
mov edi, dword [esi + 0x18]
add esp, 0x10
cmp eax, ebx
je 0x502f10
lea edx, [eax*4]
push edx
push 0
push edi
call sub.MSVCR90.dll_memset
add esp, 0xc
push edi
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push ebx
call fcn.004d9000
add esp, 4
test ebx, ebx
jne 0x502ec3
xor eax, eax
jmp 0x502f0e
lea eax, [ebx*4]
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
jne 0x502f0e
push 0
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
mov edi, eax
add esp, 4
test edi, edi
je 0x50301c
push edi
call dword [sym.imp.MSVCP90.dll_void____cdecl___void____cdecl_std::set_new_handler_void____cdecl___void__]
add esp, 4
call edi
lea eax, [ebx*4]
push eax
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
test eax, eax
je 0x502ed8
mov edi, eax
mov eax, dword [esp + 0x28]
mov dword [esi + 0x14], ebx
add ebx, ebx
add ebx, ebx
mov dword [esi + 0x18], edi
mov ecx, dword [eax + 0x18]
push ebx
push ecx
push ebx
push edi
call dword [sym.imp.MSVCR90.dll_memcpy_s]
mov esi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
mov ebx, dword [esp + 0x28]
add esp, 0x10
mov eax, dword [esp + 0x14]
inc eax
add ebx, 0x18
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
cmp eax, dword [ebp + 0x14]
jb 0x502860
lea eax, [esp + 0x70]
push eax
mov byte [esp + 0xd4], 1
call fcn.004d2570
lea ecx, [esp + 0x50]
push ecx
mov byte [esp + 0xd4], 0
call fcn.00505a90
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0xd4], 0xffffffff
call fcn.00506080
mov ecx, dword [esp + 0xc8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 1
push 0x660e74
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCR90.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const___int_]
push 0x63624c
lea edx, [esp + 0x48]
push edx
mov dword [esp + 0x4c], vtable.std::bad_alloc.0
call sub.MSVCR90.dll__CxxThrowException
push 1
push 0x660e74
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCR90.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const___int_]
push 0x63624c
lea eax, [esp + 0x48]
push eax
mov dword [esp + 0x4c], vtable.std::bad_alloc.0
call sub.MSVCR90.dll__CxxThrowException
push 1
push 0x660e74
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCR90.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const___int_]
push 0x63624c
lea ecx, [esp + 0x48]
push ecx
mov dword [esp + 0x4c], vtable.std::bad_alloc.0
call sub.MSVCR90.dll__CxxThrowException
push 1
push 0x660e74
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCR90.dll_public:_void___thiscall_std::exception::constructor_char_const__const_const___int_]
push 0x63624c
lea edx, [esp + 0x48]
push edx
mov dword [esp + 0x4c], vtable.std::bad_alloc.0
call sub.MSVCR90.dll__CxxThrowException
int3