Function at 0x403470
Capabilities:
Terminate process

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
push 0x10
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
test esi, esi
jne 0x4034c9
push str.Not_enough_memory
push str._nError:__s__n
call fcn.00406b70
push 0x7d0
push str.Code__d
push 2
lea eax, [esp + 0x28]
push str.signal_termination_handler
push eax
mov dword [esp + 0x30], str.Signal_termination_handler_called
call fcn.00406a30
add esp, 0x1c
push 3
call dword [sym.imp.MSVCR90.dll_exit]
movsx ebp, word [esp + 0x28]
mov eax, ebp
imul eax, ebp
add eax, eax
add eax, eax
mov dword [esp + 0x20], ebp
call fcn.00407310
mov dword [esi + 4], eax
lea edi, [ebp*4]
mov eax, edi
call fcn.00407310
mov dword [esi + 8], eax
mov eax, edi
call fcn.00407310
mov dword [esi + 0xc], eax
mov eax, edi
call fcn.00407310
fld1
mov ecx, dword [esi + 4]
fstp dword [esi]
xor edx, edx
mov ebx, eax
mov dword [esp + 0x10], ecx
test ebp, ebp
jle 0x403542
fldz
mov eax, dword [esi + 8]
mov edi, dword [esp + 0x10]
fst dword [eax + edx*4]
mov ecx, dword [esi + 0xc]
fst dword [ecx + edx*4]
xor eax, eax
mov ecx, ebp
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
inc edx
cmp edx, ebp
lea ecx, [eax + ebp*4]
mov dword [esp + 0x10], ecx
jl 0x40351a
fstp st(0)
mov edi, dword [esp + 0x30]
test edi, edi
jne 0x40354e
xor eax, eax
jmp 0x40356b
push 8
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [eax], edi
mov dword [eax + 4], 0
jmp 0x40356b
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
test eax, eax
je 0x4036a2
mov esi, dword [eax]
mov edi, dword [eax + 4]
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp dword [esi + 4], 0
mov dword [esp + 0x10], edi
je 0x4035b3
jmp 0x403590
mov edi, dword [esi + 8]
push 8
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [esp + 0x14]
mov dword [eax], edi
mov dword [eax + 4], edx
mov esi, dword [esi + 4]
add esp, 4
cmp dword [esi + 4], 0
mov dword [esp + 0x10], eax
jne 0x403590
xor ecx, ecx
test ebp, ebp
jle 0x40366c
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
add edx, 0xc
add edi, 0x10
sub esi, dword [esp + 0x30]
mov dword [esp + 0x18], esi
jmp 0x4035d9
mov esi, dword [esp + 0x18]
cmp byte [edx - 0xc], 0
fld dword [esi + edi]
fsub dword [edi]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fst dword [ebx + ecx*4]
je 0x40361f
fld dword [edx + 4]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x403602
fsub dword [edx]
fstp dword [ebx + ecx*4]
jmp 0x403604
fstp st(0)
fld dword [ebx + ecx*4]
fld dword [edx + 4]
fchs
fcompp
fnstsw ax
test ah, 0x41
jne 0x403621
fld dword [edx]
fadd dword [ebx + ecx*4]
fstp dword [ebx + ecx*4]
jmp 0x403621
fstp st(0)
mov eax, dword [esp + 0x14]
fld dword [ebx + ecx*4]
mov eax, dword [eax + 8]
fld dword [eax + ecx*4]
lea esi, [eax + ecx*4]
fcompp
fnstsw ax
test ah, 0x41
jne 0x40363f
fld dword [ebx + ecx*4]
fstp dword [esi]
mov eax, dword [esp + 0x14]
fld dword [ebx + ecx*4]
mov eax, dword [eax + 0xc]
fld dword [eax + ecx*4]
lea esi, [eax + ecx*4]
fcompp
fnstsw ax
test ah, 5
jp 0x40365d
fld dword [ebx + ecx*4]
fstp dword [esi]
inc ecx
add edx, 0x18
add edi, 4
cmp ecx, ebp
jl 0x4035d5
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + 4]
test ebp, ebp
jle 0x403563
mov edx, ebx
mov esi, ebp
nop
xor eax, eax
fld dword [ebx + eax*4]
inc eax
fmul dword [edx]
add ecx, 4
cmp eax, ebp
fadd dword [ecx - 4]
fstp dword [ecx - 4]
jl 0x403682
add edx, 4
sub esi, 1
jne 0x403680
jmp 0x403563
mov edx, dword [esp + 0x30]
mov eax, dword [edx]
shr eax, 2
cmp eax, 1
jbe 0x4036b7
dec eax
mov dword [esp + 0x14], eax
jmp 0x4036bf
mov dword [esp + 0x14], 1
mov ecx, dword [esi + 4]
xor edi, edi
test ebp, ebp
jle 0x40372e
fld qword [0x477050]
fld dword [0x477048]
mov eax, dword [esp + 0x14]
fild dword [esp + 0x14]
xor edx, edx
test eax, eax
jge 0x4036e8
fadd dword [0x477028]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fld dword [ecx]
fdiv st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fst dword [ecx]
cmp edx, edi
jne 0x403719
fcomp st(3)
fnstsw ax
test ah, 5
jp 0x403711
fxch st(1)
fst dword [ecx]
fxch st(1)
fld dword [ecx]
fmul dword [esi]
fstp dword [esi]
jmp 0x40371b
fstp st(0)
inc edx
add ecx, 4
cmp edx, ebp
jl 0x4036f0
inc edi
fstp st(0)
cmp edi, ebp
jl 0x4036d4
fstp st(1)
fstp st(0)
fld dword [esi]
fild dword [esp + 0x20]
fld1
fdivrp st(1)
call sub.MSVCR90.dll__CIpow
fstp dword [esi]
test ebx, ebx
je 0x40374d
push ebx
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret