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

Disassembly:
sub esp, 0x64
push ebx
push ebp
push esi
push edi
mov edi, eax
mov ecx, dword [edi + 0x20]
lea eax, [esp + 0x44]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
add eax, 2
mov dword [esp + 0x48], eax
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x58]
add ecx, 2
xor edx, edx
xor ebp, ebp
shr eax, 2
test eax, eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x14], ebp
jle 0x404c3f
mov ecx, 0xfffffffc
mov dword [esp + 0x20], ecx
cmp ebp, edx
jl 0x404a18
mov eax, dword [edi + 0x58]
mov esi, eax
shr esi, 2
sub esi, 1
cmp ebp, esi
jg 0x404a18
add ecx, 4
cmp ecx, edx
jl 0x404946
cmp ecx, eax
jg 0x404946
mov dword [edi + 0x5c], ecx
mov esi, dword [edi + 0x5c]
lea ecx, [esi + 4]
cmp ecx, eax
mov ebx, 4
jle 0x40495b
sub eax, esi
mov ebx, eax
js 0x404974
mov edx, dword [edi + 0x60]
push ebx
add edx, esi
push edx
lea eax, [esp + 0x24]
push eax
call fcn.00431200
add esp, 0xc
add esi, ebx
mov dword [edi + 0x5c], esi
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi + 8]
add ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x4c]
jle 0x404b83
test ebp, ebp
jle 0x404b83
mov edx, dword [esp + 0x44]
add dword [esp + 0x18], 1
lea esi, [ebp - 1]
test esi, esi
mov dword [esp + 0x10], edx
jl 0x404a23
mov eax, dword [edi + 0x58]
mov ecx, eax
shr ecx, 2
sub ecx, 1
cmp esi, ecx
jg 0x404a23
mov ecx, dword [esp + 0x20]
test ecx, ecx
jl 0x4049c3
cmp ecx, eax
jg 0x4049c3
mov dword [edi + 0x5c], ecx
mov ebx, dword [edi + 0x5c]
lea edx, [ebx + 4]
cmp edx, eax
mov ebp, 4
jle 0x4049d8
sub eax, ebx
mov ebp, eax
js 0x4049f1
mov eax, dword [edi + 0x60]
push ebp
add eax, ebx
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.00431200
add esp, 0xc
add ebx, ebp
mov dword [edi + 0x5c], ebx
mov ebp, dword [esp + 0x14]
test esi, esi
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0x10]
mov dword [esp + 0x40], eax
mov dword [esp + 0x30], ebp
mov ebx, esi
jl 0x404ad0
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x28], ecx
jmp 0x404a34
xor esi, esi
mov dword [esp + 0x1c], esi
jmp 0x404978
mov dword [esp + 0x38], 0
jmp 0x4049f5
mov ecx, dword [esp + 0x28]
test ebx, ebx
jl 0x404abf
mov eax, dword [edi + 0x58]
mov edx, eax
shr edx, 2
sub edx, 1
cmp ebx, edx
jg 0x404abf
test ecx, ecx
jl 0x404a56
cmp ecx, eax
jg 0x404a56
mov dword [edi + 0x5c], ecx
mov esi, dword [edi + 0x5c]
lea ecx, [esi + 4]
cmp ecx, eax
mov ebp, 4
jle 0x404a6b
sub eax, esi
mov ebp, eax
js 0x404a84
mov edx, dword [edi + 0x60]
push ebp
add edx, esi
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00431200
add esp, 0xc
add esi, ebp
mov dword [edi + 0x5c], esi
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
cmp dword [ecx + 0x10], edx
jl 0x404ad0
mov al, byte [ecx + 0x18]
add ecx, 0x18
cmp al, 0x20
je 0x404ac9
test al, al
jl 0x404ac9
push ecx
call fcn.00404800
test eax, eax
jne 0x404ac9
sub dword [esp + 0x28], 4
sub ebx, 1
test ebx, ebx
jge 0x404a30
jmp 0x404ad0
mov dword [esp + 0x3c], 0
jmp 0x404a88
add ebx, 1
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x30]
cmp ebx, ebp
jge 0x404b71
lea ecx, [ebx*4]
mov dword [esp + 0x28], ecx
test ebx, ebx
jl 0x404bb2
mov eax, dword [edi + 0x58]
mov edx, eax
shr edx, 2
sub edx, 1
cmp ebx, edx
jg 0x404bb2
test ecx, ecx
jl 0x404b0d
cmp ecx, eax
jg 0x404b0d
mov dword [edi + 0x5c], ecx
mov esi, dword [edi + 0x5c]
lea edx, [esi + 4]
cmp edx, eax
mov ebp, 4
jle 0x404b22
sub eax, esi
mov ebp, eax
js 0x404b3f
mov eax, dword [edi + 0x60]
push ebp
add eax, esi
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.00431200
mov ecx, dword [esp + 0x34]
add esp, 0xc
add esi, ebp
mov dword [edi + 0x5c], esi
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov dword [eax + 0x10], edx
mov edx, dword [esp + 0x10]
mov dword [eax], edx
add edx, dword [eax + 8]
add ebx, 1
add ecx, 4
cmp ebx, ebp
mov dword [esp + 0x10], edx
mov dword [esp + 0x28], ecx
jl 0x404ae7
mov ebx, dword [esp + 0x30]
lea eax, [esp + 0x34]
push eax
add ebx, 0xffffffff
push ebx
call fcn.00404cc0
mov esi, dword [esp + 0x1c]
cmp byte [esi + 0x18], 0xd
jne 0x404bba
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x10], eax
add eax, 1
mov dword [esp + 0x18], eax
lea eax, [esp + 0x34]
mov dword [esi], ecx
mov edx, dword [esp + 0x44]
push eax
push ebp
mov dword [esp + 0x18], edx
call fcn.00404cc0
jmp 0x404bce
xor eax, eax
mov dword [esp + 0x2c], eax
jmp 0x404b47
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov dword [esi], eax
mov dword [esi + 0x10], ecx
add eax, dword [esi + 8]
mov dword [esp + 0x10], eax
mov edx, dword [edi + 0x58]
shr edx, 2
sub edx, 1
cmp ebp, edx
jne 0x404bec
cmp byte [esi + 0x18], 0xd
je 0x404bec
lea eax, [esp + 0x34]
push eax
push ebp
call fcn.00404cc0
xor edx, edx
xor ecx, ecx
cmp byte [esi + 0x18], 0xd
jne 0x404bfc
mov ecx, dword [edi + 0xb8]
mov eax, dword [edi + 0x58]
shr eax, 2
sub eax, 1
cmp ebp, eax
jne 0x404c1f
mov eax, dword [esi + 0x14]
add eax, dword [esi + 4]
add eax, ecx
mov ecx, edx
sets cl
sub ecx, 1
and ecx, eax
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x20]
mov eax, dword [edi + 0x58]
add ebp, 1
add ecx, 4
shr eax, 2
cmp ebp, eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], ecx
jl 0x40491d
mov eax, dword [esp + 0x50]
sub eax, dword [esp + 0x48]
cmp dword [esp + 0x24], eax
jge 0x404c51
mov dword [esp + 0x24], edx
mov ecx, dword [esp + 0x24]
cmp eax, ecx
mov dword [esp + 0x54], 0x1c
mov dword [esp + 0x58], 3
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], eax
jb 0x404c79
mov dword [esp + 0x64], ecx
push 1
lea ecx, [esp + 0x58]
push ecx
push 1
mov ecx, edi
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], 1
call fcn.0040f3a0
mov eax, dword [esp + 0x60]
sub eax, dword [esp + 0x64]
cmp dword [edi + 0xbc], eax
jbe 0x404cb6
mov dword [edi + 0xbc], eax
call fcn.004051e0
mov dword [edi + 0x80], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret