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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], ecx
mov esi, edx
mov edi, eax
xor eax, eax
push ebp
push 0x540ab9
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
test esi, esi
je 0x540a9b
mov byte [ebp - 5], 1
mov edx, 7
mov eax, esi
call fcn.0051cd20
test al, al
jne 0x540a9b
mov eax, dword [0x6a1f20]
mov byte [eax], 1
lea edx, [ebp - 0x14]
mov eax, esi
call fcn.005400fc
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 4]
call fcn.00413c50
push 0xfffffffffffffff0
push esi
call sub.user32.dll_GetWindowLongW
mov dword [ebp - 0xc], eax
xor ebx, ebx
mov eax, dword [ebp - 4]
mov edx, 0x540ad8
call fcn.0040755c
jne 0x54037a
mov eax, dword [ebp - 0xc]
and eax, 0x1f
mov edx, dword [ebp - 0xc]
and edx, 3
cmp edx, 3
je 0x5402c4
mov edx, dword [ebp - 0xc]
and edx, 0xe
cmp edx, 0xe
jne 0x54032c
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongW
and eax, 0x20000
cmp eax, 0x20000
jne 0x540302
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540af4
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x571018]
call fcn.00586afc
mov ebx, eax
jmp 0x540a6b
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b0c
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x57114c]
call fcn.0058a878
mov ebx, eax
jmp 0x540a6b
mov edx, dword [ebp - 0xc]
and edx, 0xd
cmp edx, 0xd
je 0x540a6b
add eax, 0xfffffffb
sub eax, 2
jb 0x540a6b
sub eax, 4
je 0x540a6b
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b0c
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x570eb0]
call fcn.00586afc
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540b2c
call fcn.0040755c
jne 0x5403b3
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b0c
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x572f14]
call fcn.00586afc
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540b48
call fcn.0040755c
jne 0x5404ef
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b0c
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x5734c8]
call fcn.0058d310
mov ebx, eax
mov eax, esi
call fcn.004c1488
mov edx, dword [ebx + 0x5c]
mov dword [edx + 0x3c], eax
mov eax, dword [ebx + 0x5c]
mov esi, dword [eax + 0x3c]
test esi, esi
je 0x540a6b
mov eax, esi
mov edx, dword [0x4bca4c]
call fcn.00405304
test al, al
je 0x540a6b
mov eax, esi
call fcn.004c9a0c
dec eax
test eax, eax
jl 0x5404cd
inc eax
mov dword [ebp - 0x10], eax
xor esi, esi
mov eax, dword [ebx + 0x5c]
mov eax, dword [eax + 0x3c]
mov edx, esi
call fcn.004c99d0
mov edx, dword [0x46d8d4]
call fcn.00405304
test al, al
je 0x54048c
mov eax, dword [ebx + 0x5c]
mov eax, dword [eax + 0x3c]
mov edx, esi
call fcn.004c99d0
mov eax, dword [eax + 0x64]
push eax
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
call fcn.005cb994
mov edx, eax
pop eax
call fcn.004588f0
mov eax, dword [ebx + 0x5c]
mov eax, dword [eax + 0x3c]
mov edx, esi
call fcn.004c99d0
mov dl, 1
call fcn.00476694
jmp 0x5404c3
mov eax, dword [ebx + 0x5c]
mov eax, dword [eax + 0x3c]
mov edx, esi
call fcn.004c99d0
mov edx, dword [0x4bca4c]
call fcn.00405304
test al, al
je 0x5404c3
mov eax, dword [ebx + 0x5c]
mov eax, dword [eax + 0x3c]
mov edx, esi
call fcn.004c99d0
call fcn.004cdf0c
mov edx, eax
mov eax, edi
call fcn.00540224
inc esi
dec dword [ebp - 0x10]
jne 0x540431
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
call fcn.005cb98c
mov edx, eax
mov eax, dword [ebx + 0x5c]
mov eax, dword [eax + 0x3c]
call fcn.004c5140
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540b64
call fcn.0040755c
jne 0x540552
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b94
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x5734c8]
call fcn.0058d310
mov ebx, eax
mov eax, esi
call fcn.004c1488
mov edx, dword [ebx + 0x5c]
mov dword [edx + 0x3c], eax
mov eax, dword [ebx + 0x5c]
cmp dword [eax + 0x3c], 0
je 0x540546
mov eax, dword [ebx + 0x5c]
mov eax, dword [eax + 0x3c]
xor edx, edx
call fcn.004c4fc0
mov eax, dword [ebx + 0x5c]
mov byte [eax + 0x39], 1
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540bb4
call fcn.0040755c
jne 0x5405ba
mov eax, dword [edi + 0x44]
test eax, eax
je 0x54056f
mov byte [eax + 0xa9], 0
push esi
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x540a6b
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540af4
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
mov eax, dword [eax + 0x44]
mov edx, dword [eax]
call dword [edx + 0x20]
xor al, 1
push eax
mov ecx, esi
mov dl, 1
mov eax, dword [0x573bdc]
call fcn.0057e0e0
mov ebx, eax
mov byte [ebx + 4], 1
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540bcc
call fcn.0040755c
jne 0x5406b7
mov eax, dword [ebp - 0xc]
and eax, 7
cmp eax, 7
jne 0x540602
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b94
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x573050]
call fcn.0058980c
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 0xc]
and eax, 3
cmp eax, 3
je 0x540623
mov eax, dword [ebp - 0xc]
and eax, 2
cmp eax, 2
je 0x540623
mov eax, dword [ebp - 0xc]
and eax, 5
cmp eax, 5
jne 0x54064d
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b0c
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x57274c]
call fcn.0058a4a8
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 0xc]
and eax, 9
cmp eax, 9
je 0x540663
mov eax, dword [ebp - 0xc]
and eax, 4
cmp eax, 4
jne 0x54068d
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b0c
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x57274c]
call fcn.0058a4a8
mov ebx, eax
jmp 0x540a6b
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540be8
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x571438]
call fcn.00587d18
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540c04
call fcn.0040755c
jne 0x540711
mov eax, dword [edi + 0x44]
test eax, eax
je 0x5406d4
mov byte [eax + 0xa9], 0
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540c24
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
mov eax, dword [eax + 0x44]
mov edx, dword [eax]
call dword [edx + 0x20]
xor al, 1
push eax
mov ecx, esi
mov dl, 1
mov eax, dword [0x574f38]
call fcn.0058201c
mov ebx, eax
mov byte [ebx + 4], 1
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540c44
call fcn.0040755c
jne 0x540758
mov eax, dword [edi + 0x44]
test eax, eax
je 0x54072e
mov byte [eax + 0xa9], 0
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540c24
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x573bdc]
call fcn.0057e0e0
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540c64
call fcn.0040755c
jne 0x54079f
mov eax, dword [edi + 0x44]
test eax, eax
je 0x540775
mov byte [eax + 0xa9], 0
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540c24
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x574f38]
call fcn.0058201c
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540c8c
call fcn.0040755c
jne 0x5407f2
push 0xfffffffffffffff0
push esi
call sub.user32.dll_GetWindowLongW
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
and eax, 0x10
cmp eax, 0x10
jne 0x540a6b
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b0c
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x571de0]
call fcn.00586afc
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540cac
call fcn.0040755c
jne 0x54083e
mov eax, dword [ebp - 0xc]
and eax, 0x2000
cmp eax, 0x2000
je 0x540a6b
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540cd8
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x5758b4]
call fcn.0058f8b4
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540cfc
call fcn.0040755c
jne 0x54087b
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540af4
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x574310]
call fcn.0057f274
mov ebx, eax
mov byte [ebx + 4], 1
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540d24
call fcn.0040755c
jne 0x5408bb
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540d50
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x571f10]
call fcn.0058b634
mov ebx, eax
mov dword [ebx + 0x78], 2
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540d80
call fcn.0040755c
jne 0x5408f4
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540db0
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x5721c4]
call fcn.00593638
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540dd0
call fcn.0040755c
jne 0x540941
cmp dword [edi + 0x44], 0
je 0x540913
mov eax, dword [edi + 0x44]
mov byte [eax + 0xa9], 0
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540af4
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x573bdc]
call fcn.0057e0e0
mov ebx, eax
mov byte [ebx + 4], 1
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540dec
call fcn.0040755c
je 0x54095f
mov eax, dword [ebp - 4]
mov edx, 0x540e10
call fcn.0040755c
jne 0x540989
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b0c
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x571314]
call fcn.00586afc
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540e2c
call fcn.0040755c
jne 0x5409fd
push 0xfffffffffffffff0
push esi
call sub.user32.dll_GetWindowLongW
and eax, 0x200
cmp eax, 0x200
jne 0x5409d6
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540e58
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x572b80]
call fcn.00586afc
mov ebx, eax
jmp 0x540a6b
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b0c
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x572b80]
call fcn.00586afc
mov ebx, eax
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540e6c
call fcn.0040755c
jne 0x540a37
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540af4
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x574da8]
call fcn.0057e0e0
mov ebx, eax
mov byte [ebx + 4], 1
jmp 0x540a6b
mov eax, dword [ebp - 4]
mov edx, 0x540e94
call fcn.0040755c
jne 0x540a6b
push 0
mov eax, dword [edi + 0x44]
mov eax, dword [eax + 0x5c]
call fcn.005c22b4
push eax
push 0x540b0c
push 1
mov ecx, esi
mov dl, 1
mov eax, dword [0x572f14]
call fcn.00586afc
mov ebx, eax
test ebx, ebx
je 0x540a93
mov eax, dword [edi + 0x48]
mov edx, ebx
call fcn.00436f20
lea eax, [ebx + 0x2c]
push eax
lea eax, [ebx + 0x1c]
push eax
lea eax, [ebx + 0x24]
push eax
lea ecx, [ebx + 0xc]
lea edx, [ebx + 0x3c]
mov eax, dword [edi + 0x3c]
call fcn.00576ea0
mov eax, dword [0x6a1f20]
mov byte [eax], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x540ac0
lea eax, [ebp - 0x14]
call fcn.00406e64
lea eax, [ebp - 4]
call fcn.00406e64
ret