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

Disassembly:
push 0xffffffffffffffff
push 0x5f17f2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb8
push ebx
mov ebx, dword [esp + 0xcc]
push ebp
mov ebp, ecx
push esi
mov esi, dword [esp + 0xd8]
mov eax, dword [ebp + 0x16c]
test eax, eax
mov dword [esp + 0x58], eax
jl 0x508ddf
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x508ddf
cmp eax, dword [ebx + 0x170]
jl 0x50934f
push edi
lea edi, [ebp + 0x14]
mov eax, edi
mov ecx, dword [eax]
mov dword [esp + 0x30], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x34], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x38], ecx
mov ecx, ebx
mov edx, dword [eax + 0xc]
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x40], edx
call fcn.004bf870
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edx, dword [esi]
push eax
lea eax, [esp + 0x50]
push ecx
push eax
mov ecx, esi
call dword [edx + 0x3c]
push 1
mov ecx, esi
call fcn.005cb157
mov edx, dword [esi]
push 5
mov ecx, esi
mov dword [esp + 0x7c], eax
call dword [edx + 0x24]
mov dword [esp + 0x74], eax
mov eax, dword [0x1e4e354]
test eax, eax
je 0x50904e
mov eax, dword [ebp + 0xac]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x50904e
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebp
call fcn.00513f70
mov edx, dword [eax]
mov dword [esp + 0xd0], 0
mov eax, dword [edx - 8]
test eax, eax
je 0x508ee0
push 0x1df4db0
lea ecx, [esp + 0x28]
call fcn.005c38fd
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1c]
mov ecx, ebp
push eax
mov byte [esp + 0xd4], 1
call fcn.00513f70
mov ecx, dword [esp + 0x20]
mov eax, dword [eax]
mov ecx, dword [ecx]
push ecx
push eax
call fcn.004ac754
add esp, 8
lea ecx, [esp + 0x1c]
test eax, eax
sete byte [esp + 0x13]
call fcn.005c388f
lea ecx, [esp + 0x24]
mov byte [esp + 0xd0], 0
call fcn.005c388f
mov al, byte [esp + 0x13]
mov byte [esp + 0x13], 0
test al, al
je 0x508ee5
mov byte [esp + 0x13], 1
lea ecx, [esp + 0x28]
mov dword [esp + 0xd0], 0xffffffff
call fcn.005c388f
mov al, byte [esp + 0x13]
test al, al
je 0x50904e
mov eax, dword [ebx + 0x20c]
test eax, eax
jne 0x50904e
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x50904e
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x34]
sub ecx, edx
xor edx, edx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], edx
mov edx, dword [esi]
sub eax, edi
mov dword [esp + 0x54], ecx
push 0xc0c0c0
mov ecx, esi
mov dword [esp + 0x5c], eax
call dword [edx + 0x30]
push 1
mov ecx, esi
mov dword [esp + 0x24], eax
call fcn.005cb157
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
mov ecx, ebx
mov dword [esp + 0x1c], 0x2b
call fcn.004bf7f0
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x8c]
mov dword [esp + 0x48], eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x44], 0x1d937e0
mov dword [esp + 0x8c], ecx
lea edx, [esp + 0x8c]
mov dword [esp + 0xd0], 2
push edx
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
push eax
lea ecx, [esp + 0x48]
call fcn.005cbbac
mov eax, dword [esi]
lea ecx, [esp + 0x44]
push ecx
mov ecx, esi
call dword [eax + 0x28]
mov ecx, dword [esp + 0x50]
mov edi, eax
mov eax, dword [esp + 0x58]
mov ebp, dword [ebp + 0xac]
sub eax, ecx
push 5
cdq
sub eax, edx
mov ebx, eax
mov eax, dword [esp + 0x1c]
cdq
sub eax, edx
mov edx, dword [esp + 0x1c]
sar ebx, 1
sar eax, 1
sub ebx, eax
add ecx, ebx
mov dword [esp + 0x54], ecx
add ecx, edx
mov edx, dword [esi]
mov dword [esp + 0x5c], ecx
mov eax, dword [ebp - 8]
lea ecx, [esp + 0x50]
push ecx
push eax
push ebp
mov ecx, esi
call dword [edx + 0x68]
mov eax, dword [esp + 0x20]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x30]
mov ecx, dword [esp + 0x1c]
push ecx
mov ecx, esi
call fcn.005cb157
mov edx, dword [esi]
push edi
mov ecx, esi
call dword [edx + 0x28]
mov dword [esp + 0x44], vtable.CGdiObject.0
mov dword [esp + 0xd0], 3
lea ecx, [esp + 0x44]
jmp 0x50930c
mov eax, dword [ebp + 0xf0]
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x9c]
push ecx
mov ecx, ebx
mov dword [esp + 0x18], eax
call fcn.004bf7f0
mov eax, dword [ebp + 0x98]
lea edx, [esp + 0x28]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0xa0]
push edx
mov ecx, ebx
mov dword [esp + 0x28], eax
call fcn.004bf7f0
lea eax, [esp + 0x24]
mov ecx, ebx
push eax
call fcn.004bf7f0
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 4]
mov edi, dword [esp + 0x20]
sub eax, ecx
test edi, edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x40], eax
jle 0x5090e2
mov eax, dword [ebp + 0x16c]
test eax, eax
jl 0x5090e2
mov ecx, ebp
call fcn.00515cf0
mov ecx, eax
mov eax, dword [esp + 0x2c]
cmp eax, dword [ecx + 0x20]
jle 0x5090d4
mov dword [esp + 0x40], eax
jmp 0x5090e2
mov ecx, ebp
call fcn.00515cf0
mov edx, dword [eax + 0x20]
mov dword [esp + 0x40], edx
mov eax, dword [ebp + 0xb4]
lea ecx, [esp + 0x4c]
push eax
push 1
push 0
call fcn.005cbc19
lea ecx, [esp + 0x4c]
mov dword [esp + 0xd0], 4
push ecx
mov ecx, esi
call fcn.005cb07b
mov dword [esp + 0x44], eax
mov eax, dword [esi + 0xc]
test eax, eax
mov dword [esp + 0x18], 0
je 0x509138
mov edx, dword [esp + 0x5c]
mov eax, dword [ebx + 0x170]
cmp edx, eax
jne 0x509138
mov eax, dword [ebx + 0x174]
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], edi
jge 0x50923b
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, ebp
call fcn.0050ced0
mov edx, dword [ebp + 0x14]
mov edi, eax
mov eax, dword [ebp + 0x1c]
xor ecx, ecx
sub eax, edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], edx
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x14]
neg eax
neg ecx
push eax
lea eax, [esp + 0x68]
push ecx
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
mov dword [esp + 0x84], edx
mov edx, dword [esp + 0x70]
push esi
mov dword [esp + 0x8c], edx
lea edx, [edi + 0x84]
push ebx
mov dword [edx], eax
mov eax, dword [esp + 0x8c]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x90]
mov dword [edx + 8], eax
mov dword [edx + 0xc], ecx
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0xe4]
mov eax, dword [ebp + 0xb0]
mov edi, dword [edi + 0x20]
test eax, eax
mov dword [esp + 0x14], edi
je 0x509226
cmp edi, dword [esp + 0x2c]
jg 0x509226
lea eax, [esp + 0x14]
mov ecx, ebx
push eax
call fcn.004bf7f0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
inc ecx
lea eax, [esp + 0x5c]
push ecx
push edx
push eax
mov ecx, esi
call fcn.005cb5fa
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x38]
mov edi, dword [esp + 0x24]
inc ecx
push ecx
mov ecx, dword [esp + 0x34]
sub edx, edi
sub edx, ecx
mov ecx, esi
push edx
call fcn.005cb646
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x509142
mov eax, dword [ebp + 0x134]
push eax
call fcn.00543b80
lea ecx, [eax + 5]
mov eax, 0x66666667
imul ecx
sar edx, 2
mov ecx, edx
add esp, 4
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [ebp + 0xd8]
add edx, ecx
mov ecx, ebx
mov dword [esp + 0x1c], edx
lea edx, [esp + 0x1c]
push edx
call fcn.004bf7f0
lea eax, [esp + 0x2c]
mov ecx, ebx
push eax
call fcn.004bf7f0
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov ecx, dword [ebp + 0xb0]
add eax, edx
test ecx, ecx
mov dword [esp + 0x14], eax
je 0x5092e9
cmp eax, dword [esp + 0x2c]
jg 0x5092e9
mov ecx, dword [esp + 0x28]
inc eax
push eax
lea edx, [esp + 0x60]
push ecx
push edx
mov ecx, esi
call fcn.005cb5fa
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x30]
inc eax
push eax
mov eax, dword [esp + 0x28]
sub ecx, eax
sub ecx, ebx
push ecx
mov ecx, esi
call fcn.005cb646
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov ecx, dword [ebp + 0xb0]
add eax, edx
test ecx, ecx
mov dword [esp + 0x14], eax
jne 0x50929a
mov edx, dword [esp + 0x44]
mov ecx, esi
push edx
call fcn.005cb07b
mov dword [esp + 0x4c], vtable.CGdiObject.0
mov dword [esp + 0xd0], 5
lea ecx, [esp + 0x4c]
call fcn.005cbc03
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov eax, dword [esi]
mov dword [esp + 0xd0], 0xffffffff
neg ecx
push ecx
lea ecx, [esp + 0x60]
neg edx
push edx
push ecx
mov ecx, esi
call dword [eax + 0x3c]
mov edx, dword [esp + 0x74]
mov ecx, esi
push edx
call fcn.005cb07b
mov eax, dword [esp + 0x78]
mov ecx, esi
push eax
call fcn.005cb157
pop edi
mov ecx, dword [esp + 0xc4]
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xc4
ret 8