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

Disassembly:
sub esp, 0x8c
push ebx
push ebp
push esi
push edi
mov ebx, eax
call fcn.0045f010
xor edi, edi
cmp eax, 5
jl 0x408357
push edi
push 0x701
push str.gtwvt.C
push 5
call fcn.0042ef00
push str.hb_gt_wvt_FitSize__
call fcn.0045f1c0
add esp, 0x14
mov eax, dword [ebx + 0x2ec]
push eax
call dword [sym.imp.USER32.dll_IsZoomed]
mov edx, dword [ebx + 0x2ec]
lea ecx, [esp + 0x50]
push ecx
push edx
mov dword [ebx + 0x808], eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [ebx + 0x2ec]
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x28]
sub eax, dword [esp + 0x58]
sub eax, dword [esp + 0x20]
mov dword [esp + 0x40], eax
call fcn.00407f60
mov ecx, dword [esp + 0x5c]
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
sub esi, ecx
sub esi, edx
add eax, esi
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x38], eax
mov dword [esp + 0x30], edx
mov eax, ecx
cdq
idiv dword [ebx + 0x10]
mov ebp, dword [esp + 0x58]
mov dword [esp + 0x4c], ecx
mov ecx, dword [ebx + 0x304]
push ecx
mov ecx, dword [ebx + 0x29c]
mov dword [esp + 0x48], ebp
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov esi, eax
mov eax, ebp
cdq
idiv dword [ebx + 0x14]
mov edx, dword [ebx + 0x2a0]
push edx
push ecx
mov dword [esp + 0x40], esi
mov ebp, eax
lea eax, [ebx + 0x2a8]
push eax
mov ecx, ebp
call fcn.00405ac0
mov esi, eax
add esp, 0x10
cmp esi, edi
je 0x4086d2
jmp 0x408430
mov edx, dword [ebx + 0x2ec]
push edx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push esi
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push 0
push edi
mov dword [esp + 0x50], eax
call dword [sym.imp.GDI32.dll_SetTextCharacterExtra]
lea eax, [esp + 0x60]
push eax
push edi
call dword [sym.imp.GDI32.dll_GetTextMetricsW]
mov ecx, dword [esp + 0x48]
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [ebx + 0x2ec]
push edi
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ecx, dword [ebx + 0x14]
mov eax, dword [esp + 0x74]
imul ecx, eax
cmp ecx, dword [esp + 0x44]
jg 0x4084a8
mov edx, dword [ebx + 0x10]
mov ecx, dword [esp + 0x60]
imul edx, ecx
cmp edx, dword [esp + 0x4c]
jg 0x4084a8
cmp eax, 4
jl 0x4084a8
cmp ecx, 8
jge 0x408549
xor edx, edx
cmp dword [esp + 0x18], edx
jne 0x4084c2
cmp dword [esp + 0x1c], edx
jne 0x4084c2
mov eax, dword [esp + 0x34]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jne 0x408536
mov dword [esp + 0x14], edx
mov ecx, edx
inc eax
mov dword [esp + 0x10], eax
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
sub ebp, eax
sub esi, ecx
cmp ebp, 4
mov dword [esp + 0x34], esi
jl 0x40869a
cmp esi, 8
jl 0x40869a
mov ecx, dword [ebx + 0x304]
mov edx, dword [ebx + 0x2a0]
mov eax, dword [ebx + 0x29c]
push ecx
push edx
push eax
lea eax, [ebx + 0x2a8]
push eax
mov ecx, ebp
call fcn.00405ac0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x408430
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret
jle 0x4084d4
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, eax
jne 0x4084d9
mov dword [esp + 0x10], edx
mov eax, edx
jmp 0x4084d9
mov edx, dword [ebx + 0x2e8]
xor edi, edi
cmp edx, edi
je 0x408564
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x60]
mov dword [ebx + 0x2e8], esi
mov dword [ebx + 0x294], ecx
mov dword [ebx + 0x298], eax
mov dword [ebx + 0x284], eax
mov dword [ebx + 0x288], ecx
call fcn.00405890
cmp dword [ebx + 0x7f8], edi
jne 0x4085b1
cmp dword [ebx + 0x298], edi
jl 0x4085b1
mov eax, 1
test byte [esp + 0x97], al
jne 0x4085b1
mov ecx, dword [ebx + 0x284]
cmp ecx, dword [esp + 0x78]
je 0x4085b3
xor eax, eax
mov dword [ebx + 0x28c], eax
xor eax, eax
cmp dword [ebx + 0x14], edi
jle 0x4085d5
mov edx, dword [ebx + 0x290]
mov ecx, dword [ebx + 0x284]
mov dword [edx + eax*4], ecx
inc eax
cmp eax, dword [ebx + 0x14]
jl 0x4085c0
mov ecx, dword [ebx + 0x14]
mov esi, dword [ebx + 0x288]
imul ecx, dword [ebx + 0x284]
imul esi, dword [ebx + 0x10]
add ecx, dword [esp + 0x40]
add esi, dword [esp + 0x3c]
cmp dword [ebx + 0x808], edi
je 0x408625
mov eax, dword [esp + 0x28]
sub eax, ecx
sub eax, dword [esp + 0x20]
cdq
sub eax, edx
sar eax, 1
mov dword [ebx + 0x818], eax
mov eax, dword [esp + 0x2c]
sub eax, esi
sub eax, dword [esp + 0x24]
cdq
sub eax, edx
sar eax, 1
mov dword [ebx + 0x814], eax
jmp 0x408665
mov edx, dword [esp + 0x28]
sub edx, dword [esp + 0x20]
mov dword [ebx + 0x818], edi
mov dword [ebx + 0x814], edi
cmp edx, ecx
jne 0x408649
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x24]
cmp eax, esi
je 0x408665
mov edx, dword [esp + 0x38]
mov eax, dword [ebx + 0x2ec]
push 4
push esi
push ecx
mov ecx, dword [esp + 0x3c]
push ecx
push edx
push edi
push eax
call dword [sym.imp.USER32.dll_SetWindowPos]
cmp dword [ebx + 0x5c], edi
je 0x408676
cmp dword [ebx + 0x60], edi
jne 0x408676
mov esi, ebx
call fcn.00405be0
mov edx, dword [ebx + 0x14]
mov eax, dword [ebx]
mov ecx, dword [eax]
push edx
mov edx, dword [ebx + 0x10]
push edx
push 0
push 0
push eax
mov eax, dword [ecx + 0x30]
call eax
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret
mov ecx, dword [ebx + 0x288]
imul ecx, dword [ebx + 0x10]
mov eax, dword [ebx + 0x284]
imul eax, dword [ebx + 0x14]
add ecx, dword [esp + 0x3c]
add eax, dword [esp + 0x40]
push 4
push ecx
mov ecx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x44]
push ecx
mov ecx, dword [ebx + 0x2ec]
push eax
push edx
push ecx
call dword [sym.imp.USER32.dll_SetWindowPos]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret