Function at 0x40cce3
Capabilities:
Check os version
Copy file
Create process on windows
Get common file path
Get file size
Get program files directory
Query or enumerate registry value
Read file on windows
Set current directory
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0xb90
mov eax, dword [0x44c750]
push ebx
push esi
push edi
mov ebx, 0x104
push ebx
mov esi, 0x547c50
push esi
xor edi, edi
push edi
mov dword [ebp + 0x64], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push esi
call fcn.0042aee0
cmp eax, edi
pop ecx
pop ecx
jne 0x40cd35
push edi
push str.Fatal_Error
push str.Invalid_access_rights_
push edi
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
jmp 0x40d273
push esi
mov byte [eax + 1], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x85c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x85c]
push 0x43dab4
push eax
call fcn.0041cd38
test al, al
pop ecx
pop ecx
je 0x40cd7d
lea eax, [ebp - 0x85c]
push eax
call fcn.0042a240
pop ecx
lea ecx, [ebp - 0x85c]
dec ecx
mov byte [eax + ecx], 0
push edi
call fcn.0042b4a3
push eax
lea eax, [ebp - 0x85c]
push eax
push str._s.zylomisrtemp_d_
push 0x547640
call dword [sym.imp.USER32.dll_wsprintfA]
push str.UnInstall.log
mov esi, 0x547850
push esi
call fcn.0042a630
add esp, 0x1c
call fcn.0041e223
cmp eax, 1
mov dword [ebp - 0xa68], eax
jle 0x40cfca
lea eax, [ebp - 0x758]
push eax
push 1
call fcn.0041e229
lea eax, [ebp - 0x758]
push str.__uninstall
push eax
call fcn.0042ae50
add esp, 0x10
test eax, eax
jne 0x40ce0b
cmp dword [ebp - 0xa68], 2
mov byte [0x54817d], 1
jle 0x40cfd7
push esi
push 2
call fcn.0041e229
pop ecx
pop ecx
jmp 0x40cfca
lea eax, [ebp - 0x758]
push str.__uninstallfromtemp
push eax
call fcn.0042ae50
test eax, eax
pop ecx
pop ecx
jne 0x40ce59
cmp dword [ebp - 0xa68], 3
mov byte [0x54817d], 1
mov byte [0x54817e], 1
jle 0x40cfd7
push 0x547d58
push 2
call fcn.0041e229
push esi
push 3
call fcn.0041e229
add esp, 0x10
jmp 0x40cfca
lea eax, [ebp - 0x758]
push str.__myzylom
push eax
call fcn.0042ae50
test eax, eax
pop ecx
pop ecx
jne 0x40ceca
cmp dword [ebp - 0xa68], 2
mov byte [0x54817f], 1
jle 0x40cfca
lea eax, [ebp - 0x758]
push eax
push 2
call fcn.0041e229
lea eax, [ebp - 0x758]
push str.__uninstall
push eax
call fcn.0042ae50
add esp, 0x10
test eax, eax
jne 0x40cfca
cmp dword [ebp - 0xa68], 3
mov byte [0x54817d], 1
jle 0x40cfd7
push esi
push 3
jmp 0x40cdff
lea eax, [ebp - 0x758]
push str.__buy
push eax
call fcn.0042ae50
test eax, eax
pop ecx
pop ecx
jne 0x40ceed
mov byte [0x548180], 1
jmp 0x40cfca
lea eax, [ebp - 0x758]
push str.__activate
push eax
call fcn.0042ae50
test eax, eax
pop ecx
pop ecx
jne 0x40cfac
cmp dword [ebp - 0xa68], 2
mov byte [0x548181], 1
jle 0x40cfca
push 2
pop eax
lea ecx, [ebp - 0x758]
push ecx
mov dword [ebp - 0xa68], eax
push eax
jmp 0x40cf9f
lea eax, [ebp - 0x758]
push eax
call fcn.0042a240
test eax, eax
pop ecx
jbe 0x40cf8c
mov ecx, 0x548188
call fcn.00412781
test eax, eax
jbe 0x40cf69
push 0x43d850
lea eax, [ebp + 0x50]
push eax
mov ecx, 0x548188
call fcn.004206ed
lea ecx, [ebp + 0x50]
call fcn.004205e1
lea eax, [ebp - 0x758]
push eax
lea eax, [ebp - 0xa88]
push eax
mov ecx, 0x548188
call fcn.004206ed
lea ecx, [ebp - 0xa88]
call fcn.004205e1
inc dword [ebp - 0xa68]
lea eax, [ebp - 0x758]
push eax
push dword [ebp - 0xa68]
call fcn.0041e229
test al, al
pop ecx
pop ecx
jne 0x40cf2f
jmp 0x40cfca
lea eax, [ebp - 0x758]
push str.__buy_coupon
push eax
call fcn.0042ae50
test eax, eax
pop ecx
pop ecx
jne 0x40cfca
mov byte [0x548182], 1
cmp byte [0x54817d], 0
je 0x40d200
push ebx
lea eax, [ebp - 0x358]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x960]
mov dword [ebp - 0xa74], eax
lea eax, [ebp - 0xa74]
push eax
lea eax, [ebp - 0x960]
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea eax, [ebp - 0x960]
push eax
push esi
call fcn.0042a630
pop ecx
pop ecx
lea eax, [ebp - 0xa74]
push eax
lea eax, [ebp - 0x960]
push eax
push ebx
lea eax, [ebp - 0x358]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea eax, [ebp - 0x960]
push eax
lea eax, [ebp - 0x358]
push eax
call fcn.0042a630
cmp byte [0x54817e], 0
pop ecx
pop ecx
jne 0x40d156
lea eax, [ebp - 0xa64]
push 0x547640
push eax
call fcn.0042a630
lea eax, [ebp - 0xa64]
push str.ZylomGameITemp.exe
push eax
call fcn.0042a640
lea eax, [ebp - 0xa64]
push 1
push eax
call fcn.00414596
add esp, 0x18
push edi
lea eax, [ebp - 0xa64]
push eax
lea eax, [ebp - 0x358]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40d150
lea eax, [ebp - 0xa64]
push eax
lea eax, [ebp - 0x6c8]
push eax
call fcn.0042a630
lea eax, [ebp - 0x6c8]
push str.___uninstallfromtemp__
push eax
call fcn.0042a640
lea eax, [ebp - 0x358]
push eax
lea eax, [ebp - 0x6c8]
push eax
call fcn.0042a640
lea eax, [ebp - 0x6c8]
push 0x43e790
push eax
call fcn.0042a640
lea eax, [ebp - 0x6c8]
push esi
push eax
call fcn.0042a640
lea eax, [ebp - 0x6c8]
push 0x43d978
push eax
call fcn.0042a640
push 0x44
pop esi
push esi
lea eax, [ebp - 0xb04]
push edi
push eax
call fcn.00429cb0
push 0x10
lea eax, [ebp + 0x54]
push edi
push eax
mov dword [ebp - 0xb04], esi
call fcn.00429cb0
add esp, 0x48
lea eax, [ebp + 0x54]
push eax
lea eax, [ebp - 0xb04]
push eax
push edi
push edi
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x6c8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push edi
call fcn.004033d8
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
push esi
mov byte [ebp - 0xa69], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0xa70], eax
je 0x40d1f8
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x40d1e3
lea eax, [esi + 1]
push eax
mov dword [ebp - 0xa68], edi
call fcn.00427e64
pop ecx
push edi
mov ebx, eax
lea eax, [ebp - 0xa68]
push eax
push esi
push ebx
push dword [ebp - 0xa70]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0xa68]
test eax, eax
setne al
test al, al
mov byte [ebx + ecx], 0
je 0x40d1e3
cmp dword [ebp - 0xa68], esi
jne 0x40d1e3
push ebx
mov ecx, 0x5482dc
call fcn.0041f6c2
mov byte [ebp - 0xa69], 1
push dword [ebp - 0xa70]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0xa69], 0
jne 0x40d200
xor eax, eax
inc eax
jmp 0x40dac1
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
xor ebx, ebx
inc ebx
cmp byte [0x54817d], 0
mov dword [ebp - 0xa68], edi
jne 0x40d23d
lea eax, [ebp - 0xa68]
push eax
call fcn.00401e1c
test eax, eax
pop ecx
ja 0x40d23d
push 0x34
push str.Warning
push str.Warning__nThe_setup_file_seems_incomplete._nAre_you_sure_you_want_to_continue_to_install_
push edi
call esi
cmp eax, 7
je 0x40d272
lea eax, [ebp - 0xa68]
push eax
call fcn.00401e1c
pop ecx
push dword [ebp - 0xa68]
mov ecx, 0x5481d0
push edi
push str.34324
call fcn.00411350
test al, al
jne 0x40d278
push edi
push str.Fatal_Error
push str.Unable_to_perform_the_installation._nThe_setup_file_has_been_altered_or_is_incomplete._nPlease_download_the_file_again.
push edi
call esi
push ebx
call fcn.0042b2a5
push dword [0x548200]
lea esi, [ebp - 0x254]
mov eax, esi
push eax
call fcn.0042a630
mov eax, esi
push eax
call fcn.0042a240
add esp, 0xc
jmp 0x40d2aa
mov cl, byte [ebp + eax - 0x254]
cmp cl, 0x5c
je 0x40d2b1
cmp cl, 0x2f
je 0x40d2b1
dec eax
cmp eax, edi
jg 0x40d299
jmp 0x40d2b8
lea esi, [ebp + eax - 0x253]
push esi
call fcn.00402ee8
push dword [0x54820c]
push esi
call fcn.0042a630
lea esi, [ebp - 0x254]
mov eax, esi
push eax
call fcn.0042a240
add esp, 0x10
jmp 0x40d2ee
mov cl, byte [ebp + eax - 0x254]
cmp cl, 0x5c
je 0x40d2f5
cmp cl, 0x2f
je 0x40d2f5
dec eax
cmp eax, edi
jg 0x40d2dd
jmp 0x40d2fc
lea esi, [ebp + eax - 0x253]
push esi
call fcn.00402ee8
pop ecx
lea ecx, [ebp - 0xb28]
call fcn.0041d562
lea ecx, [ebp - 0xb28]
call fcn.0041d7de
lea ecx, [ebp - 0xb28]
call fcn.004127a5
push dword [0x548208]
test eax, eax
setg al
mov byte [0x548163], al
call fcn.0042b119
push eax
call fcn.00413d15
mov esi, eax
cmp esi, edi
pop ecx
pop ecx
je 0x40d3a3
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x40]
cmp eax, ebx
jne 0x40d364
cmp byte [0x548163], 0
jne 0x40d364
mov byte [0x548163], 1
jmp 0x40d39c
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x40]
test eax, eax
jne 0x40d37a
cmp byte [0x548163], al
je 0x40d37a
push ebx
jmp 0x40d38e
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x40]
test eax, eax
jne 0x40d39c
cmp byte [0x548163], al
jne 0x40d39c
push edi
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x44]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x38]
mov eax, dword [esi]
push ebx
mov ecx, esi
call dword [eax]
lea eax, [ebp - 0x150]
push 0x43daa1
push eax
call fcn.0042a630
pop ecx
pop ecx
push ebx
push 0x26
lea eax, [ebp - 0x150]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
cmp eax, ebx
je 0x40d453
lea eax, [ebp - 0xa70]
push eax
push 0x20019
push edi
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0xa70], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40d453
push 0x209
mov dword [ebp - 0xa74], 0x208
call fcn.00427e64
pop ecx
mov esi, eax
lea eax, [ebp - 0xa74]
push eax
push esi
lea eax, [ebp - 0xa68]
push eax
push edi
push str.ProgramFilesDir
mov byte [esi], 0
push dword [ebp - 0xa70]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40d44c
cmp dword [ebp - 0xa68], ebx
jne 0x40d44c
lea eax, [ebp - 0x150]
push esi
push eax
call fcn.0042a630
pop ecx
pop ecx
push esi
call fcn.0042af76
pop ecx
lea eax, [ebp - 0x150]
push eax
call fcn.0042a240
test eax, eax
pop ecx
jne 0x40d477
lea eax, [ebp - 0x150]
push str.C:Program_Files_
push eax
call fcn.0042a630
pop ecx
pop ecx
lea eax, [ebp - 0x150]
push eax
mov esi, 0x547748
push esi
call fcn.0042a630
mov ebx, 0x43dab4
lea eax, [ebp - 0x150]
push ebx
push eax
call fcn.0041cd38
add esp, 0x10
test al, al
jne 0x40d4b1
lea eax, [ebp - 0x150]
push ebx
push eax
call fcn.0042a640
pop ecx
pop ecx
lea eax, [ebp - 0x150]
push str.Zylom_Games_
push eax
call fcn.0042a640
lea eax, [ebp - 0x150]
push edi
push eax
call fcn.0042b45d
add esp, 0x10
test eax, eax
jne 0x40d4f1
lea eax, [ebp - 0x150]
push eax
call fcn.0041461c
pop ecx
test al, al
lea eax, [ebp - 0x150]
push eax
push esi
je 0x40d518
jmp 0x40d504
push esi
call fcn.0041461c
test al, al
pop ecx
je 0x40d50b
lea eax, [ebp - 0x150]
push eax
push esi
call fcn.0042a630
jmp 0x40d524
call fcn.0042b3d8
lea eax, [ebp - 0x150]
push eax
push esi
call fcn.0042a630
mov byte [0x548161], 1
pop ecx
pop ecx
call fcn.0040dc0f
test al, al
je 0x40d53f
call fcn.0040db6c
test al, al
jne 0x40d53f
mov byte [0x548161], 1
cmp byte [0x548161], 0
je 0x40d5ec
call fcn.0040dc0f
test al, al
push 1
lea eax, [ebp - 0x150]
je 0x40d561
push 0x1c
jmp 0x40d563
push 0x1a
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x150]
push eax
lea eax, [ebp - 0x358]
push eax
call fcn.0042a630
lea eax, [ebp - 0x150]
push ebx
push eax
call fcn.0041cd38
add esp, 0x10
test al, al
jne 0x40d5a1
lea eax, [ebp - 0x150]
push ebx
push eax
call fcn.0042a640
pop ecx
pop ecx
lea eax, [ebp - 0x150]
push str.Zylom_Games_
push eax
call fcn.0042a640
lea eax, [ebp - 0x150]
push edi
push eax
call fcn.0042b45d
add esp, 0x10
test eax, eax
lea eax, [ebp - 0x150]
je 0x40d5d2
lea eax, [ebp - 0x358]
push eax
call fcn.0041461c
test al, al
pop ecx
je 0x40d5ec
lea eax, [ebp - 0x150]
push eax
push esi
call fcn.0042a630
pop ecx
pop ecx
push ebx
push esi
call fcn.0041cd38
test al, al
pop ecx
pop ecx
jne 0x40d602
push ebx
push esi
call fcn.0042a640
pop ecx
pop ecx
mov esi, 0x9c
push esi
lea eax, [ebp - 0x4c]
push edi
push eax
call fcn.00429cb0
add esp, 0xc
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x4c], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push eax
call esi
test eax, eax
jne 0x40d63f
lea eax, [ebp - 0x4c]
push eax
mov dword [ebp - 0x4c], 0x94
call esi
test eax, eax
jne 0x40d63f
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], edi
cmp dword [ebp - 0x48], 3
push 4
pop ebx
mov esi, 0x5482c8
jne 0x40d675
cmp dword [ebp - 0x44], 0x33
jne 0x40d7df
push str.Windows_NT_3.51
lea eax, [ebp - 0xa88]
push eax
mov ecx, esi
call fcn.0042066c
lea ecx, [ebp - 0xa88]
call fcn.004205e1
cmp dword [ebp - 0x48], ebx
jne 0x40d72d
cmp dword [ebp - 0x44], edi
jne 0x40d6dc
push str.Windows_95
lea eax, [ebp - 0xa88]
push eax
mov ecx, esi
call fcn.0042066c
lea ecx, [ebp - 0xa88]
call fcn.004205e1
cmp dword [ebp - 0x48], ebx
jne 0x40d72d
cmp dword [ebp - 0x44], edi
jne 0x40d6dc
cmp dword [ebp - 0x3c], 2
jne 0x40d7df
push str.Windows_NT_4.0
lea eax, [ebp - 0xa88]
push eax
mov ecx, esi
call fcn.0042066c
lea ecx, [ebp - 0xa88]
call fcn.004205e1
cmp dword [ebp - 0x48], ebx
jne 0x40d72d
cmp dword [ebp - 0x44], 0xa
jne 0x40d705
push str.Windows_98
lea eax, [ebp - 0xa88]
push eax
mov ecx, esi
call fcn.0042066c
lea ecx, [ebp - 0xa88]
call fcn.004205e1
cmp dword [ebp - 0x48], ebx
jne 0x40d72d
cmp dword [ebp - 0x44], 0x5a
jne 0x40d7df
push str.Windows_Me
lea eax, [ebp - 0xa88]
push eax
mov ecx, esi
call fcn.0042066c
lea ecx, [ebp - 0xa88]
call fcn.004205e1
push 5
pop ebx
cmp dword [ebp - 0x48], ebx
jne 0x40d7aa
cmp dword [ebp - 0x44], edi
jne 0x40d75d
push str.Windows_2000
lea eax, [ebp - 0xa88]
push eax
mov ecx, esi
call fcn.0042066c
lea ecx, [ebp - 0xa88]
call fcn.004205e1
cmp dword [ebp - 0x48], ebx
jne 0x40d7aa
cmp dword [ebp - 0x44], 1
jne 0x40d786
push str.Windows_XP
lea eax, [ebp - 0xa88]
push eax
mov ecx, esi
call fcn.0042066c
lea ecx, [ebp - 0xa88]
call fcn.004205e1
cmp dword [ebp - 0x48], ebx
jne 0x40d7aa
cmp dword [ebp - 0x44], 2
jne 0x40d7d3
push str.Windows_Server_2003
lea eax, [ebp - 0xa88]
push eax
mov ecx, esi
call fcn.0042066c
lea ecx, [ebp - 0xa88]
call fcn.004205e1
cmp dword [ebp - 0x48], 6
jne 0x40d7ce
push str.Windows_Vista
lea eax, [ebp - 0xa88]
push eax
mov ecx, esi
call fcn.0042066c
lea ecx, [ebp - 0xa88]
call fcn.004205e1
cmp dword [ebp - 0x48], ebx
jne 0x40d7df
cmp dword [ebp - 0x44], edi
mov byte [0x54815e], 1
je 0x40d7e6
mov byte [0x54815e], 0
cmp dword [ebp - 0x48], 5
mov ebx, dword [ebp + 0x70]
sbb al, al
inc al
mov byte [0x54815d], al
mov al, byte [0x5481da]
mov byte [0x44b0a0], al
lea eax, [ebp + 0x54]
push eax
push ebx
push edi
mov ecx, 0x54819c
call fcn.0040191b
call fcn.0040cba8
push 0x30
pop esi
push esi
lea eax, [ebp - 0xac0]
push edi
push eax
mov dword [ebp + 0x70], edi
call fcn.00429cb0
add esp, 0xc
lea eax, [ebp - 0xac0]
mov dword [ebp - 0xac0], esi
push eax
mov esi, str.ZylomInstallerClass
push esi
push ebx
call dword [sym.imp.USER32.dll_GetClassInfoExA]
test eax, eax
jne 0x40daa7
push 0x104
lea eax, [ebp - 0x358]
push eax
push edi
mov dword [ebp - 0xabc], 3
mov dword [ebp - 0xab8], 0x404db2
mov dword [ebp - 0xab4], edi
mov dword [ebp - 0xab0], edi
mov dword [ebp - 0xaac], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push edi
lea eax, [ebp - 0x358]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_ExtractIconA]
push 0x7f00
push edi
mov dword [ebp - 0xaa8], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0xaa4], eax
lea eax, [ebp - 0xac0]
push eax
mov dword [ebp - 0xaa0], edi
mov dword [ebp - 0xa9c], edi
mov dword [ebp - 0xa98], esi
mov dword [ebp - 0xa94], edi
call dword [sym.imp.USER32.dll_RegisterClassExA]
test ax, ax
je 0x40daa7
push edi
push ebx
push edi
push edi
push dword [0x44b09c]
mov eax, SysReAllocString
push dword [0x44b098]
push eax
push eax
push 0x480000
push dword [0x54823c]
push esi
push edi
call dword [sym.imp.USER32.dll_CreateWindowExA]
cmp eax, edi
mov dword [0x54816c], eax
je 0x40daa7
lea ecx, [ebp + 0x54]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
test eax, eax
je 0x40da21
mov esi, dword [ebp + 0x5c]
mov edi, dword [ebp + 0x60]
mov ebx, dword [sym.imp.USER32.dll_GetSystemMetrics]
sub esi, dword [ebp + 0x54]
sub edi, dword [ebp + 0x58]
push 7
call ebx
lea eax, [esi + eax*2]
push 8
mov dword [ebp - 0xa70], eax
call ebx
push 4
lea edi, [edi + eax*2]
call ebx
add edi, eax
push 0
mov dword [ebp + 0x70], edi
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
test edi, edi
je 0x40da1f
mov esi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 8
push edi
call esi
push 0xa
push edi
mov ebx, eax
call esi
push edi
push 0
mov dword [ebp - 0xa74], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, ebx
mov ebx, dword [ebp - 0xa70]
cdq
sub eax, edx
mov esi, eax
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
sar esi, 1
sub esi, eax
mov eax, dword [ebp - 0xa74]
cdq
sub eax, edx
mov edi, eax
mov eax, dword [ebp + 0x70]
cdq
sub eax, edx
sar eax, 1
sar edi, 1
sub edi, eax
lea eax, [ebp - 0xaec]
push eax
push dword [0x54816c]
call dword [sym.imp.USER32.dll_GetWindowPlacement]
push dword [0x54816c]
call dword [sym.imp.USER32.dll_IsWindowVisible]
neg eax
sbb eax, eax
and eax, 8
mov dword [ebp - 0xae4], eax
mov eax, dword [ebp + 0x70]
mov dword [ebp - 0xacc], edi
add edi, eax
lea eax, [ebp - 0xaec]
push eax
push dword [0x54816c]
mov dword [ebp - 0xad0], esi
add esi, ebx
mov dword [ebp - 0xac8], esi
mov dword [ebp - 0xac4], edi
mov dword [ebp - 0xaec], 0x2c
call dword [sym.imp.USER32.dll_SetWindowPlacement]
xor edi, edi
push 5
push dword [0x54816c]
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
jmp 0x40da8f
lea eax, [ebp - 0xa90]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
mov eax, dword [0x54816c]
cmp dword [ebp - 0xa90], eax
je 0x40da82
cmp dword [ebp - 0xa8c], 0x100
jb 0x40da82
cmp dword [ebp - 0xa8c], 0x108
ja 0x40da82
push dword [ebp - 0xa84]
push dword [ebp - 0xa88]
push dword [ebp - 0xa8c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [ebp - 0xa90]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push edi
push edi
lea eax, [ebp - 0xa90]
push edi
push eax
call esi
test eax, eax
jne 0x40da37
mov esi, dword [ebp - 0xa88]
jmp 0x40daaa
mov esi, dword [ebp + 0x70]
mov ecx, 0x54819c
call fcn.00403125
lea ecx, [ebp - 0xb28]
call fcn.0041d586
mov eax, esi
mov ecx, dword [ebp + 0x64]
pop edi
pop esi
pop ebx
call fcn.0042a57e
add ebp, 0x68
leave
ret 0x10