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

Disassembly:
jmp 0x40d550
push 0xffffffffffffffff
push 0x525416
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov esi, ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x1c], ebp
call dword [0x56cdd0]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
add esp, 4
mov ecx, esi
call fcn.00401753
mov ebx, eax
mov dword [esp + 0x20], ebx
mov eax, dword [ebx + 0x14]
cdq
sub eax, edx
mov edi, eax
mov eax, dword [esp + 0x74]
sar edi, 1
inc edi
mov ecx, eax
sub ecx, edi
add eax, edi
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x78]
mov edx, ecx
add ecx, edi
sub edx, edi
mov dword [esp + 0x50], ecx
mov ecx, esi
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
call fcn.004030df
cmp eax, 0x28
jne 0x40d6f8
push 0x18
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x24], eax
cmp eax, ebp
mov dword [esp + 0x6c], ebp
je 0x40d692
mov ebx, dword [esi + 0x3c]
mov edx, dword [ebx + 4]
cmp edx, ebp
je 0x40d627
mov ebp, dword [edx + 0x20]
test ebp, ebp
je 0x40d60d
cmp ebp, 0x100
ja 0x40d622
jmp 0x40d61e
mov cx, word [edx + 0xe]
cmp cx, 8
ja 0x40d627
mov ebp, 1
shl ebp, cl
test ebp, ebp
je 0x40d627
lea eax, [edx + 0x28]
jmp 0x40d629
xor eax, eax
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x40d659
mov edx, dword [ecx + 0x20]
test edx, edx
je 0x40d646
cmp edx, 0x100
jbe 0x40d65b
mov edx, 0x100
jmp 0x40d65b
mov cx, word [ecx + 0xe]
cmp cx, 8
ja 0x40d659
mov edx, 1
shl edx, cl
jmp 0x40d65b
xor edx, edx
mov ebp, dword [ebx + 4]
test ebp, ebp
je 0x40d66a
xor ecx, ecx
mov cx, word [ebp + 0xe]
jmp 0x40d66c
xor ecx, ecx
mov ebp, dword [esp + 0x48]
push 0
push eax
mov eax, dword [esp + 0x58]
push edx
mov edx, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x5c]
sub eax, ebp
sub ecx, edx
push eax
push ecx
mov ecx, dword [esp + 0x3c]
call fcn.00492900
mov ebp, eax
push 0
mov ecx, ebp
mov dword [esp + 0x70], 0xffffffff
call fcn.00493450
mov ebx, eax
test ebp, ebp
mov dword [esp + 0x10], ebx
je 0x40d6bd
mov ecx, ebp
call fcn.00492f70
push ebp
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esi + 0x34]
test eax, eax
je 0x40d6c7
mov eax, dword [eax + 4]
push ebx
push eax
call dword [0x56cc18]
mov edx, dword [esp + 0x50]
mov ebp, dword [esp + 0x48]
sub edx, ebp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x4c]
push edx
mov edx, dword [esp + 0x48]
mov ecx, esi
sub eax, edx
push eax
call fcn.00401168
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x14], eax
mov ebp, dword [ebx + 0x18]
mov eax, dword [ebx + 0x14]
add ebp, eax
mov dword [esp + 0x30], ebp
lea ecx, [ebp*8]
push ecx
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x24], eax
test ebp, ebp
jle 0x40d803
mov ebx, eax
mov dword [esp + 0x18], ebp
mov ebp, dword [sym.imp.MSVCRT.dll_rand]
call ebp
mov ecx, eax
mov eax, 0x80010003
imul ecx, edi
imul ecx
add edx, ecx
sar edx, 0xe
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [esp + 0x2c], edx
call ebp
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fmul qword [0x5302d0]
fmul qword [0x5302c0]
fild dword [esp + 0x2c]
fld st(1)
fcos
fmul st(1)
call sub.MSVCRT.dll__ftol
fxch st(1)
fsin
mov ebp, eax
fmul st(1)
call sub.MSVCRT.dll__ftol
lea ecx, [edi + ebp]
lea edx, [eax + edi]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x78]
add ebp, ecx
add eax, edx
mov dword [ebx], ebp
mov ecx, esi
fstp st(0)
mov dword [ebx + 4], eax
call fcn.004030df
cmp eax, 0x28
jne 0x40d7d9
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x38]
mov ebp, dword [esp + 0x34]
push 0xffffff
mov edx, dword [ecx + 4]
push eax
push ebp
push edx
call dword [0x56cc2c]
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0x34]
push eax
mov eax, dword [esp + 0x3c]
mov ecx, dword [ecx + 4]
push eax
push ebp
push ecx
jmp 0x40d7eb
mov eax, dword [esi + 0x44]
mov edx, dword [ebx + 4]
mov ebp, dword [esi + 0x34]
mov ecx, dword [ebx]
push eax
push edx
mov edx, dword [ebp + 4]
push ecx
push edx
call dword [0x56cc2c]
mov eax, dword [esp + 0x18]
add ebx, 8
dec eax
mov dword [esp + 0x18], eax
jne 0x40d726
mov ecx, esi
call fcn.004030df
cmp eax, 0x28
jne 0x40d970
push 0x18
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x74], eax
test eax, eax
mov dword [esp + 0x6c], 1
je 0x40d83f
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, eax
call fcn.00492b60
mov dword [esp + 0x74], eax
jmp 0x40d847
mov dword [esp + 0x74], 0
mov eax, dword [esi + 0x34]
mov dword [esp + 0x6c], 0xffffffff
test eax, eax
je 0x40d859
mov eax, dword [eax + 4]
mov edx, dword [esp + 0x1c]
push edx
push eax
call dword [0x56cc18]
mov eax, dword [esp + 0x10]
push eax
call dword [0x56cc10]
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x44]
mov ebp, dword [esp + 0x48]
push ecx
mov ecx, esi
call fcn.00401d7a
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x2c], eax
mov edx, dword [ecx + 0x34]
test edx, edx
je 0x40d8c8
mov edx, dword [ecx + 4]
mov ecx, dword [ecx + 0x10]
mov dword [esp + 0x3c], edx
push 0
lea edx, [esp + 0x38]
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x78]
push 0
push edx
push eax
mov eax, dword [esi + 0x3c]
push ebx
push 0
push eax
mov dword [esp + 0x54], ebp
mov dword [esp + 0x5c], ecx
call fcn.00496a80
add esp, 0x1c
jmp 0x40d92c
mov edx, dword [ecx + 4]
mov ecx, dword [ecx + 0x10]
mov dword [esp + 0x5c], edx
push 0
lea edx, [esp + 0x58]
push 0
push edx
mov edx, dword [esi + 0x3c]
push eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x70], ecx
mov ecx, dword [esi + 0x40]
push eax
push ecx
push edx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebp
call fcn.00496a80
mov ebp, dword [esp + 0x4c]
add esp, 0x1c
test ebp, ebp
jle 0x40d928
mov ebx, dword [esp + 0x24]
mov eax, dword [ebx + 4]
mov edx, dword [esi + 0x38]
mov ecx, dword [ebx]
push 0
push eax
mov eax, dword [edx + 4]
push ecx
push eax
call dword [0x56cc2c]
add ebx, 8
dec ebp
jne 0x40d90c
mov ebx, dword [esp + 0x74]
mov ecx, dword [esp + 0x24]
push ecx
call sub.MFC42.DLL_operatordelete
mov ebp, dword [esp + 0x30]
add esp, 4
test ebp, ebp
je 0x40d951
mov ecx, ebp
call fcn.00492f70
push ebp
call sub.MFC42.DLL_operatordelete
add esp, 4
test ebx, ebx
je 0x40d965
mov ecx, ebx
call fcn.00492f70
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov edx, dword [esp + 0x10]
push edx
call dword [0x56cc10]
inc edi
lea eax, [esp + 0x44]
push edi
push edi
push eax
call dword [0x56df78]
mov edx, dword [esp + 0x44]
push 0
mov eax, dword [esp + 0x4c]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x60]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x64]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov ecx, esi
call fcn.00401140
mov ecx, dword [esp + 0x64]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x60
ret 8