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

Disassembly:
sub esp, 0x64
push edi
mov edi, ecx
mov eax, dword [edi + 0x104]
test eax, eax
je 0x5013bc
mov eax, dword [edi + 8]
push ebx
push ebp
push esi
push eax
call dword [sym.imp.USER32.dll_GetDC]
mov ecx, dword [esp + 0x78]
lea edx, [esp + 0x54]
mov ebx, eax
push ecx
push edx
mov dword [esp + 0x48], ebx
call dword [sym.imp.USER32.dll_CopyRect]
push 0
mov ecx, edi
call fcn.004f9350
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push 1
push ebx
mov dword [esp + 0x50], eax
call dword [sym.imp.GDI32.dll_SetBkMode]
lea eax, [esp + 0x54]
mov ecx, edi
push eax
call fcn.00505320
mov edx, dword [esp + 0x54]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x5c]
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x34], eax
sub eax, edx
mov ecx, dword [edi + 0x11c]
cdq
mov esi, eax
mov eax, dword [esp + 0x60]
sub eax, ebp
mov ebp, dword [edi + 0x118]
mov dword [esp + 0x30], eax
xor esi, edx
mov dword [esp + 0x14], ecx
xor eax, eax
mov ecx, edi
sub esi, edx
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
call fcn.005036e0
sub esi, ebp
sub esi, eax
mov dword [esp + 0x18], esi
jns 0x500d03
mov dword [esp + 0x18], 0
cmp word [edi + 0x3b4], 0
lea eax, [edi + 0x3b4]
je 0x500d71
mov edx, dword [edi + 0x470]
lea ecx, [esp + 0x64]
neg edx
sbb edx, edx
and edx, 0x800
or edx, 0x424
push edx
push ecx
push 0xffffffffffffffff
push eax
push ebx
call dword [sym.imp.USER32.dll_DrawTextW]
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x58]
sub eax, ecx
mov ecx, dword [esp + 0x54]
inc edx
add eax, ecx
mov dword [edi + 0x434], edx
mov edx, dword [esp + 0x60]
mov dword [edi + 0x438], eax
add eax, 4
mov dword [edi + 0x430], ecx
mov dword [edi + 0x43c], edx
mov dword [esp + 0x54], eax
mov ecx, dword [edi + 0x690]
test ecx, ecx
je 0x500d97
call fcn.00494650
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x500d97
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x58]
mov esi, eax
sub esi, edx
cmp ecx, esi
jle 0x500da3
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x58]
mov ecx, eax
sub ecx, edx
sub eax, ecx
sub eax, edx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x38], eax
add eax, ecx
mov ecx, edi
mov dword [esp + 0x3c], eax
call fcn.004f9370
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x104]
xor edx, edx
test eax, eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x2c], edx
jle 0x501374
mov ecx, dword [edi + 0x100]
mov ecx, dword [ecx + edx*4]
mov esi, ecx
shl esi, 7
add esi, ecx
mov ecx, dword [edi + 0xfc]
lea esi, [ecx + esi*4]
test byte [esi + 0x44], 8
jne 0x501361
push esi
mov ecx, edi
call fcn.00505610
test eax, eax
je 0x500e38
push esi
lea edx, [esp + 0x50]
push ebx
push edx
mov ecx, edi
call fcn.00505680
mov ecx, dword [eax]
mov ebp, ecx
mov eax, dword [eax + 4]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], eax
mov eax, dword [edi + 0xe0]
cmp eax, 0xffffffff
je 0x500e3e
cmp ecx, eax
jl 0x500e3e
mov ebp, eax
jmp 0x500e3a
xor ebp, ebp
mov dword [esp + 0x24], ebp
mov eax, dword [esi + 0x48]
mov ebx, dword [esi + 0x4c]
test al, 1
mov dword [esp + 0x10], ebx
je 0x500e94
cmp ebx, 0xffffffff
jne 0x500e6c
mov ecx, dword [edi + 0x698]
xor ebx, ebx
test ecx, ecx
mov dword [esp + 0x10], ebx
je 0x500e6c
call fcn.00494650
mov ebx, dword [eax]
mov dword [esp + 0x10], ebx
test byte [esi + 0x48], 0x10
je 0x500e85
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x18]
add edx, ecx
mov dword [esp + 0x5c], edx
jmp 0x500fec
mov eax, dword [esp + 0x54]
add ebx, eax
mov dword [esp + 0x5c], ebx
jmp 0x500ff4
test eax, 0x100000
je 0x500f04
mov ecx, dword [edi + 0x684]
xor eax, eax
test ecx, ecx
mov dword [esp + 0x10], eax
je 0x500eb0
mov eax, dword [ecx + 0x14]
jmp 0x500ec0
mov ecx, dword [edi + 0x688]
test ecx, ecx
je 0x500ec4
mov eax, dword [edi + 0x6ac]
mov dword [esp + 0x10], eax
mov ecx, dword [esi + 0x1a4]
test ecx, ecx
je 0x500ed7
call fcn.00494650
mov eax, dword [eax]
jmp 0x500ee0
mov ecx, dword [esi + 0x50]
test ecx, ecx
je 0x500ee4
mov eax, ebx
mov dword [esp + 0x10], eax
mov ecx, dword [edi + 0x128]
mov edx, dword [esp + 0x14]
lea ecx, [ecx + edx*2]
add ecx, eax
mov eax, dword [esp + 0x54]
add ecx, ebp
add ecx, eax
mov dword [esp + 0x5c], ecx
jmp 0x500ff4
mov eax, dword [edi + 0x684]
test eax, eax
je 0x500f13
mov ebx, dword [eax + 0x14]
jmp 0x500f23
mov eax, dword [edi + 0x688]
test eax, eax
je 0x500f27
mov ebx, dword [edi + 0x6ac]
mov dword [esp + 0x10], ebx
mov eax, dword [edi + 0xdc]
test eax, eax
je 0x500f54
cmp dword [esi + 0x1e8], 0xffffffff
jne 0x500f5a
mov eax, dword [esi + 0x50]
test eax, eax
jne 0x500f5a
mov ecx, dword [esi + 0x1a4]
test ecx, ecx
je 0x500f54
call fcn.00494590
test eax, eax
jne 0x500f5a
xor ebx, ebx
mov dword [esp + 0x10], ebx
mov eax, dword [edi + 0x450]
cmp eax, 1
je 0x500f9b
cmp eax, 2
je 0x500f9b
cmp eax, 3
jne 0x500f86
test ebx, ebx
jle 0x500f86
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x54]
lea eax, [ebx + edx*2]
add eax, ecx
mov dword [esp + 0x5c], eax
jmp 0x500fac
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x54]
lea edx, [ebx + ecx*2]
add edx, ebp
add edx, eax
mov dword [esp + 0x5c], edx
jmp 0x500fac
mov eax, dword [esp + 0x14]
lea ecx, [ebx + eax*2]
mov eax, dword [esp + 0x54]
add ecx, eax
mov dword [esp + 0x5c], ecx
push esi
mov ecx, edi
call fcn.00505610
test eax, eax
je 0x500fc8
mov edx, dword [edi + 0x128]
mov eax, dword [esp + 0x5c]
add eax, edx
mov dword [esp + 0x5c], eax
test byte [esi + 0x48], 0x10
je 0x500ff4
mov eax, dword [esp + 0x18]
mov ebx, dword [edi + 0x6b4]
mov edx, dword [edi + 0x454]
mov ecx, dword [esp + 0x5c]
sub eax, ebx
sub eax, edx
add ecx, eax
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x18], 0
lea ecx, [esp + 0x54]
lea ebp, [esi + 0x1a8]
push ecx
push ebp
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [edi + 0x684]
xor ebx, ebx
test eax, eax
je 0x501017
mov ebx, dword [eax + 0x18]
jmp 0x501035
mov eax, dword [edi + 0x688]
test eax, eax
je 0x501029
mov ebx, dword [edi + 0x6b0]
jmp 0x501035
mov eax, dword [esi + 0x50]
test eax, eax
je 0x501035
mov ebx, 0x10
mov ecx, dword [esi + 0x1a4]
test ecx, ecx
je 0x501047
call fcn.00494650
mov ebx, dword [eax + 4]
mov eax, dword [edi + 0x460]
cmp eax, 1
jne 0x50106a
mov edx, dword [esi + 0x1ac]
mov ecx, dword [edi + 0x464]
add edx, ecx
add edx, ebx
mov dword [esi + 0x1b4], edx
jmp 0x501085
cmp eax, 2
jne 0x501085
mov eax, dword [esi + 0x1b4]
mov edx, dword [edi + 0x464]
sub eax, edx
sub eax, ebx
mov dword [esi + 0x1ac], eax
test ebx, ebx
jle 0x501281
mov ecx, dword [edi + 0x450]
test ecx, ecx
je 0x501174
cmp ecx, 3
je 0x501174
cmp dword [edi + 0x74], 2
je 0x501174
mov eax, dword [esi + 0x48]
test al, 0x40
jne 0x5010be
test ah, 1
je 0x501174
cmp ecx, 2
jne 0x5010cb
mov dword [esp + 0x20], 0
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x20]
sub eax, ebx
sub eax, edx
cdq
sub eax, edx
mov edx, dword [esp + 0x58]
mov ebp, eax
lea eax, [esi + 0x1a8]
sar ebp, 1
add ebp, edx
push eax
lea ecx, [ebx + ebp]
lea ebx, [esi + 0x1c8]
push ebx
mov dword [esp + 0x24], ecx
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx]
mov edx, dword [esp + 0x1c]
add ecx, eax
mov dword [ebx], ecx
mov ebx, ecx
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x1d4], edx
lea eax, [esi + 0x1a8]
lea edx, [esi + 0x1b8]
add ebx, ecx
push eax
push edx
mov dword [esi + 0x1cc], ebp
mov dword [esi + 0x1d0], ebx
call dword [sym.imp.USER32.dll_CopyRect]
cmp dword [edi + 0x450], 2
jne 0x501159
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x1bc], ebp
mov dword [esi + 0x1c4], eax
jmp 0x5012b2
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x1bc], eax
add eax, ecx
mov dword [esi + 0x1c4], eax
jmp 0x5012b2
mov eax, dword [esp + 0x30]
lea ecx, [esi + 0x1a8]
sub eax, ebx
push ecx
cdq
sub eax, edx
mov ebp, eax
mov eax, dword [esp + 0x5c]
sar ebp, 1
add ebp, eax
lea eax, [esi + 0x1c8]
push eax
lea edx, [ebx + ebp]
mov dword [esp + 0x24], edx
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [edi + 0x460]
cmp eax, 1
jne 0x5011b5
xor ebp, ebp
mov dword [esp + 0x1c], ebx
jmp 0x5011c6
cmp eax, 2
jne 0x5011c6
mov ebp, dword [esi + 0x1b4]
mov dword [esp + 0x1c], ebp
sub ebp, ebx
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x1c8]
mov eax, dword [esp + 0x1c]
lea ebx, [esi + 0x1c8]
add edx, ecx
mov dword [esi + 0x1d4], eax
mov dword [ebx], edx
mov eax, edx
mov edx, dword [esp + 0x10]
mov dword [esi + 0x1cc], ebp
add eax, edx
lea ebp, [esi + 0x1b8]
mov dword [esi + 0x1d0], eax
lea eax, [esi + 0x1a8]
push eax
push ebp
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esp + 0x14]
mov edx, dword [esi + 0x1c0]
sub edx, eax
mov dword [esi + 0x1c0], edx
mov ecx, dword [edi + 0x450]
cmp ecx, 3
mov eax, edx
jne 0x501278
mov eax, dword [esi + 0x48]
test ah, 1
jne 0x501258
push ebx
push ebp
call dword [sym.imp.USER32.dll_CopyRect]
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x1c0]
mov eax, dword [ebp]
sub edx, ecx
add eax, 0x1e
mov dword [esi + 0x1c0], edx
mov dword [ebp], eax
jmp 0x5012b2
lea eax, [esi + 0x1a8]
push eax
push ebp
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x1bc], eax
mov dword [esi + 0x1c4], eax
jmp 0x5012b2
sub eax, dword [esp + 0x24]
mov dword [ebp], eax
jmp 0x5012b2
lea eax, [esi + 0x1c8]
xor edx, edx
lea ebx, [esi + 0x1b8]
push ebp
mov dword [eax], edx
push ebx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
call dword [sym.imp.USER32.dll_CopyRect]
mov ecx, dword [esp + 0x14]
push 0
neg ecx
push ecx
push ebx
call dword [sym.imp.USER32.dll_InflateRect]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x54]
cmp eax, edx
jle 0x5012dd
cmp dword [edi + 0xe8], 0xffffffff
jne 0x5012d1
mov eax, dword [esp + 0x2c]
mov dword [edi + 0xe8], eax
mov dword [esi + 0x1a0], 0
jmp 0x5012e7
mov dword [esi + 0x1a0], 1
mov eax, dword [esi + 0x48]
test al, 8
je 0x501303
mov eax, dword [edi + 0x46c]
test eax, eax
je 0x50131f
mov eax, dword [esi + 0x1b0]
add eax, 0xa
jmp 0x501319
test ah, 0x10
je 0x50131f
mov ecx, dword [edi + 0x11c]
mov eax, dword [esi + 0x1b0]
add ecx, 0xb
add eax, ecx
mov dword [esi + 0x1b0], eax
lea eax, [esi + 0x1a8]
lea edx, [esi + 0x1d8]
push eax
push edx
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x40]
mov dword [esi + 0x1dc], eax
mov eax, dword [esi + 0x1b0]
mov dword [esi + 0x1e4], ecx
mov ecx, dword [edi + 0x118]
add eax, ecx
mov dword [esp + 0x54], eax
mov ecx, dword [edi + 0x104]
inc edx
cmp edx, ecx
mov dword [esp + 0x2c], edx
jl 0x500dd9
mov edx, dword [esp + 0x44]
add eax, edx
mov dword [edi + 0x124], eax
lea eax, [edi + 0xed8]
mov ecx, eax
mov eax, dword [esp + 0x78]
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov eax, dword [eax + 0xc]
mov dword [ecx + 0xc], eax
mov ecx, dword [esp + 0x48]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [edi + 8]
push ebx
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x64
ret 4