Function at 0x401000
Capabilities:
Copy file
Extract resource via kernel32 functions
Get common file path
Get file size
Move file
Read file on windows
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x338
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x337]
mov byte [ebp - 0x338], bl
push 0x40
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x233]
mov byte [ebp - 0x234], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x3f
xor eax, eax
pop ecx
lea edi, [ebp - 0x12f]
mov byte [ebp - 0x130], bl
mov dword [ebp - 0x14], ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, 0x401c73
mov edi, 0x401a5e
sub eax, edi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x24], eax
mov eax, 0x401f55
sub eax, int.00401d39
mov byte [ebp - 0x1c], 0xa
mov dword [ebp - 0x20], eax
mov eax, 0x401a4d
sub eax, 0x40198b
mov byte [ebp - 0x1b], 0xa
mov dword [ebp - 0x28], eax
mov eax, 0x40193b
sub eax, fcn.00401690
mov byte [ebp - 0x1a], 0xa
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
push str.RT_RCDATA
push 0x66
mov byte [ebp - 0x19], 0xa
mov byte [ebp - 0x18], 0xa
mov byte [ebp - 0x17], 0xa
mov byte [ebp - 0x16], 0xa
mov byte [ebp - 0x15], 0xa
mov dword [ebp - 8], ebx
call fcn.00401451
add esp, 0x10
cmp dword [ebp - 0x10], ebx
jne 0x4010d2
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret
mov esi, 0x404314
push 0x104
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x1c]
push 8
push eax
push section..data
call fcn.00402260
add esp, 0xc
test eax, eax
je 0x4011a0
push 8
lea eax, [ebp - 0x130]
push section..data
push eax
call fcn.00401f6a
push dword [ebp - 0x24]
lea eax, [ebp - 0x130]
push edi
push eax
call fcn.00401fe2
push dword [ebp - 0x20]
lea eax, [ebp - 0x130]
push int.00401d39
push eax
call fcn.00401fe2
push dword [ebp - 0x28]
lea eax, [ebp - 0x130]
push 0x40198b
push eax
call fcn.00401fe2
push dword [ebp - 0x2c]
lea eax, [ebp - 0x130]
push fcn.00401690
push eax
call fcn.00401fe2
push dword [ebp - 0x10]
lea eax, [ebp - 0x130]
push dword [ebp - 0x14]
push eax
call fcn.00401fe2
add esp, 0x48
lea eax, [ebp - 0x130]
push 0x100
push ebx
push eax
call fcn.00402200
call fcn.00401690
push str.rwbinru_dyd
call fcn.00401944
push eax
push dword [ebp - 0x14]
call int.00401d39
add esp, 0x18
mov dword [ebp - 4], ebx
call fcn.0040149a
mov ecx, dword [ebp - 4]
inc dword [ebp - 4]
cmp dword [ebp - 4], 8
mov byte [ecx + section..data], al
jl 0x4011a3
lea eax, [ebp - 0x1c]
push 8
push eax
push section..data
call fcn.00402260
add esp, 0xc
test eax, eax
je 0x4011a0
push 8
lea eax, [ebp - 0x130]
push section..data
push eax
call fcn.00401f6a
push dword [ebp - 0x24]
lea eax, [ebp - 0x130]
push edi
push eax
call fcn.00401fe2
push dword [ebp - 0x20]
lea eax, [ebp - 0x130]
push int.00401d39
push eax
call fcn.00401fe2
push dword [ebp - 0x28]
lea eax, [ebp - 0x130]
push 0x40198b
push eax
call fcn.00401fe2
push dword [ebp - 0x2c]
lea eax, [ebp - 0x130]
push fcn.00401690
push eax
call fcn.00401fe2
push dword [ebp - 0x10]
lea eax, [ebp - 0x130]
push dword [ebp - 0x14]
push eax
call fcn.00401fe2
add esp, 0x48
lea eax, [ebp - 0x130]
push 0x100
push ebx
push eax
call fcn.00402200
add esp, 0xc
lea eax, [ebp - 0x338]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x234]
push eax
push ebx
lea eax, [ebp - 0x338]
push 0x404008
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea eax, [ebp - 0x234]
push 1
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
push 1
lea eax, [ebp - 0x234]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 4
lea eax, [ebp - 0x234]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 4], esi
je 0x40144a
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 8
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
lea ecx, [ebp - 8]
push ebx
push ecx
mov dword [ebp - 0x30], eax
push dword [ebp - 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x30]
push ebx
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0xc], eax
cmp dword [eax], 0x4550
je 0x40131e
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, edi
push ebx
sub ecx, 0x400000
push ecx
push eax
call fcn.0040163e
pop ecx
pop ecx
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call esi
lea eax, [ebp - 8]
push ebx
push eax
push dword [ebp - 0x24]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 4]
call edi
mov eax, int.00401d39
push ebx
sub eax, 0x400000
push ebx
push eax
push dword [ebp - 0xc]
call fcn.0040163e
pop ecx
pop ecx
push eax
push dword [ebp - 4]
call esi
lea eax, [ebp - 8]
push ebx
push eax
push dword [ebp - 0x20]
push int.00401d39
push dword [ebp - 4]
call edi
mov eax, 0x40198b
push ebx
sub eax, 0x400000
push ebx
push eax
push dword [ebp - 0xc]
call fcn.0040163e
pop ecx
pop ecx
push eax
push dword [ebp - 4]
call esi
lea eax, [ebp - 8]
push ebx
push eax
push dword [ebp - 0x28]
push 0x40198b
push dword [ebp - 4]
call edi
mov eax, fcn.00401690
push ebx
sub eax, 0x400000
push ebx
push eax
push dword [ebp - 0xc]
call fcn.0040163e
pop ecx
pop ecx
push eax
push dword [ebp - 4]
call esi
lea eax, [ebp - 8]
push ebx
push eax
push dword [ebp - 0x2c]
push fcn.00401690
push dword [ebp - 4]
call edi
mov eax, section..data
push ebx
push ebx
sub eax, 0x400000
push eax
push dword [ebp - 0xc]
call fcn.0040163e
pop ecx
pop ecx
push eax
push dword [ebp - 4]
call esi
lea eax, [ebp - 8]
push ebx
push eax
push 8
push section..data
push dword [ebp - 4]
call edi
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebx
push 0x404314
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceA]
mov edi, eax
cmp edi, ebx
je 0x40144a
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push 0x409
push 0x66
push str.RT_RCDATA
push edi
call dword [sym.imp.KERNEL32.dll_UpdateResourceA]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
push edi
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]