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

Disassembly:
sub esp, 0x7c
mov eax, dword [esp + 0x84]
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.USER32.dll_CopyRect]
mov ebp, dword [esp + 0x90]
push ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebx, eax
mov edx, dword [esp + 0x28]
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x64]
push 0
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
sub eax, ecx
push 0
push 0
lea ecx, [esp + 0x6c]
push 0
sub edx, edi
push ecx
push ebp
mov dword [esp + 0x78], 0x28
mov dword [esp + 0x7c], edx
mov dword [esp + 0x80], eax
mov word [esp + 0x84], 1
mov word [esp + 0x86], 0x20
mov dword [esp + 0x88], 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebp, dword [sym.imp.GDI32.dll_SelectObject]
mov edi, eax
push edi
push ebx
mov dword [esp + 0x1c], edi
call ebp
push 0
lea ecx, [esi + 0x24]
mov dword [esp + 0x20], eax
call fcn.004ed0e0
push eax
push ebx
call ebp
push 1
push ebx
mov dword [esp + 0x20], eax
call dword [sym.imp.GDI32.dll_SetBkMode]
lea edx, [esp + 0x20]
mov ecx, esi
push edx
push ebx
call fcn.00503480
push 0
mov ecx, esi
call fcn.00501490
test eax, eax
je 0x5033ad
push ebx
call dword [sym.imp.GDI32.dll_SaveDC]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x40]
push eax
mov ecx, esi
call fcn.00503c30
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x44]
push edx
push eax
push ecx
push ebx
call dword [sym.imp.GDI32.dll_IntersectClipRect]
mov edx, dword [esi + 0x2830]
xor edi, edi
dec edx
js 0x503304
xor eax, eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x34], eax
push ecx
mov dword [esp + 0x3c], eax
push edi
mov ecx, esi
mov dword [esp + 0x38], 0
mov dword [esp + 0x44], eax
call fcn.00501800
push eax
mov ecx, esi
call fcn.00506080
mov eax, dword [esp + 0x94]
xor edx, edx
mov dword [esp + 0x54], edx
lea ecx, [esp + 0x30]
mov dword [esp + 0x58], edx
push eax
mov dword [esp + 0x60], edx
lea edx, [esp + 0x54]
push ecx
push edx
mov dword [esp + 0x5c], 0
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x5032f8
lea eax, [esp + 0x30]
mov ecx, esi
push eax
push edi
push ebx
call fcn.00503550
mov ecx, dword [esi + 0x2830]
inc edi
dec ecx
cmp edi, ecx
jle 0x50328d
mov ecx, esi
call fcn.00501df0
mov edi, eax
cmp edi, 0xffffffff
je 0x50338d
cmp edi, dword [esi + 0x296c]
jl 0x50338d
cmp edi, dword [esi + 0x2970]
jg 0x50338d
xor edx, edx
lea eax, [esp + 0x30]
mov dword [esp + 0x34], edx
push eax
mov dword [esp + 0x3c], edx
push edi
mov ecx, esi
mov dword [esp + 0x38], 0
mov dword [esp + 0x44], edx
call fcn.00501800
push eax
mov ecx, esi
call fcn.00506080
mov edx, dword [esp + 0x94]
xor ecx, ecx
mov dword [esp + 0x54], ecx
lea eax, [esp + 0x30]
mov dword [esp + 0x58], ecx
push edx
mov dword [esp + 0x60], ecx
lea ecx, [esp + 0x54]
push eax
push ecx
mov dword [esp + 0x5c], 0
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x50338d
lea edx, [esp + 0x30]
mov ecx, esi
push edx
push edi
push ebx
call fcn.00503550
mov eax, dword [esp + 0x10]
push eax
push ebx
call dword [sym.imp.GDI32.dll_RestoreDC]
push ebx
mov ecx, esi
call fcn.005035a0
push ebx
mov ecx, esi
call fcn.00503410
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
push 0xcc0020
push 0
push 0
sub ecx, eax
push ebx
push ecx
mov ecx, dword [esp + 0x34]
sub edx, ecx
push edx
push eax
mov eax, dword [esp + 0xac]
push ecx
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov ecx, dword [esp + 0x18]
push ecx
push ebx
call ebp
mov edx, dword [esp + 0x1c]
push edx
push ebx
call ebp
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret 8