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

Disassembly:
push 0xffffffffffffffff
push 0x617fa6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4e4
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x28]
call fcn.005f2c95
mov eax, dword [ebp + 0x1c]
xor esi, esi
push eax
mov dword [esp + 0x500], esi
call dword [sym.imp.USER32.dll_GetDC]
push eax
call fcn.005f2d37
mov ebx, eax
lea ecx, [esp + 0x98]
mov dword [esp + 0x60], ebx
call fcn.00424430
mov ecx, dword [esp + 0x508]
mov edx, dword [0x6a20f0]
mov byte [esp + 0x4fc], 1
mov eax, dword [edx + ecx*4 + 0x304]
mov ecx, dword [esp + 0x504]
cmp ecx, esi
mov dword [esp + 0x14], eax
je 0x503c56
cmp eax, esi
je 0x503c56
mov eax, dword [ebx + 4]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x54], eax
call fcn.005f2d4c
mov edx, dword [ebp + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [ebx + 8]
mov edi, dword [sym.imp.GDI32.dll_LPtoDP]
lea eax, [esp + 0x18]
push 2
push eax
push ecx
call edi
mov eax, dword [ebx + 8]
lea edx, [esp + 0x18]
push 2
push edx
push eax
call edi
mov edx, dword [esp + 0x18]
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x20]
push esi
sub ecx, edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x70], ecx
mov ecx, dword [esp + 0x20]
sub edx, ecx
lea eax, [esp + 0x68]
push esi
mov dword [esp + 0x78], edx
mov edx, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x74]
push esi
push ecx
push edx
mov dword [esp + 0x80], 0x28
mov word [esp + 0x8c], 1
mov word [esp + 0x8e], 0x18
mov dword [esp + 0x90], esi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
cmp eax, esi
mov dword [esp + 0x54], eax
je 0x50396e
push eax
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [ebx + 8]
push ecx
call dword [sym.imp.GDI32.dll_GetMapMode]
push eax
lea ecx, [esp + 0x2c]
call fcn.005f2fe0
mov eax, dword [ebx + 8]
lea edx, [esp + 0x38]
push edx
push eax
call dword [sym.imp.GDI32.dll_GetWindowExtEx]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
push ecx
push edx
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x34]
call dword [edx + 0x48]
mov ecx, dword [ebx + 8]
lea eax, [esp + 0x38]
push eax
push ecx
call dword [sym.imp.GDI32.dll_GetViewportExtEx]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x5c]
push eax
push ecx
lea ecx, [esp + 0x34]
call dword [edx + 0x40]
mov ecx, dword [ebx + 8]
lea eax, [esp + 0x18]
push 2
push eax
push ecx
call dword [sym.imp.GDI32.dll_DPtoLP]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push edx
lea ecx, [esp + 0x94]
push eax
push ecx
lea ecx, [esp + 0x34]
call fcn.005f314a
mov edx, dword [0x6a20f0]
lea ecx, [esp + 0x28]
mov eax, dword [edx + 0x118]
push eax
call fcn.005f2f26
mov eax, dword [ebp + 0xf8]
mov ecx, dword [ebp + 0xfc]
mov edx, dword [ebp + 0xf0]
mov esi, dword [ebp + 0xf4]
add edx, eax
add esi, ecx
test ebp, ebp
jne 0x503a3c
mov dword [esp + 0x10], ebp
jmp 0x503a43
mov edi, dword [ebp + 0x1c]
mov dword [esp + 0x10], edi
push ecx
push eax
push 2
sub esp, 0x10
mov edi, esp
mov dword [edi], eax
mov dword [edi + 4], ecx
lea ecx, [esp + 0x44]
push ecx
mov dword [edi + 8], edx
mov edx, dword [esp + 0x30]
push edx
mov dword [edi + 0xc], esi
mov esi, dword [esp + 0x38]
mov ecx, esi
call fcn.004570f0
mov esi, dword [esi + 0x28]
test esi, esi
je 0x503ac6
mov eax, esi
mov esi, dword [esi]
mov edi, dword [eax + 8]
mov eax, dword [edi + 4]
cmp eax, 0x28
ja case.0x503a8a.2
xor ecx, ecx
mov cl, byte [eax + 0x503ca8]
jmp dword [ecx*4 + 0x503c9c]
mov ecx, dword [edi + 0xac]
test ecx, ecx
je case.0x503a8a.2
mov edx, dword [ecx]
call dword [edx + 8]
test eax, eax
jne case.0x503a8a.2
test ebp, ebp
jne 0x503aac
xor eax, eax
jmp 0x503aaf
mov eax, dword [ebp + 0x1c]
mov edx, dword [edi]
lea ecx, [ebp + 0x40]
push 0
push ecx
lea ecx, [esp + 0x30]
push ecx
push eax
mov ecx, edi
call dword [edx + 0xc]
test esi, esi
jne 0x503a73
lea edx, [esp + 0x40]
mov ecx, ebp
push edx
call fcn.00504140
mov edi, dword [esp + 0x504]
mov ecx, edi
mov eax, dword [edi]
call dword [eax + 4]
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
sub ecx, esi
push 0x18
push ecx
mov ecx, dword [esp + 0x48]
sub edx, ecx
mov ecx, edi
push edx
call fcn.00424650
lea ecx, [esp + 0x98]
call fcn.00424550
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
sub eax, edx
push 0x18
sub ecx, esi
push eax
push ecx
lea ecx, [esp + 0xa4]
call fcn.00424650
mov al, byte [esp + 0x4c4]
test al, al
mov eax, dword [esp + 0x4cc]
jne 0x503b48
mov eax, dword [esp + 0x4c8]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x24]
sub edx, ecx
mov ecx, dword [esp + 0x30]
sub eax, esi
push edx
push eax
push 0
push 0
push ecx
call fcn.00507f7a
add esp, 0x18
test eax, eax
je 0x503c29
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x40]
sub eax, edx
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x44]
lea edx, [edx + edx*2]
lea eax, [eax + eax*2]
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
sub ecx, esi
sub eax, edx
test ecx, ecx
lea eax, [eax + eax*2]
mov dword [esp + 0x38], eax
jle 0x503c29
xor edx, edx
imul eax, esi
mov dword [esp + 0x14], ecx
jmp 0x503bc1
mov edi, dword [esp + 0x504]
mov cl, byte [esp + 0x4c4]
test cl, cl
mov ecx, dword [esp + 0x4cc]
jne 0x503bda
mov ecx, dword [esp + 0x4c8]
mov ebx, dword [esp + 0x58]
lea esi, [eax + ecx]
mov cl, byte [edi + 0x42c]
add esi, ebx
test cl, cl
je 0x503bf5
mov ecx, dword [edi + 0x434]
jmp 0x503bfb
mov ecx, dword [edi + 0x430]
lea edi, [edx + ecx]
mov ecx, dword [esp + 0x10]
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
mov edi, ebx
add eax, esi
add edx, edi
dec ecx
mov dword [esp + 0x14], ecx
jne 0x503bba
mov ebx, dword [esp + 0x60]
lea ecx, [esp + 0x28]
call fcn.005f2d83
mov eax, dword [esp + 0x54]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x50]
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edx, dword [ebx + 4]
mov eax, dword [ebp + 0x1c]
push edx
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
lea ecx, [esp + 0x98]
mov byte [esp + 0x4fc], 0
call fcn.004244f0
lea ecx, [esp + 0x28]
mov dword [esp + 0x4fc], 0xffffffff
call fcn.005f2dca
mov ecx, dword [esp + 0x4f4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x4f0
ret 8