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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x4b5898]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x6c], 0x2c
push edi
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x9c], esi
push eax
push dword [esi + 0x38]
call dword [sym.imp.USER32.dll_GetWindowPlacement]
test eax, eax
je 0x40553e
mov eax, dword [ebp - 0x64]
cmp eax, 2
je 0x405b77
cmp eax, 6
je 0x405b77
push 0xfffffffffffffff0
push dword [esi + 0x38]
call dword [sym.imp.USER32.dll_GetWindowLongW]
test eax, 0x10000000
je 0x405b77
cmp byte [esi + 0x42], 0
je 0x405554
call fcn.00403c10
lea ecx, [ebp - 0x14]
push ecx
push dword [esi + 0x38]
mov ecx, eax
call fcn.0040ed51
test eax, eax
jne 0x40556b
pop edi
pop esi
mov eax, 2
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004619c0
mov esp, ebp
pop ebp
ret
call fcn.00403c10
lea ecx, [ebp - 0x14]
push ecx
push dword [esi + 0x38]
mov ecx, eax
call fcn.0040edef
test eax, eax
je 0x40553e
mov eax, dword [ebp - 0x14]
cmp eax, 0xffffc400
jl 0x405b77
mov ecx, dword [ebp - 0x10]
cmp ecx, 0xffffc400
jl 0x405b77
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
sub ebx, eax
sub edi, ecx
mov dword [ebp - 0x80], edi
cmp ebx, 0x1024
jg 0x405b77
cmp edi, 0x1024
jg 0x405b77
test ebx, ebx
jle 0x40553e
test edi, edi
jle 0x40553e
add ebx, 8
cmp dword [esi + 0x54], 0
je 0x4055eb
cmp ebx, dword [esi + 0x5c]
jne 0x4055e3
cmp edi, dword [esi + 0x60]
jne 0x4055e3
lea eax, [esi + 0x84]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.USER32.dll_EqualRect]
test eax, eax
je 0x405611
mov byte [esi + 0x40], 0
jmp 0x405634
lea ecx, [esi + 0x50]
call fcn.00407250
push 0
push 0
push 0
push 0x20
mov eax, edi
lea ecx, [esi + 0x50]
neg eax
push eax
push ebx
call fcn.00406fa0
test eax, eax
jne 0x405611
inc dword [esi + 0x4c]
cmp dword [esi + 0x4c], 0x14
jmp 0x405b61
mov byte [esi + 0x40], 1
movups xmm0, xmmword [ebp - 0x14]
mov dword [esi + 0x9c], 0x10
mov dword [esi + 0xa0], 0
movups xmmword [esi + 0x84], xmm0
mov ecx, dword [esi + 0x78]
xor eax, eax
cmp byte [esi + 0x42], al
setne al
inc dword [esi + 0x7c]
add eax, 2
mov dword [ebp - 0x90], eax
test ecx, ecx
jne 0x40568c
call fcn.00406c90
mov edx, eax
xor ecx, ecx
xor eax, eax
xchg dword [edx], eax
test eax, eax
jne 0x405670
inc ecx
add edx, 4
cmp ecx, 4
jl 0x405658
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push dword [esi + 0x54]
mov dword [esi + 0x78], eax
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esi + 0x78]
mov dword [esi + 0x80], eax
mov eax, dword [ebp - 0x90]
push eax
push ecx
push dword [esi + 0x38]
call dword [sym.imp.USER32.dll_PrintWindow]
add dword [esi + 0x7c], 0xffffffff
mov dword [ebp - 0x90], eax
jne 0x4056e3
push dword [esi + 0x80]
push dword [esi + 0x78]
call dword [sym.imp.GDI32.dll_SelectObject]
call fcn.00406c90
mov ecx, dword [esi + 0x78]
xor edx, edx
nop dword [eax]
xchg dword [eax], ecx
test ecx, ecx
je 0x4056d6
inc edx
add eax, 4
cmp edx, 4
jl 0x4056c0
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [ebp - 0x90]
mov dword [esi + 0x78], 0
test eax, eax
jne 0x4056f3
inc dword [esi + 0x4c]
cmp dword [esi + 0x4c], 0x14
jmp 0x405b61
mov eax, dword [esi + 0x64]
mov dword [ebp - 0x8c], eax
mov eax, dword [esi + 0x58]
mov dword [ebp - 0x84], eax
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x405728
cmp dword [esi + 0xa0], 4
mov edx, eax
jge 0x405a2a
cmp dword [esi + 0x9c], 0
jle 0x405a2a
dec dword [esi + 0x9c]
mov eax, ebx
cdq
sub eax, edx
mov ecx, eax
mov eax, edi
cdq
sub eax, edx
sar ecx, 1
mov edi, eax
mov edx, 0x64
sar edi, 1
mov eax, ecx
cmp ecx, edx
mov dword [ebp - 0x94], edi
cmovg eax, edx
mov edx, edi
mov dword [ebp - 0x90], eax
shl eax, 2
cmp edi, 0x64
mov dword [ebp - 0x98], eax
mov eax, 0x64
cmovg edx, eax
xor edi, edi
mov dword [ebp - 0x7c], edx
lea eax, [ecx*4]
mov dword [ebp - 0xa0], eax
test edx, edx
jle 0x4057a9
add eax, dword [ebp - 0x84]
nop word [eax + eax]
mov ecx, dword [eax]
cmp ecx, 0xff000000
je 0x40579e
test ecx, ecx
jne 0x4057ea
add eax, dword [ebp - 0x8c]
inc edi
cmp edi, edx
jl 0x405790
xor edi, edi
mov eax, dword [ebp - 0x80]
lea ecx, [eax - 1]
cmp ecx, edx
jle 0x405802
mov esi, dword [ebp - 0x8c]
mov eax, ecx
imul eax, esi
add eax, dword [ebp - 0xa0]
add eax, dword [ebp - 0x84]
nop dword [eax]
mov edx, dword [eax]
cmp edx, 0xff000000
je 0x4057de
test edx, edx
jne 0x4057f6
mov edx, dword [ebp - 0x7c]
dec ecx
sub eax, esi
cmp ecx, edx
jg 0x4057d0
jmp 0x4057f9
cmp edi, edx
jge 0x4057a9
cmp edi, 0x12
jle 0x4057ab
inc edi
jmp 0x4057ab
mov edx, dword [ebp - 0x7c]
mov esi, dword [ebp - 0x9c]
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x7c], eax
sub dword [ebp - 0x7c], ecx
mov ecx, dword [ebp - 0x7c]
dec ecx
cmp ecx, edx
jl 0x405814
xor ecx, ecx
jmp 0x40581b
cmp ecx, 0x12
cmovg ecx, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x98]
sub eax, ecx
mov ecx, dword [ebp - 0x94]
sub eax, edi
imul ecx, dword [ebp - 0x8c]
mov dword [ebp - 0x80], eax
xor eax, eax
mov dword [ebp - 0x94], ecx
test edx, edx
jle 0x40586c
mov esi, dword [ebp - 0x84]
add esi, ecx
nop dword [eax]
mov ecx, dword [esi + eax]
cmp ecx, 0xff000000
je 0x40585f
test ecx, ecx
jne 0x405866
add eax, 4
cmp eax, edx
jl 0x405850
mov esi, dword [ebp - 0x9c]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0x7c], eax
cmp eax, dword [ebp - 0x90]
jl 0x405887
xor ecx, ecx
mov dword [ebp - 0x7c], ecx
jmp 0x405890
cmp eax, 0x12
jle 0x405890
inc eax
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x8c]
lea ecx, [eax - 4]
cmp ecx, dword [ebp - 0x98]
jle 0x4058d9
mov eax, dword [ebp - 0x94]
mov esi, dword [ebp - 0x98]
add eax, ecx
add eax, dword [ebp - 0x84]
mov edx, dword [eax]
cmp edx, 0xff000000
je 0x4058c3
test edx, edx
jne 0x4058cd
sub ecx, 4
sub eax, 4
cmp ecx, esi
jg 0x4058b5
mov esi, dword [ebp - 0x9c]
mov eax, dword [ebp - 0x8c]
sub eax, ecx
cdq
and edx, 3
add eax, edx
sar eax, 2
lea ecx, [eax - 1]
cmp ecx, dword [ebp - 0x90]
jl 0x4058f3
xor ecx, ecx
jmp 0x4058f9
cmp ecx, 0x12
cmovg ecx, eax
mov eax, dword [ebp - 0x7c]
sub ebx, ecx
mov edx, dword [esi + 0x2c]
sub ebx, eax
test edx, edx
je 0x405942
cmp byte [esi + 0x40], 0
jne 0x405935
cmp dword [esi + 8], ebx
jne 0x405935
mov ecx, dword [ebp - 0x80]
cmp dword [esi + 0xc], ecx
jne 0x405935
cmp dword [esi + 0x94], eax
jne 0x405935
cmp dword [esi + 0x98], edi
jne 0x405935
inc dword [esi + 0xa0]
jmp 0x405a16
mov eax, dword [edx]
push edx
call dword [eax + 8]
mov dword [esi + 0x2c], 0
mov ecx, dword [esi + 0x44]
lea edx, [esi + 0x2c]
mov eax, dword [ebp - 0x80]
push edx
push 0
mov dword [ebp - 0x40], ebx
lea edx, [ebp - 0x40]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x24], 3
mov dword [ebp - 0x1c], 0x10000
mov dword [ebp - 0x30], 0x57
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov eax, dword [ecx]
push edx
push ecx
call dword [eax + 0x14]
test eax, eax
jns 0x4059b4
mov ecx, esi
call fcn.00406280
inc dword [esi + 0x4c]
cmp dword [esi + 0x4c], 0x14
jmp 0x405b61
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x80]
add edx, ecx
mov dword [esi + 0xc], eax
mov dword [esi + 0x94], ecx
mov ecx, dword [ebp - 0x10]
lea eax, [edx + ebx]
mov dword [esi + 8], ebx
mov dword [esi + 0x1c], eax
add ecx, edi
mov eax, dword [ebp - 0x80]
add eax, ecx
mov dword [esi + 0x10], 0
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x24]
mov dword [esi + 4], 0
mov dword [esi + 0x98], edi
mov dword [esi + 0x14], edx
mov dword [esi + 0x18], ecx
test eax, eax
je 0x405a06
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
lea eax, [esi + 0x14]
push eax
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
mov edx, dword [esi + 0x2c]
mov dword [esi + 0x24], eax
mov byte [esi + 0x40], 1
test edx, edx
jne 0x405a2a
inc dword [esi + 0x4c]
cmp dword [esi + 0x4c], 0x14
jmp 0x405b61
mov ecx, dword [esi + 0x48]
lea edi, [ebp - 0x78]
push edi
push 0
push 2
mov eax, dword [ecx]
xor bl, bl
push 0
push edx
push ecx
mov byte [ebp - 0x85], bl
call dword [eax + 0x38]
test eax, eax
js 0x405b39
mov ecx, dword [esi + 0x98]
imul ecx, dword [ebp - 0x8c]
mov eax, dword [esi + 0x94]
mov edi, dword [ebp - 0x78]
add ecx, dword [ebp - 0x84]
lea ebx, [ecx + eax*4]
mov dword [ebp - 0x7c], ebx
test edi, edi
je 0x405b25
mov ebx, dword [esi + 8]
mov eax, dword [ebp - 0x74]
shl ebx, 2
cmp ebx, eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x84], 0
cmovg ebx, eax
cmp dword [esi + 0xc], 0
jle 0x405b21
mov eax, dword [ebp - 0x7c]
xor edx, edx
mov ecx, dword [ebp - 0x80]
test ebx, ebx
je 0x405b0a
test edi, edi
jne 0x405abb
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
jmp 0x405af8
test eax, eax
je 0x405ad0
cmp ecx, ebx
jb 0x405ad0
push ebx
push eax
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
jmp 0x405afe
push dword [ebp - 0x80]
push 0
push edi
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x7c]
add esp, 0xc
test eax, eax
je 0x405aad
mov ecx, dword [ebp - 0x80]
cmp ecx, ebx
jae 0x405b04
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x22
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x80]
mov edx, dword [ebp - 0x84]
add eax, dword [ebp - 0x8c]
inc edx
add edi, ecx
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x84], edx
cmp edx, dword [esi + 0xc]
jl 0x405aa5
mov bl, 1
jmp 0x405b2b
mov bl, byte [ebp - 0x85]
mov eax, dword [esi + 0x48]
push 0
push dword [esi + 0x2c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3c]
test bl, bl
je 0x405b57
pop edi
mov dword [esi + 0x4c], 0
xor eax, eax
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004619c0
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x4c]
inc eax
mov dword [esi + 0x4c], eax
cmp eax, 0x14
jle 0x405b77
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004619c0
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004619c0
mov esp, ebp
pop ebp
ret