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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
mov edi, dword [ebp + 8]
mov eax, dword [ebx + 0x6c]
movzx edx, byte [eax + 0x44]
mov byte [ebp - 0x11], dl
mov edx, dword [eax + 0x48]
sub dword [ebp + 0x10], edx
sub dword [ebp + 0xc], edx
cmp byte [ebp - 0x11], 0
je 0x5118ab
mov eax, dword [ebx + 0x60]
mov dword [ebp - 8], eax
mov eax, dword [ebx + 0x60]
mov edx, dword [0x432388]
call fcn.00404cc4
test al, al
je 0x5118a4
mov eax, dword [ebx + 0x68]
mov dword [ebp - 0xc], eax
jmp 0x5118ba
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x5118ba
mov eax, dword [0x5d56b8]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 0xc], eax
cmp byte [ebp - 0x11], 0
je 0x5118dc
mov eax, dword [0x5d59a8]
mov eax, dword [eax]
cmp eax, dword [ebp - 8]
je 0x5118dc
mov eax, dword [0x5d56b8]
mov eax, dword [eax]
cmp eax, dword [ebp - 8]
je 0x5118dc
xor eax, eax
jmp 0x5118de
mov al, 1
mov byte [ebp - 0x12], al
mov dl, 1
mov eax, dword [esi + 0x14]
call fcn.00433e3c
mov edx, 8
mov eax, dword [esi + 0xc]
call fcn.004337c4
mov edx, 0x511dc8
mov eax, dword [esi + 0xc]
call fcn.0043374c
cmp byte [ebp - 0x12], 0
je 0x511914
mov dword [ebp - 0x18], 4
jmp 0x511919
xor eax, eax
mov dword [ebp - 0x18], eax
cmp byte [ebx + 0x10], 2
jne 0x511948
mov eax, dword [edi + 0x34]
add eax, dword [ebp + 0xc]
mov edx, dword [edi + 0x28]
sar edx, 1
jns 0x51192f
adc edx, 0
sub eax, edx
mov edx, dword [ebx + 8]
sub edx, dword [ebx + 0x20]
add edx, dword [ebx + 0x24]
sar edx, 1
jns 0x511941
adc edx, 0
sub eax, edx
mov dword [ebp - 0x10], eax
jmp 0x51194d
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
mov dword [ebx + 0x44], eax
movzx eax, byte [ebx + 0x10]
dec al
je 0x511968
dec al
je 0x511973
dec eax
sub al, 2
jb 0x51197b
sub al, 2
jae 0x511987
mov eax, dword [ebp + 0x10]
add eax, dword [ebx + 0x20]
mov dword [ebx + 0x40], eax
jmp 0x511987
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x40], eax
jmp 0x511987
mov eax, dword [ebp + 0xc]
sub eax, dword [ebx + 8]
sub eax, dword [ebx + 0x24]
mov dword [ebx + 0x40], eax
cmp byte [ebx + 0x73], 0
je 0x511993
inc dword [ebx + 0x44]
inc dword [ebx + 0x40]
cmp byte [ebp - 0x12], 0
je 0x5119a5
cmp dword [ebx + 0x50], 0x18
jl 0x5119c3
cmp dword [ebx + 0x54], 0x18
jl 0x5119c3
mov eax, dword [ebx + 0x40]
add eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebx + 0x44]
add ecx, dword [ebp - 0x18]
mov edx, esi
mov eax, ebx
call fcn.005115a0
mov eax, dword [ebx + 0x6c]
mov eax, dword [eax + 0x48]
add dword [ebx + 0x40], eax
push 0
mov eax, esi
call fcn.00434aa8
push eax
call sub.gdi32.dll_SetTextAlign
cmp byte [ebp - 0x12], 0
je 0x511b39
cmp byte [ebx + 0x73], 0
jne 0x511b39
mov eax, dword [edi + 0x1c]
mov edx, dword [eax + 0x18]
mov eax, dword [esi + 0xc]
call fcn.00433464
movzx eax, byte [ebx + 0x10]
dec al
je 0x511a1a
dec al
je 0x511a81
dec eax
sub al, 2
jb 0x511ad7
sub al, 2
jae 0x511b39
cmp dword [ebx + 0x38], 0
je 0x511a50
mov edx, dword [ebp - 4]
add edx, dword [ebx + 0x54]
sub edx, 2
push edx
mov edx, dword [ebp + 0x10]
add edx, dword [ebx + 0x50]
dec edx
mov eax, dword [ebx + 0x20]
add edx, eax
push edx
mov edx, dword [ebx + 0x38]
push edx
mov ecx, dword [ebp + 0x10]
add ecx, dword [ebp - 0x18]
add ecx, eax
mov edx, dword [ebp - 4]
add edx, 0x18
mov eax, esi
call fcn.005344c8
mov edx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x20]
add edx, eax
push edx
mov edx, dword [ebp - 4]
add edx, dword [ebx + 0x54]
dec edx
push edx
mov edx, dword [ebp + 0x10]
add edx, dword [ebx + 0x50]
dec edx
add edx, eax
push edx
push 0
push 1
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, dword [ebx + 0x6c]
call fcn.005349bc
jmp 0x511b39
cmp dword [ebx + 0x38], 0
je 0x511ab0
mov eax, dword [ebp - 4]
add eax, dword [ebx + 0x54]
sub eax, 2
push eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebx + 0x50]
dec eax
push eax
mov eax, dword [ebx + 0x38]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 4]
add edx, 0x18
mov eax, esi
call fcn.005344c8
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
add eax, dword [ebx + 0x54]
dec eax
push eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebx + 0x50]
dec eax
push eax
push 0
push 1
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, dword [ebx + 0x6c]
call fcn.005349bc
jmp 0x511b39
cmp dword [ebx + 0x38], 0
je 0x511b0d
mov edx, dword [ebp - 4]
add edx, dword [ebx + 0x54]
sub edx, 2
push edx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebx + 0x24]
sub edx, eax
dec edx
push edx
mov edx, dword [ebx + 0x38]
push edx
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebx + 0x50]
add ecx, dword [ebp - 0x18]
sub ecx, eax
mov edx, dword [ebp - 4]
add edx, 0x18
mov eax, esi
call fcn.005344c8
mov edx, dword [ebp + 0xc]
sub edx, dword [ebx + 0x50]
mov eax, dword [ebx + 0x24]
sub edx, eax
push edx
mov edx, dword [ebp - 4]
add edx, dword [ebx + 0x54]
dec edx
push edx
mov edx, dword [ebp + 0xc]
sub edx, eax
dec edx
push edx
push 0
push 1
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, dword [ebx + 0x6c]
call fcn.005349bc
cmp byte [ebx + 0x73], 0
je 0x511c8e
mov eax, dword [edi + 0x1c]
mov edx, dword [eax + 0x18]
mov eax, dword [esi + 0x10]
call fcn.00433a40
mov eax, dword [esi + 0x10]
call fcn.00433a38
mov edx, eax
mov eax, dword [esi + 0xc]
call fcn.00433464
cmp dword [ebx + 0x38], 0
setne al
and al, byte [ebp - 0x12]
je 0x511c19
movzx eax, byte [ebx + 0x10]
dec al
je 0x511b8c
dec al
je 0x511bbe
dec eax
sub al, 2
jb 0x511be9
sub al, 2
jae 0x511c19
mov edx, dword [ebp - 4]
add edx, dword [ebx + 0x54]
sub edx, 2
push edx
mov edx, dword [ebp + 0x10]
add edx, dword [ebx + 0x50]
mov eax, dword [ebx + 0x20]
add edx, eax
dec edx
push edx
mov edx, dword [ebx + 0x38]
push edx
mov ecx, dword [ebp + 0x10]
add ecx, dword [ebp - 0x18]
add ecx, eax
mov edx, dword [ebp - 4]
add edx, 0x18
mov eax, esi
call fcn.005344c8
jmp 0x511c19
mov eax, dword [ebp - 4]
add eax, dword [ebx + 0x54]
sub eax, 2
push eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebx + 0x50]
dec eax
push eax
mov eax, dword [ebx + 0x38]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 4]
add edx, 0x18
mov eax, esi
call fcn.005344c8
jmp 0x511c19
mov edx, dword [ebp - 4]
add edx, dword [ebx + 0x54]
sub edx, 2
push edx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebx + 0x24]
sub edx, eax
dec edx
push edx
mov edx, dword [ebx + 0x38]
push edx
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebx + 0x50]
add ecx, dword [ebp - 0x18]
sub ecx, eax
mov edx, dword [ebp - 4]
add edx, 0x18
mov eax, esi
call fcn.005344c8
movzx eax, byte [ebx + 0x10]
dec al
je 0x511c2e
dec al
je 0x511c4f
dec eax
sub al, 2
jb 0x511c6c
sub al, 2
jae 0x511c8e
mov edx, dword [ebp - 4]
add edx, dword [ebx + 0xc]
push edx
mov eax, dword [ebp + 0x10]
add eax, dword [ebx + 0x20]
mov edx, eax
add edx, dword [ebx + 8]
push edx
mov ecx, eax
mov edx, dword [ebp - 4]
mov eax, esi
call fcn.00434644
jmp 0x511c8e
mov eax, dword [ebp - 4]
add eax, dword [ebx + 0xc]
push eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebx + 8]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
mov eax, esi
call fcn.00434644
jmp 0x511c8e
mov edx, dword [ebp - 4]
add edx, dword [ebx + 0xc]
push edx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebx + 0x24]
sub edx, eax
push edx
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebx + 8]
sub ecx, eax
mov edx, dword [ebp - 4]
mov eax, esi
call fcn.00434644
cmp dword [ebx + 0x78], 0
je 0x511c9d
mov eax, dword [ebx + 0x78]
cmp byte [eax + 8], 0
jne 0x511cd1
cmp byte [edi + 0x14], 0
jne 0x511cd1
mov eax, dword [ebx + 0x6c]
cmp byte [eax + 0x1a0], 0
je 0x511db7
mov eax, dword [ebx + 0x6c]
cmp word [eax + 0x1ba], 0
je 0x511db7
mov eax, dword [edi + 0x3c]
cmp dword [eax + 4], 0
je 0x511db7
push 0
mov eax, esi
call fcn.00434aa8
push eax
call sub.gdi32.dll_SetTextColor
mov dword [ebp - 0x1c], eax
mov edx, 0xffffff
mov eax, dword [esi + 0x14]
call fcn.00433d20
movzx eax, byte [ebx + 0x10]
dec al
je 0x511d05
dec al
je 0x511d29
dec eax
sub al, 2
jb 0x511d47
sub al, 2
jae 0x511d69
mov eax, dword [ebp + 0x10]
add eax, dword [ebx + 0x20]
add eax, dword [ebx + 8]
push eax
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 4]
add ecx, dword [ebx + 0xc]
mov edx, dword [ebp + 0x10]
add edx, dword [ebx + 0x20]
mov eax, dword [ebp - 4]
call fcn.0041d4d0
jmp 0x511d69
mov eax, dword [ebp - 0x10]
add eax, dword [ebx + 8]
push eax
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 4]
add ecx, dword [ebx + 0xc]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.0041d4d0
jmp 0x511d69
mov eax, dword [ebp + 0xc]
sub eax, dword [ebx + 0x24]
push eax
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 4]
add ecx, dword [ebx + 0xc]
mov edx, dword [ebp + 0xc]
sub edx, dword [ebx + 8]
sub edx, dword [ebx + 0x24]
mov eax, dword [ebp - 4]
call fcn.0041d4d0
mov eax, dword [ebx + 0x6c]
cmp byte [eax + 0x1a0], 0
jne 0x511d81
lea edx, [ebp - 0x2c]
mov eax, esi
call fcn.004343e0
jmp 0x511da6
mov edx, dword [edi + 0x3c]
mov edx, dword [edx + 8]
push edx
lea edx, [ebp - 0x2c]
push edx
mov edx, dword [edi + 0x3c]
mov ecx, dword [edx + 4]
mov edx, dword [eax + 0x8c]
mov ebx, eax
mov eax, dword [ebx + 0x1bc]
call dword [ebx + 0x1b8]
mov eax, dword [ebp - 0x1c]
push eax
mov eax, esi
call fcn.00434aa8
push eax
call sub.gdi32.dll_SetTextColor
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc