Function at 0x40bfda
Capabilities:
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 - 0xa4c]
sub esp, 0xacc
mov eax, dword [0x435450]
push ebx
push esi
push edi
mov edi, 0x104
push edi
mov esi, 0x5305f0
push esi
xor ebx, ebx
push ebx
mov dword [ebp + 0xa48], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push esi
call fcn.0041f6c0
cmp eax, ebx
pop ecx
pop ecx
jne 0x40c030
push ebx
push str.Fatal_Error
push str.Invalid_access_rights_
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40c437
push esi
mov byte [eax + 1], bl
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp + 0x420]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp + 0x420]
push 0x42a948
push eax
call fcn.00417eef
test al, al
pop ecx
pop ecx
je 0x40c076
lea eax, [ebp + 0x420]
push eax
call fcn.0041ea20
pop ecx
lea ecx, [ebp + 0x420]
dec ecx
mov byte [eax + ecx], bl
push ebx
call fcn.0041fc23
push eax
lea eax, [ebp + 0x420]
push eax
push str._s.zylominstallertemp_d_
push 0x52ffe0
call dword [sym.imp.USER32.dll_wsprintfA]
push str.UnInstall.log
mov esi, 0x5301f0
push esi
call fcn.0041ee10
add esp, 0x1c
call fcn.00418735
cmp eax, 1
mov dword [ebp + 0x1c], eax
jle 0x40c1ce
lea eax, [ebp + 0x20]
push eax
push 1
call fcn.0041873b
lea eax, [ebp + 0x20]
push str.__uninstall
push eax
call fcn.0041f630
add esp, 0x10
test eax, eax
jne 0x40c0f8
cmp dword [ebp + 0x1c], 2
mov byte [0x530b11], 1
jle 0x40c1da
push esi
push 2
call fcn.0041873b
pop ecx
pop ecx
jmp 0x40c1ce
lea eax, [ebp + 0x20]
push str.__uninstallfromtemp
push eax
call fcn.0041f630
test eax, eax
pop ecx
pop ecx
jne 0x40c140
cmp dword [ebp + 0x1c], 3
mov byte [0x530b11], 1
mov byte [0x530b12], 1
jle 0x40c1da
push 0x5306f8
push 2
call fcn.0041873b
push esi
push 3
call fcn.0041873b
add esp, 0x10
jmp 0x40c1ce
lea eax, [ebp + 0x20]
push str.__myzylom
push eax
call fcn.0041f630
test eax, eax
pop ecx
pop ecx
jne 0x40c196
cmp dword [ebp + 0x1c], 2
mov byte [0x530b13], 1
jle 0x40c1ce
lea eax, [ebp + 0x20]
push eax
push 2
call fcn.0041873b
lea eax, [ebp + 0x20]
push str.__uninstall
push eax
call fcn.0041f630
add esp, 0x10
test eax, eax
jne 0x40c1ce
cmp dword [ebp + 0x1c], 3
mov byte [0x530b11], 1
jle 0x40c1da
push esi
push 3
jmp 0x40c0ec
lea eax, [ebp + 0x20]
push str.__buy
push eax
call fcn.0041f630
test eax, eax
pop ecx
pop ecx
jne 0x40c1b3
mov byte [0x530b14], 1
jmp 0x40c1ce
lea eax, [ebp + 0x20]
push str.__buy_coupon
push eax
call fcn.0041f630
test eax, eax
pop ecx
pop ecx
jne 0x40c1ce
mov byte [0x530b15], 1
cmp byte [0x530b11], bl
je 0x40c3d5
push edi
lea eax, [ebp + 0x72c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp + 0x524]
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp + 0x524]
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea eax, [ebp + 0x524]
push eax
push esi
call fcn.0041ee10
pop ecx
pop ecx
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp + 0x524]
push eax
push edi
lea eax, [ebp + 0x72c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea eax, [ebp + 0x524]
push eax
lea eax, [ebp + 0x72c]
push eax
call fcn.0041ee10
cmp byte [0x530b12], bl
pop ecx
pop ecx
jne 0x40c34c
lea eax, [ebp + 0x628]
push 0x52ffe0
push eax
call fcn.0041ee10
lea eax, [ebp + 0x628]
push str.ZylomGameInstallerTemp.exe
push eax
call fcn.0041ee20
lea eax, [ebp + 0x628]
push 1
push eax
call fcn.0040fd6d
add esp, 0x18
push ebx
lea eax, [ebp + 0x628]
push eax
lea eax, [ebp + 0x72c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40c346
lea eax, [ebp + 0x628]
push eax
lea eax, [ebp + 0xb0]
push eax
call fcn.0041ee10
lea eax, [ebp + 0xb0]
push str.___uninstallfromtemp__
push eax
call fcn.0041ee20
lea eax, [ebp + 0x72c]
push eax
lea eax, [ebp + 0xb0]
push eax
call fcn.0041ee20
lea eax, [ebp + 0xb0]
push 0x42b538
push eax
call fcn.0041ee20
lea eax, [ebp + 0xb0]
push esi
push eax
call fcn.0041ee20
lea eax, [ebp + 0xb0]
push 0x42a818
push eax
call fcn.0041ee20
push 0x44
pop esi
push esi
lea eax, [ebp - 0x80]
push ebx
push eax
call fcn.0041e490
push 0x10
lea eax, [ebp + 0xa38]
push ebx
push eax
mov dword [ebp - 0x80], esi
call fcn.0041e490
add esp, 0x48
lea eax, [ebp + 0xa38]
push eax
lea eax, [ebp - 0x80]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp + 0xb0]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push ebx
call fcn.00402ee4
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push esi
mov byte [ebp + 0x1b], bl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0x14], eax
je 0x40c3cd
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c3bf
lea eax, [esi + 1]
push eax
mov dword [ebp + 0x1c], ebx
call fcn.0041ddb2
pop ecx
push ebx
mov edi, eax
lea eax, [ebp + 0x1c]
push eax
push esi
push edi
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp + 0x1c]
test eax, eax
setne al
cmp al, bl
mov byte [edi + ecx], bl
je 0x40c3bf
cmp dword [ebp + 0x1c], esi
jne 0x40c3bf
push edi
mov ecx, 0x530bd8
call fcn.004199e9
mov byte [ebp + 0x1b], 1
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp + 0x1b], bl
jne 0x40c3d5
xor eax, eax
inc eax
jmp 0x40c940
cmp byte [0x530b11], bl
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp + 0x1c], ebx
jne 0x40c408
lea eax, [ebp + 0x1c]
push eax
call fcn.00401c35
test eax, eax
pop ecx
ja 0x40c408
push 0x34
push str.Warning
push str.Warning__nThe_setup_file_seems_incomplete._nAre_you_sure_you_want_to_continue_to_install_
push ebx
call esi
cmp eax, 7
je 0x40c437
lea eax, [ebp + 0x1c]
push eax
call fcn.00401c35
pop ecx
push dword [ebp + 0x1c]
mov ecx, 0x530b50
push ebx
push str.34324
call fcn.0040e223
test al, al
jne 0x40c43e
push ebx
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 ebx
call esi
push 1
call fcn.0041f9a0
push dword [0x530b68]
lea esi, [ebp + 0x830]
mov eax, esi
push eax
call fcn.0041ee10
mov eax, esi
push eax
call fcn.0041ea20
add esp, 0xc
jmp 0x40c470
mov cl, byte [ebp + eax + 0x830]
cmp cl, 0x5c
je 0x40c477
cmp cl, 0x2f
je 0x40c477
dec eax
cmp eax, ebx
jg 0x40c45f
jmp 0x40c47e
lea esi, [ebp + eax + 0x831]
push esi
call fcn.00402c27
push dword [0x530b74]
push esi
call fcn.0041ee10
lea esi, [ebp + 0x830]
mov eax, esi
push eax
call fcn.0041ea20
add esp, 0x10
jmp 0x40c4b4
mov cl, byte [ebp + eax + 0x830]
cmp cl, 0x5c
je 0x40c4bb
cmp cl, 0x2f
je 0x40c4bb
dec eax
cmp eax, ebx
jg 0x40c4a3
jmp 0x40c4c2
lea esi, [ebp + eax + 0x831]
push esi
call fcn.00402c27
lea eax, [ebp + 0x934]
mov dword [esp], 0x42a937
push eax
call fcn.0041ee10
pop ecx
pop ecx
push 1
push 0x26
lea eax, [ebp + 0x934]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
cmp eax, 1
je 0x40c563
lea eax, [ebp + 0x14]
push eax
push 0x20019
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp + 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40c563
push 0x209
mov dword [ebp + 0x10], 0x208
call fcn.0041ddb2
pop ecx
mov esi, eax
lea eax, [ebp + 0x10]
push eax
push esi
lea eax, [ebp + 0x1c]
push eax
push ebx
push str.ProgramFilesDir
mov byte [esi], bl
push dword [ebp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40c55c
cmp dword [ebp + 0x1c], 1
jne 0x40c55c
lea eax, [ebp + 0x934]
push esi
push eax
call fcn.0041ee10
pop ecx
pop ecx
push esi
call fcn.0041f756
pop ecx
lea eax, [ebp + 0x934]
push eax
call fcn.0041ea20
test eax, eax
pop ecx
jne 0x40c587
lea eax, [ebp + 0x934]
push str.C:Program_Files_
push eax
call fcn.0041ee10
pop ecx
pop ecx
lea eax, [ebp + 0x934]
push eax
mov esi, 0x5300e8
push esi
call fcn.0041ee10
mov edi, 0x42a948
lea eax, [ebp + 0x934]
push edi
push eax
call fcn.00417eef
add esp, 0x10
test al, al
jne 0x40c5c1
lea eax, [ebp + 0x934]
push edi
push eax
call fcn.0041ee20
pop ecx
pop ecx
lea eax, [ebp + 0x934]
push str.Zylom_Games_
push eax
call fcn.0041ee20
lea eax, [ebp + 0x934]
push ebx
push eax
call fcn.0041fbdd
add esp, 0x10
test eax, eax
jne 0x40c605
lea eax, [ebp + 0x934]
push eax
call fcn.0040fdf3
pop ecx
test al, al
lea eax, [ebp + 0x934]
push eax
push esi
jne 0x40c6b4
jmp 0x40c621
push esi
call fcn.0040fdf3
test al, al
pop ecx
jne 0x40c6ac
call fcn.0041fb58
lea eax, [ebp + 0x934]
push eax
push esi
call fcn.0041ee10
pop ecx
pop ecx
push 1
push 0x1a
lea eax, [ebp + 0x934]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp + 0x934]
push eax
lea eax, [ebp + 0x72c]
push eax
call fcn.0041ee10
lea eax, [ebp + 0x934]
push edi
push eax
call fcn.00417eef
add esp, 0x10
test al, al
jne 0x40c670
lea eax, [ebp + 0x934]
push edi
push eax
call fcn.0041ee20
pop ecx
pop ecx
lea eax, [ebp + 0x934]
push str.Zylom_Games_
push eax
call fcn.0041ee20
lea eax, [ebp + 0x934]
push ebx
push eax
call fcn.0041fbdd
add esp, 0x10
test eax, eax
lea eax, [ebp + 0x934]
je 0x40c6a1
lea eax, [ebp + 0x72c]
push eax
call fcn.0040fdf3
test al, al
pop ecx
je 0x40c6bb
lea eax, [ebp + 0x934]
push eax
push esi
call fcn.0041ee10
pop ecx
pop ecx
push edi
push esi
call fcn.00417eef
test al, al
pop ecx
pop ecx
jne 0x40c6d1
push edi
push esi
call fcn.0041ee20
pop ecx
pop ecx
mov edi, dword [ebp + 0xa54]
lea eax, [ebp + 0xa38]
push eax
push edi
push ebx
mov ecx, 0x530b1c
call fcn.00401924
call fcn.0040be9f
push 0x30
pop esi
push esi
lea eax, [ebp - 0x3c]
push ebx
push eax
mov dword [ebp + 0xa54], ebx
call fcn.0041e490
add esp, 0xc
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], esi
push eax
mov esi, str.ZylomInstallerClass
push esi
push edi
call dword [sym.imp.USER32.dll_GetClassInfoExA]
test eax, eax
jne 0x40c92e
push 0x104
lea eax, [ebp + 0x72c]
push eax
push ebx
mov dword [ebp - 0x38], 3
mov dword [ebp - 0x34], 0x404569
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push ebx
lea eax, [ebp + 0x72c]
push eax
push edi
call dword [sym.imp.SHELL32.dll_ExtractIconA]
push 0x7f00
push ebx
mov dword [ebp - 0x24], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], ebx
call dword [sym.imp.USER32.dll_RegisterClassExA]
test ax, ax
je 0x40c92e
push ebx
push edi
push ebx
push ebx
push 0x12c
push 0x1f4
mov eax, SysReAllocString
push eax
push eax
push 0x480000
push dword [0x530b94]
push esi
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
cmp eax, ebx
mov dword [0x530b00], eax
je 0x40c92e
lea ecx, [ebp + 0xa38]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
test eax, eax
je 0x40c8c6
mov esi, dword [ebp + 0xa40]
mov edi, dword [ebp + 0xa44]
sub esi, dword [ebp + 0xa38]
sub edi, dword [ebp + 0xa3c]
push 7
call dword [sym.imp.USER32.dll_GetSystemMetrics]
lea eax, [esi + eax*2]
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 8
mov dword [ebp + 0xa54], eax
call esi
push 4
lea edi, [edi + eax*2]
call esi
add edi, eax
push ebx
mov dword [ebp + 0x14], edi
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
cmp edi, ebx
je 0x40c8c6
mov esi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 8
push edi
call esi
push 0xa
push edi
mov dword [ebp + 0x10], eax
call esi
push edi
push ebx
mov dword [ebp + 0x1c], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebp + 0x10]
cdq
sub eax, edx
mov esi, eax
mov eax, dword [ebp + 0xa54]
cdq
sub eax, edx
sar eax, 1
sar esi, 1
sub esi, eax
mov eax, dword [ebp + 0x1c]
cdq
sub eax, edx
mov edi, eax
mov eax, dword [ebp + 0x14]
cdq
sub eax, edx
sar eax, 1
sar edi, 1
sub edi, eax
lea eax, [ebp - 0x68]
push eax
push dword [0x530b00]
call dword [sym.imp.USER32.dll_GetWindowPlacement]
push dword [0x530b00]
call dword [sym.imp.USER32.dll_IsWindowVisible]
neg eax
sbb eax, eax
and eax, 8
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0xa54]
mov dword [ebp - 0x4c], esi
add esi, eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x48], edi
add edi, eax
lea eax, [ebp - 0x68]
push eax
push dword [0x530b00]
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x68], 0x2c
call dword [sym.imp.USER32.dll_SetWindowPlacement]
push 5
push dword [0x530b00]
call dword [sym.imp.USER32.dll_ShowWindow]
mov esi, dword [sym.imp.USER32.dll_GetMessageA]
jmp 0x40c91c
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
mov eax, dword [0x530b00]
cmp dword [ebp - 0xc], eax
je 0x40c912
cmp dword [ebp - 8], 0x100
jb 0x40c912
cmp dword [ebp - 8], 0x108
ja 0x40c912
push dword [ebp]
push dword [ebp - 4]
push dword [ebp - 8]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push ebx
push ebx
lea eax, [ebp - 0xc]
push ebx
push eax
call esi
test eax, eax
jne 0x40c8dc
mov esi, dword [ebp - 4]
jmp 0x40c934
mov esi, dword [ebp + 0xa54]
mov ecx, 0x530b1c
call fcn.00402e47
mov eax, esi
mov ecx, dword [ebp + 0xa48]
pop edi
pop esi
pop ebx
call fcn.0041ed5e
add ebp, 0xa4c
leave
ret 0x10