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

Disassembly:
sub esp, 0x1d0
mov eax, dword [0x474e68]
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, 0x400
push edi
mov dword [esi + 0xa8], eax
mov dword [esi + 0x18bc], 0x3f800000
mov dword [esi + 0x18b8], ecx
mov dword [esi + 0x18b4], ecx
mov eax, dword [0x46b7bc]
cmp eax, ecx
jae 0x40876d
mov dword [esi + 0x18b8], eax
mov ecx, dword [0x46b7bc]
mov dword [esi + 0x18b4], ecx
mov eax, dword [esi + 0xa8]
lea ecx, [esp + 0x10c]
push ecx
push eax
mov edx, dword [eax]
call dword [edx + 0x1c]
mov ecx, dword [esi + 0x18b4]
mov eax, dword [esp + 0x164]
cmp ecx, eax
jbe 0x4087c0
xor ebp, ebp
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebp
mov dword [esi + 0x18b8], eax
fild qword [esp + 0x20]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebp
mov dword [esi + 0x18b4], eax
fidiv dword [esp + 0x20]
fstp dword [esi + 0x18bc]
jmp 0x4087c2
xor ebp, ebp
mov eax, dword [esi + 0xa8]
lea ecx, [esi + 0xac]
push ecx
push 1
mov edx, dword [eax]
mov dword [esp + 0x30], ecx
mov ecx, dword [esi + 0x18b8]
push 0x15
push ebp
push 1
push ecx
mov ecx, dword [esi + 0x18b4]
push ecx
push eax
call dword [edx + 0x50]
cmp eax, ebp
jl 0x408bb1
mov edx, dword [esi + 0x18b4]
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0xe0]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x18b8]
push ebp
neg eax
mov dword [esp + 0xe4], 0x28
mov dword [esp + 0xe8], edx
mov dword [esp + 0xec], eax
mov word [esp + 0xf0], 1
mov dword [esp + 0xf4], ebp
mov word [esp + 0xf2], 0x20
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push ebp
lea ecx, [esp + 0x34]
push ebp
push ecx
lea edx, [esp + 0xec]
mov edi, eax
push ebp
push edx
push edi
mov dword [esp + 0x30], edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebx, eax
push 1
push edi
mov dword [esp + 0x28], ebx
call dword [sym.imp.GDI32.dll_SetMapMode]
push 0x5a
push edi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov eax, dword [esi + 0xa0]
push 0x48
push 0x60
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
lea ecx, [esp + 0xa0]
push esi
neg eax
push ecx
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], ebp
mov dword [esp + 0x94], ebp
mov dword [esp + 0x98], ebp
mov dword [esp + 0x9c], 0x190
mov byte [esp + 0xa0], 0
mov byte [esp + 0xa1], 0
mov byte [esp + 0xa2], 0
mov byte [esp + 0xa3], 1
mov byte [esp + 0xa4], 0
mov byte [esp + 0xa5], 0
mov byte [esp + 0xa6], 5
mov byte [esp + 0xa7], 0
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [esi + 0xa4]
test al, 1
je 0x408922
mov dword [esp + 0x94], 0x2bc
test al, 2
je 0x40892e
mov byte [esp + 0x98], 1
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
cmp eax, ebp
mov dword [esp + 0x2c], eax
jne 0x408954
pop edi
pop esi
pop ebp
mov eax, 0x80004005
pop ebx
add esp, 0x1d0
ret
push ebx
mov ebx, dword [sym.imp.GDI32.dll_SelectObject]
push edi
call ebx
mov eax, dword [esp + 0x2c]
push eax
push edi
call ebx
push 0xffffff
push edi
call dword [sym.imp.GDI32.dll_SetTextColor]
push ebp
push edi
call dword [sym.imp.GDI32.dll_SetBkColor]
push ebp
push edi
call dword [sym.imp.GDI32.dll_SetTextAlign]
push 1
push edi
call dword [sym.imp.GDI32.dll_SetBkMode]
mov ecx, dword [0x46a3a4]
mov eax, 0x20
mov dword [esp + 0x1c], ebp
xor edi, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
lea ebp, [esi + 0x238]
lea ebx, [esi + 0x1ac4]
jmp 0x4089b6
mov eax, dword [esp + 0x14]
cmp eax, 0x100
jl 0x4089c2
add eax, 0x2e8
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x34]
mov word [esp + 0x10], ax
push edx
lea eax, [esp + 0x14]
push 1
push eax
push ecx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
lea ecx, [ebp - 4]
and eax, 0xffff
push ecx
push eax
push eax
push edx
call dword [sym.imp.GDI32.dll_GetCharABCWidthsW]
mov eax, dword [ebp]
mov dword [esp + 0x34], eax
mov ecx, dword [ebp]
mov eax, dword [esi + 0x18b4]
add ecx, edi
cmp ecx, eax
jbe 0x408a20
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x1c]
xor edi, edi
lea ecx, [eax + edx + 1]
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x14]
push 1
push edx
mov edx, dword [esp + 0x24]
push 0
push 2
push eax
mov eax, dword [ebp - 4]
mov ecx, edi
sub ecx, eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_ExtTextOutW]
mov ecx, dword [esi + 0x18b4]
xor eax, eax
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], eax
fild qword [esp + 0x4c]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
fidiv dword [esp + 0x3c]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x78], eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0x60], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x14]
add ebx, 0x10
add ebp, 0xc
fstp dword [ebx - 0x14]
mov edx, dword [esi + 0x18b8]
fild qword [esp + 0x74]
mov dword [esp + 0x5c], edx
fidiv dword [esp + 0x5c]
fstp dword [ebx - 0x10]
mov edx, dword [ebp - 0xc]
add edx, edi
mov dword [esp + 0x7c], edx
mov edx, dword [esi + 0x18b4]
fild qword [esp + 0x7c]
mov dword [esp + 0x6c], edx
fidiv dword [esp + 0x6c]
fstp dword [ebx - 0xc]
mov edx, dword [esp + 0x38]
add edx, ecx
mov ecx, dword [esi + 0x18b8]
mov dword [esp + 0x44], edx
mov dword [esp + 0x54], ecx
fild qword [esp + 0x44]
fidiv dword [esp + 0x54]
inc eax
cmp eax, 0x200
mov dword [esp + 0x14], eax
fstp dword [ebx - 8]
mov edx, dword [ebp - 0xc]
lea edi, [edi + edx + 1]
jl 0x4089b2
mov eax, dword [esp + 0x28]
push 0
lea edx, [esp + 0x68]
push 0
mov eax, dword [eax]
push edx
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov eax, dword [esi + 0x18b8]
mov ebx, dword [esp + 0x68]
xor edi, edi
test eax, eax
jbe 0x408b82
mov eax, dword [esi + 0x18b4]
xor edx, edx
test eax, eax
mov ecx, ebx
jbe 0x408b71
imul eax, edi
mov ebp, dword [esp + 0x30]
add eax, edx
mov al, byte [ebp + eax*4]
test al, al
mov byte [esp + 0x14], al
jbe 0x408b5d
mov eax, dword [esp + 0x14]
and eax, 0xff
shl eax, 0x18
or eax, 0xffffff
mov dword [ecx], eax
jmp 0x408b63
mov dword [ecx], 0
mov eax, dword [esi + 0x18b4]
add ecx, 4
inc edx
cmp edx, eax
jb 0x408b33
mov edx, dword [esp + 0x64]
mov eax, dword [esi + 0x18b8]
add ebx, edx
inc edi
cmp edi, eax
jb 0x408b25
mov ecx, dword [esp + 0x28]
push 0
mov eax, dword [ecx]
push eax
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [esp + 0x20]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edx, dword [esp + 0x2c]
push edx
call esi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret