Function at 0x4010d2
Capabilities:
Copy file
Get file size
Read file on windows
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x233]
mov byte [ebp - 0x234], bl
push 0x3f
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x12f]
mov byte [ebp - 0x130], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, 0x401d5e
mov edi, 0x401b49
sub eax, edi
mov esi, str.kernel32
mov dword [ebp - 0x28], eax
mov eax, 0x402040
sub eax, fcn.00401e24
push str.BeginUpdateResourceA
mov dword [ebp - 0x20], eax
mov eax, 0x401b38
sub eax, 0x401a2f
push esi
mov dword [ebp - 0x2c], eax
mov eax, 0x401af1
sub eax, fcn.0040186c
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov byte [ebp - 0x1c], 0xa
mov byte [ebp - 0x1b], 0xa
mov byte [ebp - 0x1a], 0xa
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
mov dword [ebp - 0x24], eax
call fcn.00401545
push str.UpdateResourceA
push esi
mov dword [0x404384], eax
call fcn.00401545
push str.EndUpdateResourceA
push esi
mov dword [0x404388], eax
call fcn.00401545
cmp dword [0x404384], ebx
mov dword [0x40438c], eax
je 0x40153e
cmp dword [0x404388], ebx
je 0x40153e
cmp eax, ebx
je 0x40153e
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
push str.RT_RCDATA
push 0x66
call fcn.004016ce
add esp, 0x10
cmp dword [ebp - 0x10], ebx
je 0x40153e
push 0x104
push 0x404390
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x1c]
push 8
mov esi, section..data
push eax
push esi
call fcn.00402340
add esp, 0xc
test eax, eax
je 0x4012aa
push 8
lea eax, [ebp - 0x130]
push esi
push eax
call fcn.00402055
push dword [ebp - 0x28]
lea eax, [ebp - 0x130]
push edi
push eax
call fcn.004020cd
push dword [ebp - 0x20]
lea eax, [ebp - 0x130]
push fcn.00401e24
push eax
call fcn.004020cd
push dword [ebp - 0x2c]
lea eax, [ebp - 0x130]
push 0x401a2f
push eax
call fcn.004020cd
push dword [ebp - 0x24]
lea eax, [ebp - 0x130]
push fcn.0040186c
push eax
call fcn.004020cd
push dword [ebp - 0x10]
lea eax, [ebp - 0x130]
push dword [ebp - 0x14]
push eax
call fcn.004020cd
add esp, 0x48
lea eax, [ebp - 0x130]
push 0x100
push ebx
push eax
call fcn.004022e0
call fcn.0040186c
push str.rwbinru_dyd
call 0x401af1
push eax
push dword [ebp - 0x14]
call fcn.00401e24
add esp, 0x18
mov dword [ebp - 4], ebx
call fcn.00401717
mov ecx, dword [ebp - 4]
inc dword [ebp - 4]
cmp dword [ebp - 4], 8
mov byte [ecx + section..data], al
jl 0x4012ad
lea eax, [ebp - 0x1c]
push 8
push eax
push esi
call fcn.00402340
add esp, 0xc
test eax, eax
je 0x4012aa
push 8
lea eax, [ebp - 0x130]
push esi
push eax
call fcn.00402055
push dword [ebp - 0x28]
lea eax, [ebp - 0x130]
push edi
push eax
call fcn.004020cd
push dword [ebp - 0x20]
lea eax, [ebp - 0x130]
push fcn.00401e24
push eax
call fcn.004020cd
push dword [ebp - 0x2c]
lea eax, [ebp - 0x130]
push 0x401a2f
push eax
call fcn.004020cd
push dword [ebp - 0x24]
lea eax, [ebp - 0x130]
push fcn.0040186c
push eax
call fcn.004020cd
push dword [ebp - 0x10]
lea eax, [ebp - 0x130]
push dword [ebp - 0x14]
push eax
call fcn.004020cd
add esp, 0x48
lea eax, [ebp - 0x130]
push 0x100
push ebx
push eax
call fcn.004022e0
add esp, 0xc
mov esi, 0x404390
lea eax, [ebp - 0x234]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x234]
push str..tmp1
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x234]
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push ebx
push ebx
push 3
push ebx
push ebx
lea eax, [ebp - 0x234]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 4], esi
je 0x40152c
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 0x4013fe
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, edi
push ebx
sub ecx, 0x400000
push ecx
push eax
call fcn.0040181a
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 - 0x28]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 4]
call edi
mov eax, fcn.00401e24
push ebx
sub eax, 0x400000
push ebx
push eax
push dword [ebp - 0xc]
call fcn.0040181a
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 fcn.00401e24
push dword [ebp - 4]
call edi
mov eax, 0x401a2f
push ebx
sub eax, 0x400000
push ebx
push eax
push dword [ebp - 0xc]
call fcn.0040181a
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 0x401a2f
push dword [ebp - 4]
call edi
mov eax, fcn.0040186c
push ebx
sub eax, 0x400000
push ebx
push eax
push dword [ebp - 0xc]
call fcn.0040181a
pop ecx
pop ecx
push eax
push dword [ebp - 4]
call esi
lea eax, [ebp - 8]
push ebx
push eax
push dword [ebp - 0x24]
push fcn.0040186c
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.0040181a
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
lea eax, [ebp - 0x234]
push ebx
push eax
call dword [0x404384]
mov edi, eax
cmp edi, ebx
je 0x40152c
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push 0x409
push 0x66
push str.RT_RCDATA
push edi
call dword [0x404388]
push ebx
push edi
call dword [0x40438c]
push edi
call esi
push 0x404390
call fcn.00401000
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret