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

Disassembly:
push 0xffffffffffffffff
push 0x617406
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.005f23a9
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.005f244b
mov ebx, eax
lea ecx, [esp + 0x98]
mov dword [esp + 0x60], ebx
call fcn.00424700
mov ecx, dword [esp + 0x508]
mov edx, dword [0x6a1210]
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 0x503366
cmp eax, esi
je 0x503366
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.005f2460
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 0x50307e
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.005f26f4
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.005f285e
mov edx, dword [0x6a1210]
lea ecx, [esp + 0x28]
mov eax, dword [edx + 0x118]
push eax
call fcn.005f263a
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 0x50314c
mov dword [esp + 0x10], ebp
jmp 0x503153
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.00456fe0
mov esi, dword [esi + 0x28]
test esi, esi
je 0x5031d6
mov eax, esi
mov esi, dword [esi]
mov edi, dword [eax + 8]
mov eax, dword [edi + 4]
cmp eax, 0x28
ja case.0x50319a.2
xor ecx, ecx
mov cl, byte [eax + 0x5033b8]
jmp dword [ecx*4 + 0x5033ac]
mov ecx, dword [edi + 0xac]
test ecx, ecx
je case.0x50319a.2
mov edx, dword [ecx]
call dword [edx + 8]
test eax, eax
jne case.0x50319a.2
test ebp, ebp
jne 0x5031bc
xor eax, eax
jmp 0x5031bf
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 0x503183
lea edx, [esp + 0x40]
mov ecx, ebp
push edx
call fcn.00503850
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.00424920
lea ecx, [esp + 0x98]
call fcn.00424820
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.00424920
mov al, byte [esp + 0x4c4]
test al, al
mov eax, dword [esp + 0x4cc]
jne 0x503258
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.00507695
add esp, 0x18
test eax, eax
je 0x503339
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 0x503339
xor edx, edx
imul eax, esi
mov dword [esp + 0x14], ecx
jmp 0x5032d1
mov edi, dword [esp + 0x504]
mov cl, byte [esp + 0x4c4]
test cl, cl
mov ecx, dword [esp + 0x4cc]
jne 0x5032ea
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 0x503305
mov ecx, dword [edi + 0x434]
jmp 0x50330b
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 0x5032ca
mov ebx, dword [esp + 0x60]
lea ecx, [esp + 0x28]
call fcn.005f2497
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.004247c0
lea ecx, [esp + 0x28]
mov dword [esp + 0x4fc], 0xffffffff
call fcn.005f24de
mov ecx, dword [esp + 0x4f4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x4f0
ret 8