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

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x30]
push ebx
mov ebx, dword [esp + 0x28]
push esi
mov esi, dword [ebx + 0x50]
push edi
movzx edi, ax
shr eax, 0x10
test esi, esi
mov dword [esp + 0x3c], eax
jne 0x414a78
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret
mov eax, dword [esi + 4]
push ebp
mov ebp, dword [esi + 0x78]
mov dword [esp + 0x34], ebp
imul ebp, ebp, 0x1008
add ebp, dword [0x464bc0]
sub eax, dword [ebp + 0xeec]
mov ecx, dword [ebp + 0xee8]
imul eax, ecx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 8]
sub eax, dword [ebp + 0xef0]
imul eax, ecx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xc]
imul eax, ecx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x10]
imul eax, ecx
mov ecx, dword [esp + 0x38]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
sub ecx, 0x200
je 0x4150c0
sub ecx, 1
je 0x414c45
sub ecx, 1
jne 0x4150c6
cmp dword [esi + 0x34], 0
je 0x4150c6
push 0
push ebp
call fcn.004095b0
mov eax, dword [ebp + 0xa0c]
add esp, 8
push eax
call dword [sym.imp.USER32.dll_GetDC]
mov ecx, dword [ebx + 0x50]
mov edi, eax
push edi
push ecx
call fcn.00410a90
add esp, 8
cmp dword [esi + 0x34], 0xa
jne 0x414b6d
mov edx, dword [ebp + 0xa0c]
push edi
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esi + 0x64]
mov ecx, dword [esp + 0x34]
push eax
push ebx
push ecx
call fcn.00410ec0
jmp 0x414c1a
cmp dword [esi + 0x70], 0
je 0x414be0
mov edx, dword [ebp + 0xa10]
mov eax, dword [ebp + 0xee8]
mov ecx, dword [edx + 0x20]
push 0
push 0
push 1
push ecx
push 1
mov dword [esp + 0x54], eax
fild dword [esp + 0x54]
push 0
lea ecx, [ebp + 0xeec]
push ecx
fmul qword [0x4535f0]
sub esp, 0x10
fst qword [esp + 8]
fstp qword [esp]
push eax
push edi
push ebx
push 0
call fcn.00424750
mov edx, dword [esi + 4]
mov dword [ebx + 0x28], edx
mov eax, dword [esi + 8]
mov dword [ebx + 0x2c], eax
mov ecx, dword [esi + 0xc]
push 0
lea eax, [esp + 0x60]
mov dword [ebx + 0x30], ecx
mov edx, dword [esi + 0x10]
push eax
push ebx
mov dword [ebx + 0x34], edx
call fcn.004228d0
add esp, 0x48
jmp 0x414bfc
mov ecx, dword [esi + 4]
mov dword [esp + 0x20], ecx
mov edx, dword [esi + 8]
mov dword [esp + 0x24], edx
mov eax, dword [esi + 0xc]
mov dword [esp + 0x28], eax
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x2c], ecx
mov edx, dword [ebp + 0xa0c]
push edi
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x20]
push eax
push ebx
push ecx
call fcn.00410e10
add esp, 0xc
mov dword [esi + 0x34], 0
mov edx, dword [ebp + 0xa0c]
push edx
push 0xffffffffffffffff
push 0xffffffffffffffff
push esi
call fcn.00409830
add esp, 0x10
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
cmp dword [esi + 0x70], 0
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x40]
mov dword [esi + 0x40], ecx
mov ecx, dword [esi + 8]
mov dword [esi + 0x44], ecx
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x48], ecx
mov ecx, dword [esi + 0x10]
mov dword [esi + 0x38], edi
mov dword [esi + 0x3c], edx
mov dword [esi + 0x4c], ecx
je 0x414d68
mov ecx, dword [esi + 0x24]
mov ebx, dword [esi + 0x28]
lea eax, [ecx - 2]
cmp edi, eax
lea edx, [ebx - 2]
jl 0x414cb6
add eax, 5
cmp edi, eax
jge 0x414cb6
mov eax, dword [esp + 0x40]
cmp eax, edx
jl 0x414cb6
add edx, 5
cmp eax, edx
jge 0x414cb6
push 1
push ebp
mov dword [esi + 0x34], 0xb
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
mov eax, dword [esi + 0x2c]
cdq
sub eax, edx
sar eax, 1
lea eax, [eax + ecx - 2]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x30]
cdq
sub eax, edx
sar eax, 1
cmp edi, dword [esp + 0x34]
lea eax, [eax + ebx - 2]
jl 0x414d11
mov edx, dword [esp + 0x34]
add edx, 5
cmp edi, edx
jge 0x414d11
mov edx, dword [esp + 0x40]
cmp edx, eax
jl 0x414d15
add eax, 5
cmp edx, eax
jge 0x414d15
push 1
push ebp
mov dword [esi + 0x34], 0xd
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
mov edx, dword [esp + 0x40]
mov eax, dword [esi + 0x2c]
lea ecx, [eax + ecx - 2]
cmp edi, ecx
mov eax, dword [esi + 0x30]
lea ebx, [eax + ebx - 2]
jl 0x4150c6
add ecx, 5
cmp edi, ecx
jge 0x4150c6
cmp edx, ebx
jl 0x4150c6
add ebx, 5
cmp edx, ebx
jge 0x4150c6
push 1
push ebp
mov dword [esi + 0x34], 0xc
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
mov ecx, dword [esp + 0x1c]
cmp edi, ecx
jl 0x414da7
mov ebx, dword [esp + 0x18]
add ebx, ecx
cmp edi, ebx
jge 0x414da7
mov ecx, dword [esp + 0x14]
cmp edx, ecx
jl 0x414da7
add eax, ecx
cmp edx, eax
jge 0x414da7
push 1
push ebp
mov dword [esi + 0x34], 1
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
cmp dword [esi + 0x5c], 0
je 0x415031
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x24]
mov ebx, dword [esi + 0x28]
cdq
sub eax, edx
sar eax, 1
lea ecx, [eax + ecx - 2]
cmp edi, ecx
lea eax, [ebx - 5]
mov dword [esp + 0x10], eax
jl 0x414e16
lea edx, [ecx + 5]
cmp edi, edx
jge 0x414e16
mov edx, dword [esp + 0x40]
cmp edx, eax
jl 0x414e16
add eax, 5
cmp edx, eax
jge 0x414e16
mov dword [esi + 0x34], 2
mov eax, dword [ebp + 0xa0c]
push eax
push 0xffffffffffffffff
push edi
push esi
call fcn.00409830
add esp, 0x10
push 1
push ebp
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
cmp edi, ecx
mov eax, dword [esi + 0x30]
lea edx, [eax + ebx + 1]
mov dword [esp + 0x1c], edx
jl 0x414e6d
add ecx, 5
cmp edi, ecx
jge 0x414e6d
mov ecx, dword [esp + 0x40]
cmp ecx, edx
jl 0x414e6d
add edx, 5
cmp ecx, edx
jge 0x414e6d
mov dword [esi + 0x34], 3
mov ecx, dword [ebp + 0xa0c]
push ecx
push 0xffffffffffffffff
push edi
push esi
call fcn.00409830
add esp, 0x10
push 1
push ebp
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
mov ecx, dword [esi + 0x24]
cdq
sub eax, edx
sar eax, 1
lea edx, [ecx - 5]
cmp edi, edx
lea ebx, [eax + ebx - 2]
mov dword [esp + 0x14], ebx
jl 0x414ed0
lea eax, [edx + 5]
cmp edi, eax
jge 0x414ed0
cmp dword [esp + 0x40], ebx
jl 0x414ed0
lea eax, [ebx + 5]
cmp dword [esp + 0x40], eax
jge 0x414ed0
mov edx, dword [esp + 0x40]
mov dword [esi + 0x34], 5
mov ecx, dword [ebp + 0xa0c]
push ecx
push edx
push 0xffffffffffffffff
push esi
call fcn.00409830
add esp, 0x10
push 1
push ebp
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
mov eax, dword [esi + 0x2c]
lea eax, [eax + ecx + 1]
cmp edi, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x34], eax
jl 0x414f2d
lea ecx, [eax + 5]
cmp edi, ecx
jge 0x414f2d
mov ecx, dword [esp + 0x40]
cmp ecx, ebx
jl 0x414f31
add ebx, 5
cmp ecx, ebx
jge 0x414f31
mov dword [esi + 0x34], 4
mov edx, dword [ebp + 0xa0c]
push edx
mov eax, ecx
push eax
push 0xffffffffffffffff
push esi
call fcn.00409830
add esp, 0x10
push 1
push ebp
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
mov ecx, dword [esp + 0x40]
cmp dword [esi + 0x6c], 0
jne 0x415031
cmp edi, edx
jl 0x414f74
lea ebx, [edx + 5]
cmp edi, ebx
jge 0x414f74
mov ebx, dword [esp + 0x10]
cmp ecx, ebx
jl 0x414f7e
lea eax, [ebx + 5]
cmp ecx, eax
jge 0x414f7a
push 1
push ebp
mov dword [esi + 0x34], 6
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
mov ebx, dword [esp + 0x10]
jmp 0x414f7e
mov eax, dword [esp + 0x18]
cmp edi, eax
jl 0x414fb7
add eax, 5
cmp edi, eax
jge 0x414fb3
cmp ecx, ebx
jl 0x414fb3
add ebx, 5
cmp ecx, ebx
jge 0x414fb3
push 1
push ebp
mov dword [esi + 0x34], 7
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x18]
cmp edi, edx
jl 0x414ff0
add edx, 5
cmp edi, edx
jge 0x414ff0
mov edx, dword [esp + 0x1c]
cmp ecx, edx
jl 0x414ff4
lea ebx, [edx + 5]
cmp ecx, ebx
jge 0x414ff4
push 1
push ebp
mov dword [esi + 0x34], 9
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
mov edx, dword [esp + 0x1c]
cmp edi, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], edx
jl 0x415031
add eax, 5
cmp edi, eax
jge 0x415031
cmp ecx, edx
jl 0x415031
add edx, 5
cmp ecx, edx
jge 0x415031
push 1
push ebp
mov dword [esi + 0x34], 8
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
cmp dword [esi + 0x60], 0
je 0x4150c6
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x38]
push edx
push esi
call fcn.00409640
mov eax, dword [esi + 0x2c]
mov ecx, dword [esp + 0x40]
cdq
sub eax, edx
sar eax, 1
add eax, dword [esi + 0x24]
add esp, 0xc
lea ecx, [ecx + eax - 2]
mov eax, dword [esi + 0x30]
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
add eax, dword [esi + 0x28]
cmp edi, ecx
lea eax, [edx + eax - 2]
jl 0x4150c6
add ecx, 5
cmp edi, ecx
jge 0x4150c6
mov ecx, dword [esp + 0x40]
cmp ecx, eax
jl 0x4150c6
add eax, 5
cmp ecx, eax
jge 0x4150c6
push 0
push esi
call fcn.00410a90
push 0
push esi
mov dword [esi + 0x34], 0xa
call fcn.00410a90
add esp, 0x10
push 1
push ebp
call fcn.004095b0
add esp, 8
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
cmp dword [esi + 0x34], 0
jne 0x4150d0
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret
mov eax, dword [ebp + 0xa0c]
push eax
call dword [sym.imp.USER32.dll_GetDC]
cmp dword [esi + 0x34], 0xa
mov dword [esp + 0x34], eax
je 0x4150f2
push 0
push esi
call fcn.00410a90
add esp, 8
mov ebx, dword [ebp + 0xee8]
mov eax, edi
sub eax, dword [esi + 0x38]
shl eax, 8
cdq
idiv ebx
mov ecx, eax
mov eax, dword [esp + 0x40]
sub eax, dword [esi + 0x3c]
shl eax, 8
cdq
idiv ebx
mov edx, dword [esi + 0x34]
add edx, 0xffffffff
cmp edx, 0xc
ja case.default.0x415121
jmp dword [edx*4 + 0x41533c]
mov edx, dword [esi + 0x40]
add edx, ecx
mov ecx, dword [esi + 0x44]
add ecx, eax
mov dword [esi + 4], edx
mov dword [esi + 8], ecx
jmp case.default.0x415121
mov ecx, dword [esi + 0x4c]
sub ecx, eax
test ecx, ecx
jle 0x415151
mov edx, dword [esi + 0x44]
add edx, eax
mov dword [esi + 8], edx
mov dword [esi + 0x10], ecx
cmp dword [esi + 0x6c], 0
je case.default.0x415121
push 0
push esi
call fcn.004098e0
add esp, 8
jmp case.default.0x415121
mov ecx, dword [esi + 0x4c]
add eax, ecx
test eax, eax
jle 0x415177
mov dword [esi + 0x10], eax
cmp dword [esi + 0x6c], 0
je case.default.0x415121
push 0
push esi
call fcn.004098e0
add esp, 8
jmp case.default.0x415121
mov eax, dword [esi + 0x48]
sub eax, ecx
test eax, eax
jle 0x4151b3
mov edx, dword [esi + 0x40]
add edx, ecx
mov dword [esi + 4], edx
mov dword [esi + 0xc], eax
jmp 0x4151b3
mov eax, dword [esi + 0x48]
add ecx, eax
test ecx, ecx
jle 0x4151b3
mov dword [esi + 0xc], ecx
cmp dword [esi + 0x6c], 0
je case.default.0x415121
push 1
push esi
call fcn.004098e0
add esp, 8
jmp case.default.0x415121
mov edx, dword [esi + 0x48]
sub edx, ecx
test edx, edx
jle 0x4151ef
mov edi, dword [esi + 0x40]
add edi, ecx
mov dword [esi + 4], edi
mov dword [esi + 0xc], edx
jmp 0x4151ef
mov edx, dword [esi + 0x48]
add ecx, edx
test ecx, ecx
jle 0x4151ef
mov dword [esi + 0xc], ecx
mov ecx, dword [esi + 0x4c]
sub ecx, eax
test ecx, ecx
jle case.default.0x415121
mov edx, dword [esi + 0x44]
add edx, eax
mov dword [esi + 8], edx
mov dword [esi + 0x10], ecx
jmp case.default.0x415121
mov edx, dword [esi + 0x48]
sub edx, ecx
test edx, edx
jle 0x41522e
mov edi, dword [esi + 0x40]
add edi, ecx
mov dword [esi + 4], edi
mov dword [esi + 0xc], edx
jmp 0x41522e
mov edx, dword [esi + 0x48]
add ecx, edx
test ecx, ecx
jle 0x41522e
mov dword [esi + 0xc], ecx
mov ecx, dword [esi + 0x4c]
add eax, ecx
test eax, eax
jle case.default.0x415121
mov dword [esi + 0x10], eax
jmp case.default.0x415121
mov edx, dword [esi + 0x40]
add edx, ecx
mov dword [esi + 4], edx
mov edx, dword [esi + 0x44]
add edx, eax
mov dword [esi + 8], edx
mov edx, dword [esi + 0x48]
sub edx, ecx
mov ecx, dword [esi + 0x4c]
sub ecx, eax
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], ecx
jmp case.default.0x415121
mov edx, dword [esi + 0x48]
add edx, ecx
mov ecx, dword [esi + 0x4c]
add ecx, eax
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], ecx
jmp case.default.0x415121
mov edx, dword [ebp + 0xee8]
mov eax, dword [esp + 0x34]
lea ebx, [ebp + 0xeec]
push ebx
push edx
push eax
push esi
call fcn.004096d0
mov eax, dword [esi + 0x30]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x50]
sar ecx, 1
sub eax, ecx
sub eax, dword [esi + 0x28]
add esp, 0x10
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x2c]
fild dword [esp + 0x40]
cdq
sub eax, edx
sar eax, 1
sub edi, eax
fchs
sub edi, dword [esi + 0x24]
mov dword [esp + 0x40], edi
fild dword [esp + 0x40]
call fcn.0043d1da
fldz
fcomp st(1)
fnstsw ax
fld qword [0x453848]
test ah, 0x41
jne 0x4152e3
fadd st(1), st(0)
fxch st(1)
fmul qword [0x453628]
fdivrp st(1)
call fcn.0043b410
mov dword [esi + 0x64], eax
mov edx, dword [ebp + 0xee8]
mov eax, dword [esp + 0x34]
push ebx
push edx
push eax
push esi
call fcn.004096d0
add esp, 0x10
cmp dword [esi + 0x34], 0xa
je 0x41531c
push 0
push esi
call fcn.00410a90
add esp, 8
mov ecx, dword [esp + 0x34]
mov edx, dword [ebp + 0xa0c]
push ecx
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 4]
imul eax, eax, 0x1008
add eax, dword [0x464bc0]
cmp dword [eax + 0xa10], 0
mov ecx, dword [eax + 0x5a4]
je 0x4153b5
test ecx, ecx
je 0x4153b5
mov edx, dword [ecx + 0x104]
xor eax, eax
test edx, edx
jle 0x4153b5
mov ecx, dword [ecx + 0x10c]
cmp dword [ecx + 0x50], 0
jne 0x4153b8
add eax, 1
add ecx, 0x58
cmp eax, edx
jl 0x4153a5
xor eax, eax
ret
mov dword [esp + 4], ecx
jmp 0x414a50