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

Disassembly:
mov eax, dword [ebx + 0x5c]
sub esp, 0xe8
test eax, eax
push ebp
push edi
je 0x5073ee
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ebp, dword [esp + 0xfc]
mov edi, dword [esp + 0xf8]
push 0xff0062
push 0
push 0
push esi
push ebp
push edi
push 0
push 0
push esi
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x104]
mov ecx, dword [esp + 0x100]
push 0x42
push 0
push 0
push esi
push ebp
push edi
push eax
push ecx
push esi
call dword [sym.imp.GDI32.dll_BitBlt]
jmp 0x5073f5
mov edi, dword [esp + 0xf8]
mov eax, dword [esp + 0xf4]
and eax, 0x40
mov dword [esp + 0x54], eax
mov al, byte [ebx + 4]
je 0x507414
test al, 1
je 0x507410
push 0
jmp 0x507424
push 0xe
jmp 0x507424
test al, 1
mov al, byte [ebx]
je 0x507422
test al, al
js 0x507422
push 2
jmp 0x507424
push 6
push esi
call dword [sym.imp.GDI32.dll_SetTextAlign]
push 1
push esi
call dword [sym.imp.GDI32.dll_SetBkMode]
mov ebp, dword [ebx + 0x48]
mov edx, dword [ebx + 0x78]
lea eax, [edi + ebp*2]
mov edi, dword [ebx + 0x4c]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x28], edx
mov edx, dword [ebx + 4]
mov eax, edi
neg eax
and edx, 0xfffffdff
mov dword [esp + 0x50], eax
mov eax, edx
test al, 1
mov dword [ebx + 4], edx
jne 0x507489
mov ecx, dword [esp + 0x108]
lea edx, [edi + ecx*2 + 4]
xor ecx, ecx
cmp dword [esp + 0xfc], edx
setge cl
shl ecx, 9
xor ecx, eax
and ecx, 0x200
xor ecx, eax
mov dword [ebx + 4], ecx
mov eax, dword [ebx]
test al, al
jns 0x5074a3
cmp dword [ebx + 0xb8], 1
jbe 0x5074a3
test al, 0x20
je 0x5074a3
or dword [ebx + 4], 0x200
mov eax, dword [ebx + 4]
shl eax, 0x1f
sar eax, 0x1f
test eax, eax
jne 0x5074b4
lea edi, [ebp + ebp*2]
mov ecx, dword [ebx + 0x40]
mov edx, dword [ebx + 0x28]
sub edx, ecx
mov ecx, dword [esp + 0x108]
add ecx, ecx
sub edx, ecx
test eax, eax
mov dword [esp + 0x10], edx
je 0x5074d9
mov edx, dword [ebx + 0x2c]
sub edx, dword [ebx + 0x44]
mov dword [esp + 0x10], edx
mov eax, dword [ebx + 0x80]
test eax, eax
mov dword [esp + 8], eax
je 0x507506
fild dword [esp + 8]
fldlg2
fxch st(1)
fyl2x
fmul qword [0x5ebae8]
call fcn.005c4484
mov dword [esp + 8], eax
fild dword [esp + 8]
jmp 0x507522
fild dword [ebx + 0x7c]
fldlg2
fxch st(1)
fyl2x
fmul qword [0x5ebae8]
call fcn.005c4484
mov dword [esp + 8], eax
fild dword [esp + 8]
fst qword [esp + 0x2c]
fild dword [esp + 0x10]
fst qword [esp + 0x34]
fld st(1)
fmul qword [0x5ebae0]
fdivr st(1)
fld qword [0x5d92d0]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x50754f
fstp st(0)
fld qword [0x5d92d0]
fdiv st(1)
sub esp, 8
fmul st(2)
fmul qword [0x5ebae0]
fsub qword [0x5ebad8]
fstp qword [esp]
fstp st(0)
fstp st(0)
call dword [0x5d25fc]
fmul qword [0x5d92d0]
add edi, 2
mov dword [esp + 0x10], edi
fst qword [esp + 0x1c]
fld qword [esp + 0x34]
fsub st(1)
fstp qword [esp + 0x44]
fstp st(0)
fild dword [esp + 0x10]
fdiv qword [esp + 0x3c]
fmul qword [esp + 0x34]
fmul qword [0x5ebae0]
fstp qword [esp]
call dword [0x5d25fc]
fmul qword [0x5d92d0]
add esp, 8
fst qword [esp + 0x60]
fld qword [esp + 0x14]
fcomp st(1)
fnstsw ax
test ah, 0x41
jne 0x5075c7
fstp st(0)
fld qword [esp + 0x14]
fld qword [0x5d6138]
sub esp, 8
fdiv qword [esp + 0x1c]
fst qword [esp + 0x3c]
fmul st(1)
fstp qword [esp]
fstp st(0)
call dword [0x5d25fc]
fmul qword [esp + 0x1c]
add esp, 8
fstp qword [esp + 0x58]
fld qword [esp + 0x60]
fmul qword [0x5d8c68]
fsubr qword [esp + 0x2c]
fld qword [esp + 0x3c]
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x507611
fstp st(0)
fld qword [esp + 0x3c]
fld qword [esp + 0x34]
sub esp, 8
fmul st(1)
fstp qword [esp]
fstp st(0)
call dword [0x5d24ec]
fmul qword [esp + 0x1c]
fstp qword [esp + 0x28]
fld qword [esp + 0x3c]
fmul qword [esp + 0x68]
fstp qword [esp]
call dword [0x5d25fc]
fmul qword [esp + 0x1c]
fstp qword [esp + 0x34]
fld qword [esp + 0x1c]
fmul qword [0x5ebae0]
fst qword [esp + 0x1c]
fstp qword [esp]
call dword [0x5d25fc]
call fcn.005c4484
fld qword [esp + 0x1c]
fstp qword [esp]
mov edi, eax
call dword [0x5d25fc]
call fcn.005c4484
fld qword [esp + 0x44]
fmul qword [0x5ebae0]
mov dword [esp + 0x4c], eax
fstp qword [esp]
call dword [0x5d24ec]
call fcn.005c4484
fld qword [esp + 0x60]
fmul qword [0x5ebae0]
mov dword [esp + 0x10], eax
fstp qword [esp]
call dword [0x5d25fc]
call fcn.005c4484
fld qword [esp + 0x34]
fmul qword [0x5ebae0]
mov ebp, eax
fstp qword [esp]
call dword [0x5d25fc]
call fcn.005c4484
fld qword [esp + 0x28]
fmul qword [0x5ebae0]
mov dword [esp + 0x44], eax
fstp qword [esp]
call dword [0x5d24ec]
add esp, 8
call fcn.005c4484
cmp edi, dword [esp + 8]
mov dword [esp + 0x60], eax
mov eax, edi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x58], eax
ja 0x507cc1
lea ecx, [edi + edi*2]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x44]
lea edx, [ecx + ecx*2]
mov dword [esp + 0x14], edx
jmp 0x507717
mov ebp, dword [esp + 0x48]
cmp eax, ebp
jne 0x507733
cmp ebp, dword [esp + 0x60]
mov dword [esp + 0x1c], 1
jae 0x50773b
add ebp, dword [esp + 0x3c]
mov dword [esp + 0x48], ebp
jmp 0x50773b
mov dword [esp + 0x1c], 0
fld dword [eax*4 + 0x5eba18]
fcom qword [ebx + 0x88]
fnstsw ax
test ah, 5
jp 0x507755
fstp st(0)
xor edi, edi
jmp 0x507785
mov edi, dword [ebx + 0x78]
fldlg2
fxch st(1)
mov dword [esp + 0x20], edi
fyl2x
fild dword [esp + 0x20]
fdiv qword [ebx + 0x90]
fmulp st(1)
fadd qword [0x5eb260]
call fcn.005c4484
sub edi, eax
cmp edi, 2
jg 0x507785
mov edi, 2
push 0
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov eax, dword [esp + 0x54]
test eax, eax
je 0x50795a
test byte [ebx + 4], 1
je 0x507871
mov ebp, dword [esp + 0x28]
push 0
push 0
push 0
lea eax, [esp + 0x74]
push eax
push 2
push 0
sub ebp, edi
push 0
lea edi, [ebp + 1]
push esi
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x90], 2
mov dword [esp + 0x94], edi
call dword [sym.imp.GDI32.dll_ExtTextOutW]
push 0xffffff
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov eax, dword [esp + 0x100]
push 0
push 0
push 0
lea ecx, [esp + 0xc4]
push ecx
push 2
push 0
mov dword [esp + 0xd0], eax
push 0
add eax, 2
push esi
mov dword [esp + 0xdc], ebp
mov dword [esp + 0xe0], eax
mov dword [esp + 0xe4], edi
call dword [sym.imp.GDI32.dll_ExtTextOutW]
mov ecx, dword [ebx + 0x4c]
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
or edx, 0xffffffff
sub edx, eax
mov eax, dword [esp + 0x50]
add ebp, edx
lea edx, [ecx + eax]
cmp ebp, edx
jle 0x507c99
mov eax, dword [esp + 0xfc]
sub eax, ecx
cmp ebp, eax
jg 0x507c99
mov edi, 4
jmp 0x507ba8
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x108]
sub edi, ecx
mov ecx, dword [esp + 0x10c]
lea edi, [edi + ecx - 1]
cmp edi, eax
jl 0x507c99
mov ebp, dword [esp + 0xfc]
push 0
push 0
push 0
lea eax, [edi + 1]
mov dword [esp + 0xac], eax
lea eax, [esp + 0xa4]
push eax
push 2
push 0
add ebp, 0xfffffffe
push 0
lea edx, [ebp + 2]
push esi
mov dword [esp + 0xb8], edi
mov dword [esp + 0xbc], ebp
mov dword [esp + 0xc4], edx
call dword [sym.imp.GDI32.dll_ExtTextOutW]
push 0xffffff
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov ecx, dword [esp + 0x104]
mov edx, dword [esp + 0xfc]
push 0
lea eax, [ecx + edx - 2]
push 0
mov dword [esp + 0x84], eax
add eax, 2
push 0
mov dword [esp + 0x90], eax
lea eax, [esp + 0x84]
push eax
push 2
push 0
push 0
lea ecx, [edi + 1]
push esi
mov dword [esp + 0x98], edi
mov dword [esp + 0xa0], ecx
call dword [sym.imp.GDI32.dll_ExtTextOutW]
mov eax, dword [ebx + 0x48]
mov edx, dword [esp + 0x4c]
lea ecx, [eax*4]
sub edx, ecx
cmp edi, edx
jg 0x507c99
add eax, eax
cmp edi, eax
jl 0x507c99
jmp 0x507ba8
mov al, byte [ebx]
mov ecx, dword [esp + 0x108]
mov dl, byte [ebx + 4]
and al, 0x80
neg al
sbb eax, eax
not eax
and eax, ecx
test dl, 1
mov dword [esp + 0xc], eax
je 0x507ad2
mov eax, dword [ebx + 0x4c]
mov ebp, dword [esp + 0x28]
cdq
sub eax, edx
mov ecx, eax
sub ebp, edi
sar ecx, 1
mov eax, ebp
sub eax, ecx
inc eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
xor edx, edx
test eax, eax
setne dl
push 0
push esi
inc edx
mov edi, edx
mov dword [esp + 0x28], edi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0xf8]
push 0
push 0
neg edi
push 0
mov eax, edi
sub eax, edx
add eax, ecx
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x94]
push edx
push 2
mov dword [esp + 0x9c], eax
add eax, ecx
push 0
mov dword [esp + 0xa8], eax
lea eax, [ebp + 1]
push 0
push esi
mov dword [esp + 0xac], ebp
mov dword [esp + 0x54], eax
mov dword [esp + 0xb4], eax
call dword [sym.imp.GDI32.dll_ExtTextOutW]
push 0xffffff
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x100]
mov eax, dword [esp + 0xf8]
push 0
push 0
sub edi, edx
push 0
add edi, ecx
add edi, eax
lea ecx, [esp + 0xb4]
push ecx
mov eax, edi
mov edi, dword [esp + 0x30]
push 2
mov dword [esp + 0xbc], eax
add eax, edi
push 0
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0x4c]
push 0
push esi
mov dword [esp + 0xcc], ebp
mov dword [esp + 0xd4], eax
call dword [sym.imp.GDI32.dll_ExtTextOutW]
mov eax, dword [ebx + 4]
test ah, 2
je 0x507ab3
push 0
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov edx, dword [esp + 0xc]
push 1
push edi
push ebp
push edx
push esi
call fcn.0040b5c0
push 0xffffff
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov eax, dword [esp + 0x100]
mov ecx, dword [esp + 0xc]
push 1
push edi
push ebp
add ecx, eax
push ecx
push esi
call fcn.0040b5c0
mov eax, dword [esp + 0x1c]
test eax, eax
mov ebp, dword [esp + 0x2c]
je 0x507c99
mov edi, dword [esp + 0xf8]
add edi, 0xfffffffc
jmp 0x507ba8
mov ebp, dword [esp + 0x28]
mov edx, dword [esp + 0x10c]
sub edi, ebp
lea edi, [edi + edx - 1]
cmp edi, ecx
jl 0x507c99
mov ebp, dword [esp + 0x1c]
xor ecx, ecx
test ebp, ebp
sete cl
inc ecx
mov ebp, ecx
push ebp
push 1
push eax
push edi
push esi
mov dword [esp + 0x34], ebp
call fcn.0040b5c0
push 0xffffff
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov eax, dword [esp + 0x104]
mov edx, dword [esp + 0xc]
push ebp
push 1
add edx, eax
push edx
push edi
push esi
call fcn.0040b5c0
mov eax, dword [ebx + 4]
test ah, 2
je 0x507b92
push 0
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x100]
neg ebp
mov edx, ebp
push 1
sub edx, eax
add edx, ecx
push edx
push edi
push esi
call fcn.0040b5c0
push 0xffffff
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x104]
push eax
mov eax, dword [esp + 0x100]
sub ebp, edx
push 1
add ebp, ecx
add ebp, eax
push ebp
push edi
push esi
call fcn.0040b5c0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x507c99
mov ebp, dword [esp + 0x108]
add ebp, 2
mov ecx, dword [ebx + 0x48]
mov eax, dword [esp + 0xf8]
lea edx, [ecx + ecx + 5]
cmp eax, edx
jle 0x507c99
mov eax, dword [esp + 0xfc]
cmp eax, dword [ebx + 0x4c]
jle 0x507c99
cmp byte [ebx], 0
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], ebp
jns 0x507bef
test byte [ebx + 4], 1
je 0x507bef
mov eax, dword [esp + 0xf8]
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov ecx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0xcc]
push 0x5e747c
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0
push esi
call dword [sym.imp.GDI32.dll_SetTextColor]
lea eax, [esp + 0xc8]
test eax, eax
je 0x507c2f
lea ecx, [esp + 0xc8]
push ecx
call dword [0x5d2620]
add esp, 4
push 0
push eax
lea edx, [esp + 0xd0]
push edx
push 0
push 0
push ebp
push edi
push esi
call dword [sym.imp.GDI32.dll_ExtTextOutW]
push 0xffffff
push esi
call dword [sym.imp.GDI32.dll_SetTextColor]
lea eax, [esp + 0xc8]
test eax, eax
je 0x507c6f
lea ecx, [esp + 0xc8]
push ecx
call dword [0x5d2620]
add esp, 4
mov ecx, dword [esp + 0x100]
push 0
push eax
mov eax, dword [esp + 0x10c]
lea edx, [esp + 0xd0]
push edx
push 0
push 0
add ebp, eax
push ebp
add edi, ecx
push edi
push esi
call dword [sym.imp.GDI32.dll_ExtTextOutW]
mov eax, dword [esp + 0x58]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 8]
add eax, ebp
add edi, edx
cmp eax, ecx
mov dword [esp + 0x58], eax
mov dword [esp + 0x10], edi
jbe 0x507713
mov eax, dword [ebx + 0x74]
test eax, eax
je 0x507dce
cmp dword [ebx + 0xb8], 1
jbe 0x507dce
test byte [esp + 0xf4], 0xa0
jne 0x507dce
mov eax, dword [esp + 0x54]
mov ebp, dword [esp + 0xfc]
mov edi, dword [esp + 0xf8]
test eax, eax
mov al, byte [ebx + 4]
push 0xcc0020
je 0x507d65
test al, 1
je 0x507d3d
push 0
push 0
push esi
push ebp
push 2
push 0
lea eax, [edi - 2]
push eax
push esi
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x100]
push 0xcc0020
push 0
push eax
push esi
push ebp
push 2
push 0
lea ecx, [eax + edi - 2]
push ecx
jmp 0x507dc7
lea edx, [ebp - 2]
push edx
push 0
push esi
push 2
push edi
push 0
push 0
push esi
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x104]
push 0xcc0020
lea ecx, [eax + ebp - 2]
push ecx
jmp 0x507dbe
test al, 1
push 0
je 0x507d9a
lea edx, [edi - 2]
push edx
push esi
push ebp
push 2
push 0
push 0
push esi
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x100]
push 0xcc0020
push 0
lea ecx, [eax + edi - 2]
push ecx
push esi
push ebp
push 2
push 0
push eax
jmp 0x507dc7
push 0
push esi
push 2
push edi
lea edx, [ebp - 2]
push edx
push 0
push esi
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x104]
push 0xcc0020
push eax
lea eax, [eax + ebp - 2]
push 0
push esi
push 2
push edi
push eax
push 0
push esi
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [ebx + 0x5c]
test eax, eax
pop edi
pop ebp
je 0x507de2
mov ecx, dword [ebx + 0x58]
push ecx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
add esp, 0xe8
ret 0x1c