Function at 0x100037a1
Capabilities:
Clear file content
Enumerate pe sections
Get file size
Parse pe header
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x1818
call sub.ntdll.dll__chkstk
push edi
push ecx
push ecx
lea eax, [esp + 0x1024]
push eax
mov dword [esp + 0x10], ecx
push ecx
mov ecx, dword [esp + 0x1830]
lea edx, [esp + 0x82c]
call fcn.1000b03e
push 0
push 0x8000000
push 3
push 0
push 1
push 0x80000000
push dword [esp + 0x1838]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10003a0d
push ebx
push esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov ecx, ebx
call fcn.1000ad8b
push 0
mov esi, eax
lea eax, [esp + 0x24]
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10003828
cmp dword [esp + 0x20], ebx
je 0x10003833
mov ecx, esi
call fcn.1000ad9b
xor esi, esi
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x10003a0b
mov eax, 0x5a4d
xor edi, edi
xor edx, edx
push ebp
cmp word [esi], ax
jne 0x10003893
mov ecx, dword [esi + 0x3c]
add ecx, esi
cmp dword [ecx], 0x4550
jne 0x10003893
movzx edx, word [ecx + 0x14]
movzx eax, word [ecx + 6]
add edx, 0x18
add edx, ecx
xor ebp, ebp
test eax, eax
je 0x10003890
mov eax, dword [edx + 0x24]
and eax, 0x60000020
cmp eax, 0x60000020
je 0x1000388e
movzx eax, word [ecx + 6]
inc ebp
add edx, 0x28
cmp ebp, eax
jb 0x10003871
jmp 0x10003890
mov edi, edx
mov edx, dword [ecx + 0x28]
mov eax, dword [esp + 0x1830]
xor ecx, ecx
mov ebp, dword [eax + 0x3c]
and dword [esp + 0x14], ecx
add ebp, eax
mov dword [esp + 0x18], ebp
movzx eax, word [ebp + 0x14]
add ebp, 0x18
add ebp, eax
mov eax, dword [esp + 0x18]
movzx eax, word [eax + 6]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x100038e7
mov eax, dword [ebp + 0x24]
and eax, 0x60000020
cmp eax, 0x60000020
je 0x100038e5
mov eax, dword [esp + 0x14]
inc eax
add ebp, 0x28
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x1c]
jb 0x100038c2
jmp 0x100038e7
mov ecx, ebp
pop ebp
test edi, edi
je 0x10003a04
test ecx, ecx
je 0x10003a04
mov eax, dword [edi + 0x10]
cmp eax, dword [ecx + 0x10]
jne 0x10003915
mov eax, dword [esp + 0x14]
sub edx, dword [edi + 0xc]
mov eax, dword [eax + 0x28]
sub eax, dword [ecx + 0xc]
cmp edx, eax
je 0x10003a04
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [esp + 0xc]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push dword [edi + 4]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x1c]
push eax
mov edx, ebx
mov ecx, esi
call fcn.1000616a
mov edx, dword [edi + 4]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x18]
push eax
push ecx
push esi
push dword [esp + 0x1c]
push dword [esp + 0x24]
push ecx
push dword [esp + 0x1848]
mov ecx, dword [edi]
call fcn.1000254d
test eax, eax
je 0x100039fb
lea edx, [esp + 0x824]
lea ecx, [esp + 0x24]
call fcn.1000ad09
mov edx, 0x1000d384
lea ecx, [esp + 0x24]
call fcn.1000ad37
lea edx, [esp + 0x1024]
lea ecx, [esp + 0x24]
call fcn.1000ad37
mov edx, str..exe
lea ecx, [esp + 0x24]
call fcn.1000ad37
xor ebx, ebx
push ebx
push 0x80
push 4
push ebx
push ebx
push 0x40000000
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x100039f2
push ebx
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x24]
mov dword [esp + 0x18], ebx
push dword [esp + 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x14]
call fcn.1000ad9b
mov ecx, dword [esp + 0x10]
call fcn.1000ad9b
mov ecx, esi
call fcn.1000ad9b
pop esi
pop ebx
pop edi
add esp, 0x1818
ret 0xc