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

Disassembly:
sub esp, 0x94
cmp dword [esp + 0x9c], 0
je 0x476349
mov eax, dword [esp + 0x98]
test eax, eax
je 0x476349
push ebx
push ebp
push esi
mov esi, dword [esp + 0xb0]
mov ebp, dword [esi]
mov ecx, dword [esi + 4]
push edi
push 0x6e
push eax
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x18], ecx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ebx, dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0
call ebx
mov edi, eax
test edi, edi
mov dword [esp + 0x14], edi
je 0x476339
mov eax, dword [esp + 0xac]
lea edx, [esp + 0x8c]
push edx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
mov ecx, dword [esi + 8]
sub ecx, dword [esi]
mov edx, dword [esi + 0xc]
sub edx, dword [esi + 4]
xor eax, eax
push eax
push eax
mov dword [esp + 0x5c], ecx
lea ecx, [esp + 0x80]
push ecx
mov dword [esp + 0x64], edx
push eax
lea edx, [esp + 0x60]
push edx
push edi
mov dword [esp + 0x68], 0x28
mov word [esp + 0x74], 1
mov word [esp + 0x76], 0x20
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov edi, eax
test edi, edi
je 0x47632e
mov eax, dword [esp + 0x14]
push edi
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x14]
push ecx
mov dword [esp + 0x30], eax
call ebx
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x24], ebx
je 0x476317
lea edx, [esp + 0x38]
push edx
push 0x18
push edi
call dword [sym.imp.GDI32.dll_GetObjectA]
mov eax, dword [esp + 0x44]
mov ecx, eax
and ecx, 0x80000003
jns 0x47615a
dec ecx
or ecx, 0xfffffffc
inc ecx
je 0x476178
lea esp, [esp]
add eax, 1
mov edx, eax
and edx, 0x80000003
jns 0x476172
dec edx
or edx, 0xfffffffc
inc edx
jne 0x476160
mov dword [esp + 0x44], eax
mov edi, dword [esp + 0x14]
push 3
push edi
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov eax, dword [esp + 0xac]
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push 0xcc0020
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0xbc]
mov ecx, dword [eax + 0xc]
sub ecx, dword [eax + 4]
mov edx, dword [eax + 8]
sub edx, dword [eax]
mov eax, dword [esi + 0xc]
sub eax, dword [esi + 4]
push ecx
mov ecx, dword [esi + 8]
sub ecx, dword [esi]
push edx
push 0
push 0
push ebx
push eax
push ecx
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_StretchBlt]
mov eax, dword [esp + 0x40]
lea edi, [eax - 1]
imul edi, dword [esp + 0x44]
add edi, dword [esp + 0x4c]
test eax, eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], 0
jle 0x476304
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x10], ecx
lea ebx, [ebx]
xor esi, esi
cmp dword [esp + 0x3c], esi
jle 0x4762e2
lea esp, [esp]
movzx ebx, byte [edi + esi*4 + 2]
xor edx, edx
mov dh, byte [edi + esi*4]
lea eax, [edi + esi*4]
mov dword [esp + 0x30], esi
mov dl, byte [eax + 1]
shl edx, 8
or edx, ebx
cmp edx, dword [esp + 0xb0]
mov dword [esp + 0x18], edx
je 0x4762cd
lea ebx, [ebx]
cmp esi, dword [esp + 0x3c]
jge 0x476261
movzx edi, byte [eax + 6]
xor ebx, ebx
mov bh, byte [eax + 4]
add eax, 4
add esi, 1
mov bl, byte [eax + 1]
shl ebx, 8
or ebx, edi
cmp ebx, edx
je 0x476240
mov edx, dword [esp + 0x30]
lea edi, [ecx + 1]
push edi
lea ebx, [esi + ebp]
push ebx
push ecx
add ebp, edx
push ebp
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov edx, dword [esp + 0x10]
push edi
push ebx
push edx
push ebp
mov dword [esp + 0x28], eax
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov ebx, dword [esp + 0x18]
mov edi, eax
mov eax, dword [esp + 0xa8]
push ebx
push edi
push eax
call dword [sym.imp.GDI32.dll_FillRgn]
push ebx
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
call ebx
push edi
call ebx
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
sub esi, 1
add esi, 1
cmp esi, dword [esp + 0x3c]
jl 0x476210
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
sub edi, dword [esp + 0x44]
add edx, 1
add ecx, 1
cmp edx, eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x10], ecx
jl 0x476200
mov ecx, dword [esp + 0x28]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
push edx
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x94
ret
xor eax, eax
add esp, 0x94
ret