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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push str.C:Users_
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [esp + 0x24], esi
cmp esi, 0xffffffff
jne 0x401560
push 0x4032c0
call fcn.00401010
add esp, 4
or eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004018cc
mov esp, ebp
pop ebp
ret
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [esp + 0x14], edi
cmp edi, 0xffffffff
jne 0x401583
push 0x4032d0
call fcn.00401010
jmp 0x401860
push edi
call fcn.0040191d
add esp, 4
mov ebx, eax
mov dword [esp + 0x20], ebx
push edi
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x34], 0
lea eax, [esp + 0x34]
push 0
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40184d
cmp dword [esp + 0x34], edi
jne 0x40184d
mov eax, 0x5a4d
cmp ax, word [ebx]
jne 0x40181c
mov eax, dword [ebx + 0x3c]
cmp dword [ebx + eax], 0x4550
jne 0x40181c
push 0x4032f4
call fcn.00401010
mov edx, dword [ebx + 0x3c]
xor esi, esi
add edx, ebx
add esp, 4
xorps xmm0, xmm0
mov dword [esp + 0x10], edx
movlpd qword [esp + 0x28], xmm0
movzx eax, word [edx + 0x14]
lea ecx, [edx + 0x18]
mov edi, dword [edx + 0x28]
add ecx, eax
cmp dword [edx + 0x74], esi
jbe 0x401642
mov edx, dword [ecx + 0xc]
cmp edx, edi
ja 0x40162c
mov eax, dword [ecx + 0x10]
add eax, edx
cmp edi, eax
jbe 0x401710
inc esi
add ecx, 0x28
mov eax, esi
cdq
test edx, edx
ja 0x401642
jb 0x401618
mov edx, dword [esp + 0x10]
cmp eax, dword [edx + 0x74]
jb 0x401618
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov eax, ebx
xorps xmm0, xmm0
cdq
mov ebx, eax
mov edi, edx
add ebx, ecx
adc edi, esi
sub esp, 0x18
mov esi, esp
push 0x20
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
call fcn.004018df
mov dword [esi], eax
mov dword [esi + 0x10], 0x11
mov dword [esi + 0x14], 0x1f
movups xmm0, xmmword [str.8B_45_FC_C7_40_04]
movups xmmword [eax], xmm0
mov cl, byte [0x4031d0]
push ecx
mov byte [eax + 0x10], cl
mov ecx, 6
push edi
push ebx
mov byte [eax + 0x11], 0
call fcn.00401360
mov edi, eax
push dword [edi + 4]
push dword [edi]
push str.uint64_t_Content:__08X_n
call fcn.00401010
mov ebx, dword [esp + 0x1c]
add esp, 0xc
push dword [ebx + 0x28]
push 0x4031ec
call fcn.00401010
mov esi, dword [ebx + 0x28]
xor eax, eax
add esi, 0x271
add esi, dword [edi]
adc eax, dword [edi + 4]
push eax
push esi
push 0x4031fc
call fcn.00401010
mov dword [ebx + 0x28], esi
mov eax, 0x5a4d
mov ebx, dword [esp + 0x34]
add esp, 0x14
cmp word [ebx], ax
je 0x401724
push 0x403214
call fcn.00401010
add esp, 4
jmp 0x4017d2
mov ecx, dword [ecx + 0x14]
xor esi, esi
sub ecx, edx
mov eax, esi
sbb esi, eax
add ecx, edi
adc esi, eax
jmp 0x40164a
mov edi, dword [ebx + 0x3c]
add edi, ebx
cmp dword [edi], 0x4550
je 0x401743
push 0x403224
call fcn.00401010
add esp, 4
jmp 0x4017d2
movzx ecx, word [edi + 0x14]
movzx eax, word [edi + 6]
add ecx, edi
test eax, eax
jne 0x401760
push 0x403234
call fcn.00401010
add esp, 4
jmp 0x4017d2
lea eax, [eax + eax*4]
lea eax, [eax - 2]
lea esi, [ecx + eax*8]
push esi
push 0x403240
call fcn.00401010
push dword [esi + 8]
push dword [esi + 0x10]
push 0x40325c
call fcn.00401010
mov eax, 0xffff
xorps xmm0, xmm0
add word [edi + 6], ax
add esp, 0x14
mov eax, dword [esi + 8]
sub dword [edi + 0x50], eax
mov eax, dword [esp + 0x14]
movups xmmword [esi], xmm0
movups xmmword [esi + 0x10], xmm0
movq qword [esi + 0x20], xmm0
mov ecx, dword [esi + 0x10]
sub eax, ecx
sub eax, esi
add eax, ebx
push eax
lea eax, [ecx + esi]
push eax
push esi
call sub.VCRUNTIME140.dll_memmove
movzx eax, word [edi + 6]
add esp, 0xc
push eax
push 0x403280
call fcn.00401010
add esp, 8
mov esi, dword [esp + 0x24]
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4017ef
push 0x403300
jmp 0x401852
push 0
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 0
push eax
push dword [esp + 0x1c]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401815
push 0x403314
jmp 0x401852
push 0x403324
jmp 0x401821
push 0x403338
call fcn.00401010
add esp, 4
push ebx
call fcn.004018da
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004018cc
mov esp, ebp
pop ebp
ret
push 0x4032e4
call fcn.00401010
add esp, 4
push ebx
call fcn.004018da
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x3c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004018cc
mov esp, ebp
pop ebp
ret