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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffff84
mov esi, ecx
mov ebx, edx
mov ebp, eax
xor eax, eax
mov dword [esp], eax
test ebp, ebp
je 0x47841b
push 0
call sub.gdi32.dll_CreateCompatibleDC
mov dword [esp + 4], eax
cmp dword [esp + 4], 0
je 0x478411
mov dword [esp + 0x38], 0x28
mov eax, ebp
mov edx, dword [eax]
call dword [edx + 0x2c]
mov dword [esp + 0x3c], eax
mov eax, ebp
mov edx, dword [eax]
call dword [edx + 0x20]
mov dword [esp + 0x40], eax
mov word [esp + 0x44], 1
mov word [esp + 0x46], 0x20
xor eax, eax
mov dword [esp + 0x48], eax
xor eax, eax
mov dword [esp + 0x4c], eax
xor eax, eax
mov dword [esp + 0x50], eax
xor eax, eax
mov dword [esp + 0x54], eax
xor eax, eax
mov dword [esp + 0x58], eax
xor eax, eax
mov dword [esp + 0x5c], eax
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push 0
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x18]
push eax
call sub.gdi32.dll_CreateDIBSection
mov edi, eax
test edi, edi
je 0x478411
push edi
mov eax, dword [esp + 8]
push eax
call sub.gdi32.dll_SelectObject
mov dword [esp + 0x10], eax
lea eax, [esp + 0x64]
push eax
push 0x18
push edi
call sub.gdi32.dll_GetObjectA
jmp 0x4780ca
inc dword [esp + 0x70]
mov eax, dword [esp + 0x70]
and eax, 0x80000003
jns 0x4780da
dec eax
or eax, 0xfffffffc
inc eax
test eax, eax
jg 0x4780c6
mov eax, dword [esp + 4]
push eax
call sub.gdi32.dll_CreateCompatibleDC
mov dword [esp + 8], eax
mov eax, ebp
mov edx, dword [eax]
call dword [edx + 0x64]
push eax
mov eax, dword [esp + 0xc]
push eax
call sub.gdi32.dll_SelectObject
mov dword [esp + 0xc], eax
push 0xcc0020
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov eax, ebp
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
mov eax, ebp
mov edx, dword [eax]
call dword [edx + 0x2c]
push eax
push 0
push 0
mov eax, dword [esp + 0x24]
push eax
call sub.gdi32.dll_BitBlt
mov dword [esp + 0x18], 0x64
mov eax, dword [esp + 0x18]
shl eax, 4
add eax, 0x20
push eax
push 2
call sub.kernel32.dll_GlobalAlloc
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
push eax
call sub.kernel32.dll_GlobalLock
mov edi, eax
mov dword [edi], 0x20
mov dword [edi + 4], 1
xor eax, eax
mov dword [edi + 8], eax
xor eax, eax
mov dword [edi + 0xc], eax
push 0
push 0
push 0x7fffffff
push 0x7fffffff
lea eax, [edi + 0x10]
push eax
call sub.user32.dll_SetRect
mov eax, ebx
call fcn.00424da8
call fcn.00407780
mov byte [esp + 0x20], al
mov eax, ebx
call fcn.00424da8
call fcn.00407784
mov byte [esp + 0x21], al
mov eax, ebx
call fcn.00424da8
call fcn.00407788
mov byte [esp + 0x22], al
mov ebx, esi
mov edx, ebx
add dl, byte [esp + 0x20]
mov al, 0xff
call fcn.00477ffc
mov byte [esp + 0x23], al
mov edx, ebx
add dl, byte [esp + 0x21]
mov al, 0xff
call fcn.00477ffc
mov byte [esp + 0x24], al
mov edx, ebx
add dl, byte [esp + 0x22]
mov al, 0xff
call fcn.00477ffc
mov byte [esp + 0x25], al
mov eax, dword [esp + 0x78]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x6c]
dec eax
imul dword [esp + 0x70]
add dword [esp + 0x28], eax
mov eax, ebp
mov edx, dword [eax]
call dword [edx + 0x20]
dec eax
test eax, eax
jl 0x4783a1
inc eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], 0
or ebx, 0xffffffff
jmp 0x478379
inc ebx
mov dword [esp + 0x2c], ebx
mov esi, dword [esp + 0x28]
mov eax, ebx
shl eax, 2
add esi, eax
jmp 0x478274
mov eax, dword [esi]
call fcn.00407788
cmp al, byte [esp + 0x20]
jb 0x478270
cmp al, byte [esp + 0x23]
ja 0x478270
mov eax, dword [esi]
call fcn.00407784
cmp al, byte [esp + 0x21]
jb 0x478270
cmp al, byte [esp + 0x24]
ja 0x478270
mov eax, dword [esi]
call fcn.00407780
cmp al, byte [esp + 0x22]
jb 0x478270
cmp al, byte [esp + 0x25]
jbe 0x47827f
add esi, 4
inc ebx
mov eax, ebp
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp ebx, eax
jl 0x478237
cmp ebx, dword [esp + 0x2c]
jle 0x478379
mov eax, dword [edi + 8]
cmp eax, dword [esp + 0x18]
jb 0x4782c8
mov eax, dword [esp + 0x1c]
push eax
call sub.kernel32.dll_GlobalUnlock
add dword [esp + 0x18], 0x64
push 2
mov eax, dword [esp + 0x1c]
shl eax, 4
add eax, 0x20
push eax
mov eax, dword [esp + 0x24]
push eax
call sub.kernel32.dll_GlobalReAlloc
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
push eax
call sub.kernel32.dll_GlobalLock
mov edi, eax
mov eax, dword [edi + 8]
shl eax, 4
lea eax, [edi + eax + 0x20]
mov esi, dword [esp + 0x30]
inc esi
push esi
push ebx
mov edx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x38]
push edx
push eax
call sub.user32.dll_SetRect
mov eax, dword [edi + 0x10]
cmp eax, dword [esp + 0x2c]
jle 0x4782f9
mov eax, dword [esp + 0x2c]
mov dword [edi + 0x10], eax
mov eax, dword [edi + 0x14]
cmp eax, dword [esp + 0x30]
jle 0x478309
mov eax, dword [esp + 0x30]
mov dword [edi + 0x14], eax
cmp ebx, dword [edi + 0x18]
jle 0x478311
mov dword [edi + 0x10], ebx
cmp esi, dword [edi + 0x1c]
jle 0x478319
mov dword [edi + 0x1c], esi
inc dword [edi + 8]
cmp dword [edi + 8], 0x7d0
jne 0x478379
push edi
mov eax, dword [esp + 0x1c]
shl eax, 4
add eax, 0x20
push eax
push 0
call sub.gdi32.dll_ExtCreateRegion
mov esi, eax
cmp dword [esp], 0
je 0x47835a
push 2
push esi
mov eax, dword [esp + 8]
push eax
mov eax, dword [esp + 0xc]
push eax
call sub.gdi32.dll_CombineRgn
push esi
call sub.gdi32.dll_DeleteObject
jmp 0x47835d
mov dword [esp], esi
xor eax, eax
mov dword [edi + 8], eax
push 0
push 0
push 0x7fffffff
push 0x7fffffff
lea eax, [edi + 0x10]
push eax
call sub.user32.dll_SetRect
mov eax, ebp
mov edx, dword [eax]
call dword [edx + 0x2c]
lea edx, [ebx + 1]
cmp eax, edx
jg 0x478225
mov eax, dword [esp + 0x70]
sub dword [esp + 0x28], eax
inc dword [esp + 0x30]
dec dword [esp + 0x34]
jne 0x47821d
push edi
mov eax, dword [esp + 0x1c]
shl eax, 4
add eax, 0x20
push eax
push 0
call sub.gdi32.dll_ExtCreateRegion
mov esi, eax
cmp dword [esp], 0
je 0x4783d6
push 2
push esi
mov eax, dword [esp + 8]
push eax
mov eax, dword [esp + 0xc]
push eax
call sub.gdi32.dll_CombineRgn
push esi
call sub.gdi32.dll_DeleteObject
jmp 0x4783d9
mov dword [esp], esi
mov eax, dword [esp + 0x1c]
push eax
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [esp + 0xc]
push eax
call sub.gdi32.dll_SelectObject
mov eax, dword [esp + 8]
push eax
call sub.gdi32.dll_DeleteDC
mov eax, dword [esp + 0x10]
push eax
mov eax, dword [esp + 8]
push eax
call sub.gdi32.dll_SelectObject
push eax
call sub.gdi32.dll_DeleteObject
mov eax, dword [esp + 4]
push eax
call sub.gdi32.dll_DeleteDC
mov eax, dword [esp]
add esp, 0x7c
pop ebp
pop edi
pop esi
pop ebx
ret