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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x80
mov eax, dword [0x5d52e0]
xor eax, esp
mov dword [esp + 0x7c], eax
mov eax, dword [edi + 0x9c]
mov ecx, dword [edi + 0xa0]
mov edx, dword [edi + 0xa4]
push ebx
lea ebx, [edi + 0x9c]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0xc], ecx
xor ecx, ecx
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x20]
push esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
cmp eax, ecx
je 0x540499
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [edi + 0xe8]
mov edx, dword [ecx + 8]
xor eax, eax
mov esi, 0x12c
cmp edx, eax
jle 0x5404c3
mov ecx, dword [ecx + 4]
add ecx, 0x14
cmp dword [ecx + 0xc], eax
je 0x5404ba
mov esi, dword [ecx]
add ecx, 0x90
dec edx
jne 0x5404b3
push 0x1b68
push 0x27e0
push eax
push eax
lea edx, [esp + 0x4c]
push edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esp + 0x3c]
imul ecx, esi
mov eax, 0x1b4e81b5
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x258
cdq
idiv esi
mov ecx, dword [esp + 0x44]
imul ecx, esi
mov dword [esp + 0x3c], eax
mov eax, 0x1b4e81b5
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x258
cdq
idiv esi
mov edx, dword [esp + 0x40]
imul edx, esi
mov ecx, eax
mov eax, 0x1b4e81b5
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x258
cdq
idiv esi
mov edx, dword [esp + 0x48]
imul edx, esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x40], eax
mov eax, 0x1b4e81b5
imul edx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x258
cdq
idiv esi
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
sub ecx, edx
mov dword [esp + 0x1c], edx
mov edx, dword [edi + 0xc4]
sub edx, dword [edi + 0xbc]
mov dword [esp + 0x20], esi
mov esi, eax
cmp ecx, edx
jl 0x5405b4
mov ecx, dword [edi + 0xc8]
sub ecx, dword [edi + 0xc0]
sub eax, dword [esp + 0x40]
cmp eax, ecx
jge 0x5405d2
mov edx, dword [edi + 0xc0]
mov ecx, dword [edi + 0xbc]
mov eax, dword [edi + 0xc4]
mov esi, dword [edi + 0xc8]
mov dword [esp + 0x20], edx
jmp 0x5405da
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x34]
sub edx, dword [esp + 0x2c]
sub eax, ecx
sub edx, 0x3c
mov dword [esp + 8], edx
fild dword [esp + 8]
mov dword [esp + 8], eax
fild dword [esp + 8]
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x30]
sub esi, dword [esp + 0x20]
fdivp st(1)
sub eax, 0x3c
mov dword [esp + 8], eax
fild dword [esp + 8]
mov dword [esp + 8], esi
fild dword [esp + 8]
fdivp st(1)
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x540627
fstp st(0)
jmp 0x540629
fstp st(1)
fst qword [edi + 0xd0]
mov ecx, dword [edi + 0xc8]
sub ecx, dword [edi + 0xc0]
mov dword [esp + 8], ecx
fild dword [esp + 8]
fmul st(1)
call fcn.00505d50
mov edx, dword [edi + 0xc4]
sub edx, dword [edi + 0xbc]
push eax
mov dword [esp + 0xc], edx
fild dword [esp + 0xc]
fmulp st(1)
call fcn.00505d50
mov esi, dword [sym.imp.USER32.dll_SetRect]
push eax
push 0
push 0
push ebx
call esi
mov eax, dword [edi + 0xe8]
cmp dword [eax + 0x44], 0x64
jle 0x5406bb
fild dword [eax + 0x44]
mov eax, dword [ebx + 0xc]
sub eax, dword [ebx + 4]
fdiv qword [0x5ae0b8]
mov dword [esp + 8], eax
fild dword [esp + 8]
fmul st(1)
call fcn.00505d50
mov ecx, dword [ebx + 8]
sub ecx, dword [ebx]
push eax
mov dword [esp + 0xc], ecx
fild dword [esp + 0xc]
fmulp st(1)
call fcn.00505d50
push eax
push 0
push 0
push ebx
call esi
xor eax, eax
push 0x17
lea edx, [esp + 0x50]
push edx
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov esi, 0x3c
push eax
mov ecx, edi
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], 0x17
call fcn.004105ff
xor eax, eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
push 0x17
lea eax, [esp + 0x6c]
push eax
push 1
mov ecx, edi
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], 0x17
call fcn.004105ff
mov ecx, dword [edi + 0xe8]
cmp dword [ecx + 0x44], 0x64
mov ecx, dword [ebx + 8]
jne 0x5407af
mov eax, dword [ebx]
mov esi, dword [esp + 0x30]
mov edx, ecx
sub edx, eax
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x34]
sub edx, dword [esp + 0x2c]
sub eax, ecx
sub eax, dword [esp + 0x2c]
mov dword [esp + 0x5c], edx
mov edx, dword [ebx + 0xc]
sub edx, dword [ebx + 4]
add eax, dword [esp + 0x34]
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x38]
sub edx, esi
mov dword [esp + 0x78], edx
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [ebx + 4]
sub eax, esi
sub eax, dword [ebx + 0xc]
sar ecx, 1
add eax, dword [esp + 0x38]
mov dword [esp + 0x60], 0
cdq
sub eax, edx
sar eax, 1
push eax
mov dword [esp + 0x80], 0
push ecx
jmp 0x54089f
sub ecx, dword [ebx]
mov esi, dword [ebx + 0xc]
sub esi, dword [ebx + 4]
lea eax, [ecx + 0x3c]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x34]
sub eax, dword [esp + 0x2c]
lea edx, [esi + 0x3c]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x38]
sub eax, dword [esp + 0x30]
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], eax
mov eax, dword [edi + 0xe0]
test eax, eax
js 0x54087f
cmp dword [edi + 0xe4], 0
jl 0x54087f
mov edx, dword [esp + 0xc]
sub eax, edx
imul eax, ecx
mov ecx, dword [esp + 0x14]
sub ecx, edx
cdq
idiv ecx
mov ecx, eax
sub ecx, dword [edi + 0xe0]
add ecx, 0x1e
mov dword [esp + 0x60], ecx
jns 0x54081f
xor ecx, ecx
jmp 0x54082d
mov eax, dword [esp + 0x58]
sub eax, dword [esp + 0x5c]
cmp ecx, eax
jl 0x540831
mov ecx, eax
mov dword [esp + 0x60], ecx
mov edx, dword [esp + 0x10]
mov eax, dword [edi + 0xe4]
sub eax, edx
imul eax, esi
mov esi, dword [esp + 0x18]
sub esi, edx
cdq
idiv esi
sub eax, dword [edi + 0xe4]
add eax, 0x1e
mov dword [esp + 0x7c], eax
jns 0x54085c
xor eax, eax
jmp 0x54086a
mov edx, dword [esp + 0x74]
sub edx, dword [esp + 0x78]
cmp eax, edx
jl 0x54086e
mov eax, edx
mov dword [esp + 0x7c], eax
or edx, 0xffffffff
mov dword [edi + 0xe0], edx
mov dword [edi + 0xe4], edx
jmp 0x540887
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x7c]
mov edx, 0x1e
sub edx, ecx
sub edx, dword [ebx]
mov ecx, 0x1e
sub ecx, dword [edi + 0xa0]
sub ecx, eax
push ecx
push edx
push ebx
call dword [sym.imp.USER32.dll_OffsetRect]
push 1
lea eax, [esp + 0x50]
push eax
push 0
mov ecx, edi
call fcn.004105bf
push 1
lea ecx, [esp + 0x6c]
push ecx
push 1
mov ecx, edi
call fcn.004105bf
mov ecx, dword [esp + 0x84]
pop esi
pop ebx
xor ecx, esp
call fcn.004ff57c
mov esp, ebp
pop ebp
ret