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

Disassembly:
mov eax, dword [0x504908]
sub esp, 0x60
test eax, eax
jle 0x40470a
mov eax, dword [0x50490c]
test eax, eax
jle 0x40470a
fld qword [0x5048f8]
fcomp qword [0x5048e8]
fnstsw ax
test ah, 0x41
jne 0x40470a
fld qword [0x504900]
fcomp qword [0x5048f0]
fnstsw ax
test ah, 0x41
jne 0x40470a
mov eax, dword [0x4fb310]
push ebx
mov ebx, dword [sym.imp.GDI32.dll_CreateSolidBrush]
push ebp
push esi
push edi
push eax
call ebx
mov edi, dword [esp + 0x78]
push 1
mov ebp, eax
mov ecx, dword [edi]
push ecx
call dword [sym.imp.GDI32.dll_SetBkMode]
mov edx, dword [0x442e5c]
mov esi, dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x24], eax
mov eax, dword [edi]
push edx
push eax
call esi
mov ecx, dword [0x504d28]
mov edx, dword [edi]
push ecx
push edx
mov dword [esp + 0x30], eax
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [esp + 0x2c], eax
mov eax, dword [edi]
push ebp
push eax
call esi
mov ecx, dword [0x5048ec]
mov edx, dword [0x5048e8]
mov esi, dword [esp + 0x74]
push ecx
push edx
push esi
mov dword [esp + 0x2c], eax
call fcn.00402820
mov ecx, dword [0x5048f0]
mov dword [esp + 0x5c], eax
mov eax, dword [0x5048f4]
push eax
push ecx
push esi
call fcn.00402850
mov edx, dword [0x5048fc]
mov dword [esp + 0x6c], eax
mov eax, dword [0x5048f8]
push edx
push eax
push esi
call fcn.00402820
mov ecx, dword [0x504904]
mov edx, dword [0x504900]
push ecx
push edx
push esi
mov dword [esp + 0x88], eax
call fcn.00402850
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0xac]
add esp, 0x30
test eax, eax
jne 0x40443b
mov ecx, dword [edi]
lea eax, [esp + 0x50]
push ebp
push eax
push ecx
call dword [sym.imp.USER32.dll_FillRect]
push ebp
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [esp + 0x58]
mov ebp, dword [esp + 0x50]
sub edx, ebp
sub esp, 8
mov dword [esp + 0x7c], edx
fild dword [esp + 0x7c]
fidiv dword [0x504908]
fstp qword [esp + 0x38]
fld qword [0x504910]
fadd st(0), st(0)
fstp qword [esp]
push esi
call fcn.00402820
fld qword [esp + 0x3c]
mov ebp, eax
call sub.MSVCRT.dll__ftol
mov ecx, dword [esp + 0x60]
sub eax, ebp
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x68]
sub eax, ecx
add esp, 4
mov dword [esp + 0x84], eax
fild dword [esp + 0x84]
fidiv dword [0x50490c]
fstp qword [esp + 0x40]
fld qword [0x504918]
fadd st(0), st(0)
fstp qword [esp]
push esi
call fcn.00402850
fld qword [esp + 0x44]
add esp, 0xc
mov esi, eax
call sub.MSVCRT.dll__ftol
mov ecx, dword [0x504920]
sub eax, esi
push ecx
mov dword [esp + 0x18], eax
call ebx
push 0
mov dword [esp + 0x1c], eax
call ebx
mov esi, dword [0x504908]
mov dword [esp + 0x1c], eax
test esi, esi
mov dword [esp + 0x10], 0
jle 0x4046bc
fild dword [esp + 0x74]
mov ebx, dword [0x50490c]
fsubr qword [esp + 0x30]
fmul qword [0x42e478]
fstp qword [esp + 0x40]
fild dword [esp + 0x10]
fmul qword [esp + 0x30]
fadd qword [esp + 0x40]
call sub.MSVCRT.dll__ftol
mov ecx, dword [esp + 0x50]
mov ebp, eax
add ebp, ecx
mov dword [esp + 0x7c], 0
test ebx, ebx
jle 0x4046ab
fild dword [esp + 0x14]
fsubr qword [esp + 0x38]
fmul qword [0x42e478]
fstp qword [esp + 0x48]
fild dword [esp + 0x7c]
fmul qword [esp + 0x38]
fadd qword [esp + 0x48]
call sub.MSVCRT.dll__ftol
imul esi, dword [esp + 0x7c]
mov edi, eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x54]
add esi, eax
mov eax, esi
mov edx, dword [esp + 0x14]
add edi, ecx
mov ecx, dword [esp + 0x74]
lea esi, [eax + eax*2]
add ecx, ebp
shl esi, 3
sub esi, eax
lea ebx, [edi + edx]
shl esi, 3
mov dword [esi + 0x504dd4], ebp
mov dword [esi + 0x504dd8], ecx
mov dword [esi + 0x504ddc], edi
mov dword [esi + 0x504de0], ebx
mov ecx, dword [esi + 0x504d34]
test ecx, ecx
je 0x40468a
mov ecx, dword [0x430fcc]
mov edx, dword [esp + 0x1c]
cmp ecx, eax
je 0x4045c4
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x78]
push edx
mov ecx, dword [eax]
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esp + 0x74]
lea edx, [ebx + 2]
add eax, ebp
push edx
add eax, 2
lea ecx, [edi + 2]
push eax
mov eax, dword [esp + 0x80]
push ecx
lea edx, [ebp + 2]
mov ecx, dword [eax]
push edx
push ecx
call dword [sym.imp.GDI32.dll_Rectangle]
mov edx, dword [esp + 0x74]
push ebx
lea eax, [edx + ebp]
push eax
mov eax, dword [esp + 0x80]
push edi
push ebp
mov ecx, dword [eax]
push ecx
call dword [sym.imp.GDI32.dll_Rectangle]
mov edx, dword [esp + 0x74]
push ebx
lea eax, [edx + ebp]
add eax, 0xfffffffe
push eax
push edi
lea eax, [esp + 0x6c]
push ebp
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov edx, dword [esp + 0x78]
lea ecx, [esp + 0x60]
push 0x411
lea esi, [esi + 0x504d54]
mov eax, dword [edx]
push ecx
push 0xffffffffffffffff
push esi
push eax
call dword [sym.imp.USER32.dll_DrawTextW]
mov edx, dword [esp + 0x74]
mov ecx, eax
push ebx
lea eax, [edx + ebp]
dec eax
push eax
mov eax, ebx
sub eax, ecx
lea ecx, [esp + 0x68]
add eax, edi
cdq
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp + 1]
push eax
push ecx
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [esp + 0x78]
lea edx, [esp + 0x60]
push 0x11
push edx
mov ecx, dword [eax]
push 0xffffffffffffffff
push esi
push ecx
call dword [sym.imp.USER32.dll_DrawTextW]
mov eax, dword [esp + 0x7c]
mov ebx, dword [0x50490c]
mov esi, dword [0x504908]
inc eax
cmp eax, ebx
mov dword [esp + 0x7c], eax
jl 0x40454e
mov edi, dword [esp + 0x78]
mov eax, dword [esp + 0x10]
inc eax
cmp eax, esi
mov dword [esp + 0x10], eax
jl 0x404513
mov edx, dword [esp + 0x20]
mov eax, dword [edi]
mov ebx, dword [sym.imp.GDI32.dll_SelectObject]
push edx
push eax
call ebx
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
push ecx
call esi
mov edx, dword [esp + 0x1c]
push edx
call esi
mov eax, dword [esp + 0x24]
mov ecx, dword [edi]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetBkMode]
mov edx, dword [esp + 0x28]
mov eax, dword [edi]
push edx
push eax
call ebx
mov ecx, dword [esp + 0x2c]
mov edx, dword [edi]
push ecx
push edx
call dword [sym.imp.GDI32.dll_SetTextColor]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret