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

Disassembly:
sub esp, 0x680
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 0x80], ebx
jne 0x407cc1
pop esi
xor eax, eax
pop ebx
add esp, 0x680
ret 0xc
mov eax, dword [esi + 0xcc]
mov ecx, dword [esi + 0xa0]
cdq
idiv ecx
push ebp
push edi
mov edi, dword [esp + 0x698]
mov dword [esp + 0x38], ebx
mov dl, byte [edi + 8]
mov dword [esp + 0x34], eax
mov eax, 1
test al, dl
je 0x407cf1
mov dword [esp + 0x38], eax
imul ecx, dword [esp + 0x694]
mov ebp, dword [esi + 0x9c]
mov edx, dword [esi + 0x20]
mov al, byte [edi + 0xd]
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x40]
mov byte [esp + 0x12], al
push ecx
push edx
lea ebp, [ebp + ebp*2]
mov dword [esp + 0x24], ebx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esi + 0x9c]
mov ecx, dword [esp + 0x40]
mov ebx, dword [esp + 0x69c]
lea edx, [eax + ecx]
lea eax, [edx + eax*2]
mov dword [esp + 0x40], eax
mov al, byte [edi + 0xd]
test al, al
je 0x407e2d
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov dword [esp + 0x30], ecx
xor ecx, ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x30]
cmp dword [edi + 4], edx
jne 0x407db8
mov dl, byte [edi + 0xd]
test dl, dl
mov byte [esp + 0x13], dl
je 0x407db8
mov edx, dword [esp + 0x1c]
inc edx
mov dword [esp + 0x1c], edx
mov edx, dword [esi + 0x7c]
cmp dword [edx], 0
jne 0x407d9e
cmp dword [esp + 0x1c], 0xa
jne 0x407d9e
mov dl, byte [esp + 0x12]
cmp dl, 0x30
jl 0x407d9e
cmp dl, 0x39
jg 0x407d9e
cmp byte [edi + 0x1d], 0x3f
jne 0x407ece
mov dl, byte [esp + 0x13]
add edi, 0x10
mov byte [esp + ecx + 0x50], dl
mov edx, dword [esi + 0x9c]
add ebp, edx
mov edx, dword [edi]
inc ecx
cmp edx, eax
je 0x407d5a
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x34]
mov byte [esp + ecx + 0x50], 0
mov ecx, dword [esp + 0x694]
cmp edx, ecx
jne 0x407ddb
mov ecx, dword [esi + 0x78]
cmp eax, dword [ecx + 0x38]
jne 0x407ddb
mov eax, dword [ecx + 0x34]
push eax
push ebx
call dword [sym.imp.GDI32.dll_SetBkColor]
mov edx, dword [esp + 0x30]
push edx
push ebx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x54]
push eax
push ecx
mov ecx, dword [esi + 0xd0]
imul ecx, dword [esi + 0x9c]
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x4c]
push edx
push 4
push eax
mov eax, dword [esp + 0x54]
sub eax, ecx
push eax
push ebx
call dword [sym.imp.GDI32.dll_ExtTextOutA]
mov al, byte [edi + 0xd]
test al, al
jne 0x407d47
mov edx, dword [esp + 0x694]
mov eax, dword [esp + 0x34]
mov ecx, dword [esi + 0xd0]
cmp eax, edx
mov eax, dword [esi + 0x9c]
jne 0x407edd
imul ecx, eax
sub ebp, ecx
lea ecx, [eax + eax*2]
cmp ebp, ecx
mov dword [esp + 0x20], ebp
jge 0x407e60
mov dword [esp + 0x20], ecx
mov edx, dword [0x4ba584]
mov ecx, dword [esp + 0x18]
inc edx
mov dword [esp + 0x24], ecx
imul edx, eax
mov eax, dword [esi + 0xa0]
mov dword [esp + 0x28], edx
add eax, ecx
mov ecx, dword [esi + 0x78]
mov dword [esp + 0x2c], eax
mov edx, dword [ecx + 0x34]
push edx
push ebx
call dword [sym.imp.GDI32.dll_SetBkColor]
mov eax, dword [esi + 0x78]
mov ecx, dword [eax + 0x38]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
sub eax, ecx
push 0
cdq
idiv dword [esi + 0x9c]
mov edx, dword [esi + 0x144]
add eax, 2
push eax
lea eax, [esp + 0x28]
push edx
mov edx, dword [esp + 0x30]
push eax
push 4
push edx
push ecx
jmp 0x407f50
mov dword [esp + 0x14], ecx
add edi, 0x150
jmp 0x407dbc
imul ecx, eax
sub ebp, ecx
lea ecx, [eax + eax*2]
cmp ebp, ecx
jge 0x407eeb
mov ebp, ecx
mov edx, dword [esp + 0x48]
mov edi, dword [esp + 0x18]
mov ecx, dword [esi + 0x78]
add eax, edx
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0xa0]
add eax, edi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], edi
mov dword [esp + 0x2c], eax
mov edx, dword [ecx + 0x38]
push edx
push ebx
call dword [sym.imp.GDI32.dll_SetBkColor]
mov eax, dword [esi + 0x78]
mov ecx, dword [eax + 0x38]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
sub eax, ecx
push 0
cdq
idiv dword [esi + 0x9c]
mov edx, dword [esi + 0x144]
add eax, 2
push eax
lea eax, [esp + 0x28]
push edx
push eax
push 4
push edi
push ebp
push ebx
call dword [sym.imp.GDI32.dll_ExtTextOutA]
mov eax, dword [esp + 0x38]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x680
ret 0xc