Function at 0x4015c0
Capabilities:
Check os version
Create process on windows
Get file attributes
Get file size
Read file on windows
Set file attributes
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x91c
mov eax, dword [0x41527c]
push ebx
mov ebx, dword [ebp + 0x10]
xor eax, ebp
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [esp + 0x924], eax
xor eax, eax
mov ecx, 0x25
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x68]
push eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x6c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea ecx, [esp + 0x208]
push ecx
call fcn.00402080
add esp, 4
test eax, eax
jne 0x401648
push 0x10
push str.Error
push str.Cannot_find_Temp_Directory_
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, ebp
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10
cmp dword [esp + 0x6c], 6
jb 0x401998
call dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
test eax, eax
jne 0x401998
mov eax, dword [0x415180]
test eax, eax
jbe 0x4016a1
mov eax, dword [0x415174]
test eax, eax
jne 0x4016a1
push 0x10
push str.Error
push str.Invalid_offset_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, ebp
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10
push str._sfxpath
push ebx
call fcn.00405c5c
add esp, 8
test eax, eax
jbe 0x4016e1
push 0x10
push str.Error
push str.You_need_Admin_rights_to_continue_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, ebp
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [0x415174]
push 0x104
lea edx, [esp + 0x314]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push str.NGMSetup.exe
lea eax, [esp + 0x20c]
push eax
lea ecx, [esp + 0x108]
push str._s_s
push ecx
call fcn.00405248
lea edx, [esp + 0x110]
push edx
call fcn.004020d0
add esp, 0x14
test eax, eax
je 0x401764
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea eax, [esp + 0x100]
push eax
call esi
test al, 1
jne 0x401751
lea ecx, [esp + 0x100]
push ecx
call esi
test al, 4
je 0x401764
push 0x80
lea edx, [esp + 0x104]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
push 0x80
push 3
call fcn.004010b0
mov ecx, eax
call fcn.00401c30
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push eax
push 1
push 0x80000000
lea eax, [esp + 0x328]
push eax
call edi
push 0
push 0x80
push 2
mov esi, eax
call fcn.004010b0
mov ecx, eax
call fcn.00401c30
push eax
push 1
push 0x40000000
lea ecx, [esp + 0x118]
push ecx
call edi
cmp esi, 0xffffffff
mov edi, eax
je 0x40196a
cmp edi, 0xffffffff
je 0x40196a
test ebx, ebx
jne 0x4017dc
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea edx, [esp + 0xf]
push edx
lea ecx, [esp + 0x24]
call fcn.004012d0
lea eax, [esp + 0xf]
push eax
push ebx
lea ecx, [esp + 0x28]
mov byte [esp + 0x17], 0
call fcn.00401530
mov edx, dword [esp + 0x20]
xor eax, eax
push eax
lea ecx, [esp + 0x1c]
push ecx
push ebx
push edx
push esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401933
cmp dword [esp + 0x18], ebx
jb 0x401933
mov ecx, dword [esp + 0x20]
push 0
lea eax, [esp + 0x14]
push eax
push ebx
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401933
cmp dword [esp + 0x10], ebx
jb 0x401933
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
mov edx, dword [esp + 0x1c]
xor eax, eax
push edx
mov ecx, 0xf
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x314]
push eax
push str._sfxpath:_s__s
lea ecx, [esp + 0x52c]
push 0x400
push ecx
mov dword [esp + 0x28], 0xffffffff
call fcn.00401270
add esp, 0x14
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x100]
lea eax, [esp + 0x520]
push ecx
mov dword [esp + 0x30], 0x3c
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0x540
mov dword [esp + 0x3c], str.runas
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], 1
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
je 0x40190d
mov eax, dword [esp + 0x64]
test eax, eax
je 0x40190d
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40190d
mov eax, dword [esp + 0x64]
lea edx, [esp + 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov esi, dword [esp + 0x14]
lea ecx, [esp + 0x20]
call fcn.004012e0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, ebp
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10
push 0x10
push str.Error
push str.Cannot_copy_temporary_file_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [esp + 0x20]
call fcn.004012e0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, ebp
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10
push 0x10
push str.Error
push str.Cannot_make_temporary_file_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, ebp
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10
push str.NGMDll.dll
lea ecx, [esp + 0x20c]
push ecx
lea edx, [esp + 0x318]
push str._s_s
push edx
call fcn.00405248
push 0x3e6
lea eax, [esp + 0x324]
push eax
push esi
call fcn.00402140
add esp, 0x1c
test eax, eax
jne 0x4019fe
push 0x10
push str.Error
push str.Cannot_Load_Dll_
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, ebp
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10
push str.NGMResource.dll
lea ecx, [esp + 0x20c]
push ecx
lea edx, [esp + 0x108]
push str._s_s
push edx
call fcn.00405248
push 0x3e5
lea eax, [esp + 0x114]
push eax
push esi
call fcn.00402140
push str.unicows.dll
lea ecx, [esp + 0x228]
push ecx
lea edx, [esp + 0x124]
push str._s_s
push edx
call fcn.00405248
push 0x3e4
lea eax, [esp + 0x130]
push eax
push esi
call fcn.00402140
mov eax, dword [0x415180]
add esp, 0x38
test eax, eax
jbe 0x401ad0
push eax
lea ecx, [esp + 0x20c]
push ecx
lea edx, [esp + 0x420]
push str._s_d.dat
push edx
call fcn.00405248
push 0x3e7
lea eax, [esp + 0x42c]
push eax
push esi
call fcn.00402140
add esp, 0x1c
test eax, eax
jne 0x401ad0
push 0x10
push str.Error
push str.Cannot_Load_Game_Data_
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, ebp
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [esp + 0x310]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
jne 0x401b12
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Load_Library_Failed_
call section..text
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, ebp
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10
push str.NGMSetupMain
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x401b50
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetProcAddress_Failed
call section..text
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x918]
xor ecx, ebp
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10
push str.1234567890_mom_ABCDEFGHIJ
push ebx
push esi
call eax
add esp, 0xc
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x924]
xor eax, eax
test esi, esi
setne al
pop edi
pop esi
xor ecx, ebp
pop ebx
dec eax
call fcn.004052d1
mov esp, ebp
pop ebp
ret 0x10