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

Disassembly:
sub esp, 0x5c
pushal
mov dword [esp + 0x54], ecx
mov ecx, eax
mov edi, ebx
mov dword [esp + 0x38], edi
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x74], ebx
mov esi, edx
cmp ecx, 0
je 0x47878d
mov eax, ecx
call fcn.00478e98
mov ebx, eax
lea eax, [ecx + 0x14]
call fcn.00478cec
mov eax, dword [eax]
mov dword [esp + 0x4c], eax
jmp 0x4787a2
mov eax, dword [esp + 0x84]
and eax, 0x10
cmp eax, 0
je 0x4783fb
jmp 0x4787b6
mov eax, dword [esp + 0x80]
cmp eax, 0
je 0x478436
call fcn.0050eac4
push eax
push edi
call sub.GDI32.dll_SetBkColor
imul ebx, esi
push ebx
push dword [esp + 0x90]
mov eax, edi
mov ebx, dword [esp + 0x90]
mov ecx, 0
mov edx, 0
call fcn.004787e0
push 0x808080
push edi
call sub.GDI32.dll_SetBkColor
mov eax, esi
mov ebx, 4
cdq
idiv ebx
mov ecx, eax
mov dword [esp + 0x34], ecx
mov ebx, ecx
shl ebx, 1
inc ebx
mov dword [esp + 0x58], ebx
mov edx, ebx
mov dword [esp + 0x3c], edx
mov eax, dword [esp + 0x8c]
sub eax, edx
mov edi, 2
cdq
idiv edi
mov edx, eax
mov dword [esp + 0x48], edx
mov eax, dword [esp + 0x3c]
cmp eax, 7
jge 0x47848a
mov dword [esp + 0x2c], 0
jmp 0x4784a1
cmp eax, 0xb
jge 0x478499
mov dword [esp + 0x2c], 1
jmp 0x4784a1
mov dword [esp + 0x2c], 2
cmp eax, 7
jge 0x4784b3
mov dword [esp + 0x30], 0
jmp 0x4786ec
cmp eax, 0xb
jge 0x4786e4
mov dword [esp + 0x30], 1
jmp 0x4786ec
mov eax, dword [esp + 0x84]
and eax, 8
cmp eax, 0
je 0x4784dd
jmp 0x478680
push 0
mov ebx, dword [esp + 0x3c]
push ebx
call sub.GDI32.dll_SetBkColor
mov ecx, dword [esp + 0x34]
mov eax, ecx
add eax, dword [esp + 0x58]
mov dword [esp + 0x64], eax
dec eax
mov dword [esp + 0x40], eax
mov edx, dword [esp + 0x30]
sub eax, edx
push eax
push dword [esp + 0x60]
mov eax, ebx
mov ebx, dword [esp + 0x90]
inc ecx
mov dword [esp + 0x70], ecx
add ecx, edx
mov edx, dword [esp + 0x58]
call fcn.004787e0
mov eax, dword [esp + 0x4c]
and eax, 0x40000000
cmp eax, 0
pushfd
mov eax, dword [esp + 0x4c]
add eax, dword [esp + 0x40]
mov dword [esp + 0x74], eax
dec eax
mov dword [esp + 0x70], eax
popfd
je 0x478566
push dword [esp + 0x60]
mov edx, dword [esp + 0x30]
sub eax, edx
push eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
add eax, edx
mov edx, eax
inc edx
mov eax, dword [esp + 0x40]
call fcn.004787e0
push 0x808080
push dword [esp + 0x3c]
call sub.GDI32.dll_SetBkColor
push dword [esp + 0x64]
mov edx, dword [esp + 0x4c]
mov eax, edx
inc eax
mov dword [esp + 0x2c], eax
push eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
call fcn.004787e0
push dword [esp + 0x68]
push dword [esp + 0x70]
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x30]
call fcn.004787e0
push dword [esp + 0x64]
push dword [esp + 0x70]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
call fcn.004787e0
push dword [esp + 0x64]
push dword [esp + 0x74]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x74]
call fcn.004787e0
mov eax, dword [esp + 0x84]
mov ebx, edi
call fcn.004787c0
cmp eax, 0
je 0x478781
push esi
push dword [esp + 0x60]
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x90]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x58]
call fcn.004787e0
cmp dword [esp + 0x74], 0
je 0x478629
push dword [esp + 0x60]
push dword [esp + 0x4c]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x4c]
mov edx, 0
call fcn.004787e0
cmp dword [esp + 0x78], 0
jne 0x478781
push dword [esp + 0x60]
push dword [esp + 0x90]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x78]
call fcn.004787e0
jmp 0x478781
mov ebx, dword [esp + 0x4c]
mov eax, ebx
and eax, 0x60000000
cmp eax, 0
pushfd
and ebx, 0x80000000
mov dword [esp + 0x7c], ebx
popfd
pushfd
mov eax, dword [esp + 0x54]
inc eax
mov dword [esp + 0x60], eax
popfd
jne 0x4784c9
mov eax, dword [esp + 0x84]
mov ebx, edi
call fcn.004787c0
cmp eax, 0
je 0x478781
mov eax, dword [esp + 0x4c]
and eax, 0x80000000
cmp eax, 0
je 0x4786ab
mov eax, dword [esp + 0x5c]
jmp 0x4786b2
mov eax, dword [esp + 0x8c]
push edx
push eax
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x90]
mov edx, 0
call fcn.004787e0
push esi
push dword [esp + 0x60]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x58]
call fcn.004787e0
jmp 0x478781
mov dword [esp + 0x30], 2
mov dword [esp + 0x24], edx
mov edi, 2
cdq
idiv edi
mov edx, dword [esp + 0x24]
add edx, eax
mov dword [esp + 0x50], edx
mov eax, ebx
mov ebx, 2
cdq
idiv ebx
add ecx, eax
mov dword [esp + 0x44], ecx
mov edi, 1
mov eax, dword [esp + 0x20]
cmp edi, eax
jg 0x4787b6
mov ebx, dword [esp + 0x4c]
mov edx, 1
mov ecx, edi
dec cl
shl edx, cl
and ebx, edx
cmp ebx, 0
je 0x478781
cmp edi, eax
pushfd
mov ecx, dword [esp + 0x48]
mov edx, ecx
inc edx
mov dword [esp + 0x64], edx
popfd
je 0x478655
mov eax, dword [esp + 0x84]
mov ebx, edi
call fcn.004787c0
cmp eax, 0
je 0x478781
mov eax, ecx
inc eax
push eax
push dword [esp + 0x90]
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x90]
mov edx, 0
call fcn.004787e0
mov eax, dword [esp + 0x88]
add dword [eax], esi
inc edi
jmp 0x478717
mov eax, ebx
mov ebx, 3
cdq
idiv ebx
mov eax, dword [edx*4 + 0x54600c]
mov dword [esp + 0x4c], eax
call fcn.00478c78
mov ebx, eax
mov dword [esp + 0x20], ebx
cmp ebx, 0
jne 0x4783e7
popal
add esp, 0x5c
ret 0x10