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

Disassembly:
sub esp, 0x44
mov eax, dword [0x461ff8]
mov edx, dword [0x461ffc]
push ebx
push ebp
push esi
xor ecx, ecx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x68]
push edi
xor esi, esi
xor edi, edi
xor ebx, ebx
cmp eax, ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
je 0x40a753
mov esi, dword [eax]
mov edi, dword [eax + 4]
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x70]
mov ebx, dword [edx]
mov dword [esp + 0x40], eax
mov eax, dword [edx + 4]
mov dword [esp + 0x48], eax
mov eax, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x50], edx
mov edx, dword [eax]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 4]
mov dword [esp + 0x28], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
cmp dword [0x71a7b8], ecx
mov dword [esp + 0x70], ecx
je 0x40a770
fild dword [esp + 0x64]
fst dword [esp + 0x64]
fstp dword [esp + 0x60]
jmp 0x40a8ea
mov dword [esp + 0x74], ecx
call fcn.0040e820
fld dword [esp + 0x60]
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x3c]
sub eax, esi
sub ebp, edi
mov dword [esp + 0x14], eax
call sub.MSVCRT.dll__ftol
mov ecx, eax
mov eax, 0xff
sub eax, ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
lea edx, [eax + eax*2]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], edx
jmp 0x40a7b8
mov ecx, dword [esp + 0x10]
mov eax, dword [0x71a7b4]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [0x462000]
push eax
push ebp
push edx
mov edx, dword [esp + 0x28]
push edx
mov edx, eax
imul edx, dword [esp + 0x5c]
push ecx
lea ecx, [ebx + ebx*2]
add edx, ecx
add edx, dword [esp + 0x70]
mov ecx, eax
imul eax, edi
imul ecx, dword [esp + 0x40]
push edx
add ecx, dword [esp + 0x38]
add ecx, dword [esp + 0x78]
mov edx, dword [0x4fcf50]
push ecx
lea ecx, [esi + esi*2]
add eax, ecx
add eax, edx
push eax
call fcn.0042bd50
mov edx, dword [esp + 0x90]
mov eax, dword [0x7199b0]
add esp, 0x24
push 0
push edx
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [0x7199b0]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [esp + 0x74]
call fcn.0040e820
mov ecx, eax
sub ecx, dword [esp + 0x20]
je 0x40a7b4
mov edx, dword [esp + 0x68]
cmp edx, ecx
jae 0x40a863
fild dword [esp + 0x64]
fst dword [esp + 0x64]
fstp dword [esp + 0x60]
jmp 0x40a8ea
mov eax, dword [esp + 0x74]
fild dword [esp + 0x64]
imul eax, edx
fst dword [esp + 0x64]
xor edx, edx
div ecx
cmp eax, 2
mov dword [esp + 0x74], eax
jge 0x40a885
fstp dword [esp + 0x60]
jmp 0x40a8ea
fsub dword [esp + 0x60]
mov dword [esp + 0x70], 1
fidiv dword [esp + 0x74]
fstp dword [0x488358]
fld dword [0x488358]
fadd dword [esp + 0x60]
fstp dword [esp + 0x60]
fld dword [0x488358]
fcomp dword [0x4584c8]
fld dword [esp + 0x60]
fnstsw ax
fcomp dword [esp + 0x64]
test ah, 0x41
fnstsw ax
je 0x40a8d5
test ah, 0x41
je 0x40a8ea
mov edx, dword [esp + 0x64]
mov dword [esp + 0x60], edx
jmp 0x40a8e2
test ah, 0x41
jne 0x40a8ea
mov eax, dword [esp + 0x64]
mov dword [esp + 0x60], eax
mov dword [esp + 0x70], 0
fld dword [esp + 0x60]
call sub.MSVCRT.dll__ftol
mov ecx, dword [0x71a7b4]
mov edx, dword [esp + 0x40]
push ecx
mov ecx, dword [0x462000]
sub edx, edi
push ecx
push edx
mov edx, dword [esp + 0x48]
mov ebp, dword [esp + 0x64]
sub edx, esi
push edx
mov edx, 0xff
sub edx, eax
push edx
push eax
mov eax, ecx
imul eax, dword [esp + 0x60]
add ebp, eax
mov eax, dword [esp + 0x3c]
lea edx, [ebx + ebx*2]
add edx, ebp
mov ebp, dword [esp + 0x74]
push edx
mov edx, ecx
imul ecx, edi
imul edx, dword [esp + 0x44]
lea eax, [eax + eax*2]
add ebp, edx
add eax, ebp
push eax
mov eax, dword [0x4fcf50]
add eax, ecx
lea edx, [esi + esi*2]
add edx, eax
push edx
call fcn.0042bd50
mov ecx, dword [esp + 0x90]
mov edx, dword [0x7199b0]
add esp, 0x24
push 0
push ecx
push edx
call dword [sym.imp.USER32.dll_InvalidateRect]
call fcn.0040da40
test eax, eax
jne 0x40a982
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x70]
test eax, eax
jne 0x40a89b
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret