Function at 0x40a980
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x150
push ebp
push esi
call fcn.00403c00
cmp byte [section..data], 0
mov esi, eax
je 0x40a9a3
push 0x47e5e0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [section..data], 0
mov ebp, dword [esi + 8]
mov dword [esp + 0x20], ebp
je 0x40a9be
push 0x47e5e0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x15c]
test esi, esi
jne 0x40a9d7
pop esi
mov eax, 1
pop ebp
add esp, 0x150
ret
cmp dword [esi], 0
jne 0x40a9e3
call fcn.00404990
jmp 0x40a9e8
call fcn.004048d0
test eax, eax
jge 0x40a9fa
pop esi
mov eax, 0x80040901
pop ebp
add esp, 0x150
ret
push ebx
push 0x60
call fcn.00416ff6
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40aa1a
pop ebx
pop esi
mov eax, 0x8007000e
pop ebp
add esp, 0x150
ret
push edi
mov ecx, 0x18
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
call fcn.00403c00
mov ecx, eax
call fcn.00402e50
mov esi, dword [esp + 0x168]
mov edi, eax
test edi, edi
je 0x40aac9
test esi, esi
jne 0x40aac9
cmp dword [esp + 0x16c], esi
jne 0x40aac9
call fcn.00403c00
mov ecx, eax
call fcn.00403090
push eax
push ebx
call edi
test al, al
jne 0x40aa90
test ebp, ebp
jne 0x40aa77
push 0x80040902
call fcn.00409470
add esp, 4
push ebx
call fcn.00416fd8
add esp, 4
pop edi
pop ebx
pop esi
mov eax, 0x80004004
pop ebp
add esp, 0x150
ret
call fcn.00403c00
mov ecx, eax
call fcn.004011f0
test eax, eax
jne 0x40aac9
call fcn.00403c00
mov ecx, eax
call fcn.004012f0
test eax, eax
jne 0x40aac9
push ebx
call fcn.00416fd8
add esp, 4
pop edi
pop ebx
pop esi
mov eax, 1
pop ebp
add esp, 0x150
ret
push ebx
call fcn.00403c00
mov ecx, eax
call fcn.00401230
push 1
push 1
call fcn.00406d80
call fcn.00403c30
test al, al
je 0x40aaf6
push 1
call fcn.00403c00
mov ecx, eax
call fcn.00401ab0
test esi, esi
jne 0x40ab10
cmp dword [esp + 0x16c], esi
jne 0x40ab10
test ebp, ebp
jne 0x40ab10
push ebx
call fcn.00404a20
add esp, 4
push ebx
mov byte [esp + 0x27], 0
call fcn.004033b0
add esp, 4
test eax, eax
jne 0x40ab34
push ebx
call fcn.004033d0
add esp, 4
test eax, eax
jne 0x40ab34
mov byte [esp + 0x23], 1
call fcn.00403c30
test al, al
mov edi, dword [sym.imp.USER32.dll_GetWindowLongW]
push ebx
je 0x40ad7e
call fcn.004033f0
add esp, 4
test al, al
je 0x40ac14
test ebp, ebp
je 0x40abb0
push ebp
call fcn.004033f0
add esp, 4
test al, al
jne 0x40abb0
push ebp
call fcn.004033b0
add esp, 4
push eax
call fcn.00403c00
mov ecx, eax
call fcn.004016f0
push ebp
call fcn.004033d0
add esp, 4
push eax
call fcn.00403c00
mov ecx, eax
call fcn.00401730
call fcn.00403c00
mov ecx, eax
call fcn.00401870
push eax
push 0xfffffffffffffff0
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_SetWindowLongW]
call fcn.00403e30
mov edi, eax
call fcn.00403e70
cmp edi, eax
je 0x40abce
push 0
call fcn.00403e30
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.00403e30
mov edi, eax
call fcn.00403e70
cmp edi, eax
jne 0x40ae06
call fcn.00403c00
mov ecx, eax
call fcn.004016b0
test eax, eax
je 0x40ae06
call fcn.00403c00
mov ecx, eax
call fcn.004016b0
push eax
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_SetMenu]
jmp 0x40ae06
test ebp, ebp
je 0x40ac29
push ebp
call fcn.004033f0
add esp, 4
test al, al
je 0x40acce
call fcn.00403c00
mov ecx, eax
call fcn.004017f0
push 0x2c
mov esi, eax
push 0
push esi
call fcn.00416d50
add esp, 0xc
push esi
mov dword [esi], 0x2c
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_GetWindowPlacement]
push 0xffffffffffffffec
call fcn.00403e70
push eax
call edi
shr eax, 3
and al, 1
mov byte [esp + 0x24], al
mov eax, dword [esp + 0x24]
push eax
call fcn.00403c00
mov ecx, eax
call fcn.004018b0
push 0xfffffffffffffff0
call fcn.00403e70
push eax
call edi
and eax, 0xdeffffff
push eax
call fcn.00403c00
mov ecx, eax
call fcn.00401830
test ebp, ebp
je 0x40acc7
push ebp
call fcn.004033b0
add esp, 4
push eax
call fcn.00403c00
mov ecx, eax
call fcn.00401770
push ebp
call fcn.004033d0
add esp, 4
push eax
call fcn.00403c00
mov ecx, eax
call fcn.004017b0
mov esi, dword [esp + 0x168]
push 0
call fcn.00403e30
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0x80080000
push 0xfffffffffffffff0
call fcn.00403e30
push eax
call dword [sym.imp.USER32.dll_SetWindowLongW]
call fcn.00403e30
mov edi, eax
call fcn.00403e70
cmp edi, eax
jne 0x40ad26
call fcn.00403e30
push eax
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call fcn.00403c00
mov ecx, eax
call fcn.00401670
push 0
call fcn.00403e30
push eax
call dword [sym.imp.USER32.dll_SetMenu]
push 0x2c
lea ecx, [esp + 0x58]
push 0
push ecx
call fcn.00416d50
add esp, 0xc
lea edx, [esp + 0x54]
push edx
mov dword [esp + 0x58], 0x2c
call fcn.00403e30
push eax
call dword [sym.imp.USER32.dll_GetWindowPlacement]
test byte [esp + 0x58], 2
je 0x40ae06
and dword [esp + 0x58], 0xfffffffd
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x60], 9
call fcn.00403e30
push eax
call dword [sym.imp.USER32.dll_SetWindowPlacement]
jmp 0x40ae06
call fcn.004033f0
add esp, 4
test al, al
je 0x40adc9
test ebp, ebp
je 0x40ae06
push ebp
call fcn.004033f0
add esp, 4
test al, al
jne 0x40ae06
push ebp
call fcn.004033b0
add esp, 4
push eax
call fcn.00403c00
mov ecx, eax
call fcn.004016f0
push ebp
call fcn.004033d0
add esp, 4
push eax
call fcn.00403c00
mov ecx, eax
call fcn.00401730
jmp 0x40ae06
test ebp, ebp
je 0x40ae06
push ebp
call fcn.004033f0
add esp, 4
test al, al
je 0x40ae06
push ebp
call fcn.004033b0
add esp, 4
push eax
call fcn.00403c00
mov ecx, eax
call fcn.00401770
push ebp
call fcn.004033d0
add esp, 4
push eax
call fcn.00403c00
mov ecx, eax
call fcn.004017b0
cmp byte [esp + 0x170], 0
jne 0x40af18
mov ecx, dword [esp + 0x16c]
push ecx
push esi
push ebx
push ebp
call fcn.00404820
add esp, 0x10
test al, al
je 0x40af18
push ebp
call fcn.00403390
add esp, 4
test al, al
je 0x40ae43
call fcn.004089e0
jmp 0x40ae48
call fcn.00409320
mov edi, eax
test edi, edi
jge 0x40ae64
cmp edi, 0x88760868
jne 0x40ae86
push 1
call fcn.00403c00
mov ecx, eax
call fcn.00402690
push ebx
call fcn.004033f0
add esp, 4
test al, al
je 0x40af96
call fcn.00403c00
mov ecx, eax
call fcn.00401df0
jmp 0x40afa2
cmp edi, 0x80040908
je 0x40aeee
cmp edi, 0x80040903
je 0x40aeee
push ebp
call fcn.00403c00
mov ecx, eax
call fcn.00401230
mov edx, dword [esp + 0x174]
mov eax, dword [esp + 0x16c]
push edx
push 1
push eax
push esi
push ebx
call fcn.0040a980
add esp, 0x14
test eax, eax
push 0
jge 0x40aeda
call fcn.0040a800
pop edi
pop ebx
pop esi
mov eax, 0x80040905
pop ebp
add esp, 0x150
ret
push 0
call fcn.00406d80
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0x150
ret
test ebp, ebp
je 0x40aefb
push ebp
call fcn.00416fd8
add esp, 4
push edi
call fcn.00409470
add esp, 4
push 0
call fcn.0040a800
mov eax, edi
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x150
ret
test ebp, ebp
je 0x40af26
push 0
call fcn.0040a7d0
add esp, 4
push ebx
call fcn.00403390
add esp, 4
test al, al
je 0x40af3b
push esi
call fcn.00408670
jmp 0x40af48
mov ecx, dword [esp + 0x16c]
push ecx
call fcn.00408d10
mov esi, eax
add esp, 4
test esi, esi
jge 0x40ae64
test ebp, ebp
je 0x40af62
push ebp
call fcn.00416fd8
add esp, 4
push 1
call fcn.0040a7d0
push esi
call fcn.00409470
add esp, 8
push 0
push 0
call fcn.00406d80
push 0
call fcn.00403c00
mov ecx, eax
call fcn.00401ab0
pop edi
pop ebx
mov eax, esi
pop esi
pop ebp
add esp, 0x150
ret
call fcn.00403c00
mov ecx, eax
call fcn.00401db0
push eax
call fcn.00406a80
push ebx
call fcn.00409b20
add esp, 8
push eax
call fcn.00403c00
mov ecx, eax
call fcn.004015f0
call fcn.004072c0
test ebp, ebp
je 0x40b026
push ebp
call fcn.004033f0
add esp, 4
test al, al
jne 0x40b026
push ebx
call fcn.004033f0
add esp, 4
test al, al
je 0x40b026
call fcn.00403c00
mov ecx, eax
call fcn.004017f0
push eax
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_SetWindowPlacement]
call fcn.00403c00
mov ecx, eax
call fcn.004018f0
neg al
push 0xb
push 0
push 0
push 0
push 0
sbb eax, eax
neg eax
add eax, 0xfffffffe
push eax
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_SetWindowPos]
push ebx
mov byte [esp + 0x26], 0
call fcn.004033f0
add esp, 4
test al, al
je 0x40b53e
cmp byte [esp + 0x23], 0
jne 0x40b53e
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
mov esi, dword [sym.imp.USER32.dll_GetClientRect]
je 0x40b138
push 0x2c
lea edx, [esp + 0x58]
push 0
push edx
call fcn.00416d50
add esp, 0xc
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x58], 0x2c
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_GetWindowPlacement]
test byte [esp + 0x58], 2
je 0x40b0d5
cmp dword [esp + 0x5c], 2
jne 0x40b0d5
push 9
call fcn.00403e70
mov ebp, dword [sym.imp.USER32.dll_ShowWindow]
push eax
call ebp
lea ecx, [esp + 0x10]
push ecx
call fcn.00403e70
push eax
call esi
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
sub esi, dword [esp + 0x10]
sub edi, dword [esp + 0x14]
push 6
call fcn.00403e70
push eax
call ebp
jmp 0x40b155
xor eax, eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
call fcn.00403c00
mov ecx, eax
call fcn.004016b0
neg eax
sbb eax, eax
neg eax
push eax
call fcn.00403c00
mov ecx, eax
call fcn.00401870
push eax
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov esi, dword [esp + 0x78]
sub esi, dword [esp + 0x70]
mov edi, dword [esp + 0x7c]
sub edi, dword [esp + 0x74]
sub esi, dword [esp + 0x18]
sub edi, dword [esp + 0x1c]
add esi, dword [esp + 0x10]
add edi, dword [esp + 0x14]
jmp 0x40b155
lea eax, [esp + 0x10]
push eax
call fcn.00403e70
push eax
call esi
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
sub esi, dword [esp + 0x10]
sub edi, dword [esp + 0x14]
push ebx
call fcn.004033b0
add esp, 4
cmp esi, eax
jne 0x40b16f
push ebx
call fcn.004033d0
add esp, 4
cmp edi, eax
je 0x40b174
mov byte [esp + 0x22], 1
cmp byte [esp + 0x174], 0
mov esi, 0x28
je 0x40b20d
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
jne 0x40b20d
push ebx
mov dword [esp + 0x30], esi
call fcn.00409b20
add esp, 4
lea ecx, [esp + 0x2c]
mov edi, eax
push ecx
push edi
call fcn.00413580
push 1
call fcn.00407ed0
push eax
call fcn.004136c0
lea edx, [esp + 0x10]
push edx
mov ebp, eax
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x40]
jl 0x40b1f9
mov ecx, dword [esp + 0x18]
cmp ecx, dword [esp + 0x48]
jg 0x40b1f9
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x44]
jl 0x40b1f9
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x4c]
jle 0x40b20d
cmp ebp, edi
jne 0x40b218
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_IsZoomed]
test eax, eax
je 0x40b218
cmp byte [esp + 0x22], 0
je 0x40b53e
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x40b236
push 9
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_IsZoomed]
test eax, eax
je 0x40b254
push 9
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
cmp byte [esp + 0x174], 0
push ebx
je 0x40b3ad
mov dword [esp + 0x30], esi
call fcn.00409b20
add esp, 4
lea ecx, [esp + 0x2c]
push ecx
push eax
call fcn.00413580
lea edx, [esp + 0x54]
push edx
push 1
mov dword [esp + 0x5c], esi
call fcn.00407ed0
push eax
call fcn.004136c0
push eax
call fcn.00413580
mov edi, dword [esp + 0x48]
mov ebp, dword [esp + 0x4c]
sub edi, dword [esp + 0x40]
sub ebp, dword [esp + 0x44]
push ebx
call fcn.004033b0
push ebx
mov esi, eax
call fcn.004033d0
mov dword [esp + 0x2c], eax
add esp, 8
lea eax, [esp + 0xf0]
push eax
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [esp + 0x24]
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ecx
call fcn.00403c00
mov ecx, eax
call fcn.004016b0
neg eax
sbb eax, eax
neg eax
push eax
push 0xfffffffffffffff0
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
push eax
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x1c]
sub esi, dword [esp + 0x14]
sub ecx, eax
cmp ecx, edi
jle 0x40b32a
mov ecx, edi
cmp esi, ebp
jle 0x40b330
mov esi, ebp
cmp eax, dword [esp + 0x40]
jl 0x40b354
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x44]
jl 0x40b354
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x48]
jg 0x40b354
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x4c]
jle 0x40b38f
mov eax, edi
sub eax, ecx
cdq
sub eax, edx
mov edi, eax
mov eax, ebp
mov ebp, dword [esp + 0x40]
sub eax, esi
cdq
sub eax, edx
sar edi, 1
lea edx, [edi + ebp]
sar eax, 1
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x44]
add edx, eax
add edi, ecx
add edi, ebp
add eax, esi
add eax, dword [esp + 0x44]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
push 4
push esi
push ecx
push edx
push eax
xor ebp, ebp
push ebp
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_SetWindowPos]
jmp 0x40b42e
xor eax, eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
call fcn.004033b0
push ebx
mov dword [esp + 0x20], eax
call fcn.004033d0
add esp, 8
mov dword [esp + 0x1c], eax
call fcn.00403c00
mov ecx, eax
call fcn.004016b0
neg eax
sbb eax, eax
neg eax
push eax
push 0xfffffffffffffff0
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
push eax
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
sub ecx, dword [esp + 0x14]
sub eax, dword [esp + 0x10]
push 6
push ecx
push eax
push 0
push 0
push 0
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_SetWindowPos]
xor ebp, ebp
lea edx, [esp + 0x80]
push edx
call fcn.00403e70
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
push ebx
call fcn.004033b0
mov ecx, dword [esp + 0x8c]
sub ecx, dword [esp + 0x84]
add esp, 4
cmp ecx, eax
jne 0x40b47c
push ebx
call fcn.004033d0
mov edx, dword [esp + 0x90]
sub edx, dword [esp + 0x88]
add esp, 4
cmp edx, eax
je 0x40b53e
lea eax, [esp + 0x100]
push eax
call fcn.00407cc0
mov esi, eax
mov ecx, 0x18
lea edi, [esp + 0x90]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
call fcn.00403390
add esp, 4
test al, al
je 0x40b4b6
mov dword [esp + 0xa4], ebp
jmp 0x40b4bd
mov dword [esp + 0xa0], ebp
lea edx, [esp + 0x90]
push edx
call fcn.00403390
add esp, 4
test al, al
je 0x40b4da
mov dword [esp + 0xa8], ebp
jmp 0x40b4e1
mov dword [esp + 0xa4], ebp
mov eax, dword [esp + 0x174]
push eax
push ebp
push ebp
lea ecx, [esp + 0x9c]
push ebp
push ecx
call fcn.0040a980
mov esi, eax
add esp, 0x14
cmp esi, ebp
jge 0x40b53e
mov eax, dword [esp + 0x28]
cmp eax, ebp
je 0x40b513
push eax
call fcn.00416fd8
add esp, 4
push 1
call fcn.0040a7d0
add esp, 4
push ebp
push ebp
call fcn.00406d80
push ebp
call fcn.00403c00
mov ecx, eax
call fcn.00401ab0
pop edi
pop ebx
mov eax, esi
pop esi
pop ebp
add esp, 0x150
ret
call fcn.00407ed0
push eax
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
jne 0x40b55c
push 5
call fcn.00407ed0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.004040d0
test al, al
jne 0x40b56c
push 0x80000002
jmp 0x40b571
push 0x80000000
call dword [sym.imp.KERNEL32.dll_SetThreadExecutionState]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40b588
push eax
call fcn.00416fd8
add esp, 4
push 0
call fcn.00403c00
mov ecx, eax
call fcn.00401ab0
push 0
push 0
call fcn.00406d80
push 1
call fcn.00403c00
mov ecx, eax
call fcn.00402350
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0x150
ret