Function at 0x401000
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x3058
call fcn.004016b0
mov dword [0x41695c], 0x6e72656b
mov dword [0x416960], 0x32336c65
mov dword [0x416970], 0x61657243
mov dword [0x416974], 0x72506574
mov dword [0x416978], 0x7365636f
mov word [0x41697c], 0x4173
push 0x41695c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x416970
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00402fa6
add esp, 4
lea eax, [ebp - 0x14]
push 0x412a80
push dword [ebp - 0x2c]
push eax
call fcn.0040442b
add esp, 0xc
push 2
push 0
push dword [ebp - 0x14]
call fcn.0040484a
add esp, 0xc
push dword [ebp - 0x14]
call fcn.00404b21
add esp, 4
mov edi, eax
push dword [ebp - 0x14]
call fcn.0040512f
add esp, 4
lea eax, [edi + 0x12c]
xor esi, esi
cmp eax, 1
sbb esi, esi
or esi, eax
push esi
call fcn.004016a2
add esp, 4
mov byte [eax], 0
lea ecx, [eax + 1]
add esi, 0xffffffff
push esi
mov esi, eax
push 0
push ecx
call fcn.00402cf0
add esp, 0xc
push dword [ebp - 0x14]
push edi
push 1
push esi
call fcn.00404647
add esp, 0x10
push dword [ebp - 0x14]
call fcn.00404330
add esp, 4
mov ecx, dword [esi + 0x46]
add esi, ecx
mov edx, ecx
not edx
add edx, edi
je 0x40112a
add edi, 0xfffffffe
test dl, 1
jne 0x40110e
mov eax, edx
jmp 0x401122
lea eax, [edx - 1]
mov bl, byte [esi + edx - 1]
mov byte [ebp - 0x10], bl
test bl, bl
je 0x401122
mov bl, byte [ebp - 0x10]
xor byte [esi + edx], bl
cmp edi, ecx
jne 0x40152a
mov edi, dword [0x41692c]
lea eax, [esi + edi]
mov dword [0x416930], eax
push eax
call fcn.00405300
add esp, 4
mov ebx, esi
mov esi, eax
add esi, edi
lea eax, [ebx + esi]
add eax, 1
mov dword [0x416934], eax
push eax
call fcn.00405300
add esp, 4
add esi, eax
add esi, 1
lea eax, [ebx + esi]
add eax, 1
mov dword [0x416938], eax
push eax
call fcn.00405300
add esp, 4
add esi, eax
add esi, 1
lea eax, [ebx + esi]
add eax, 1
mov dword [0x41693c], eax
push eax
call fcn.00405300
add esp, 4
add esi, eax
add esi, 1
lea eax, [ebx + esi]
add eax, 1
mov dword [0x416940], eax
push eax
call fcn.00405300
add esp, 4
add esi, eax
add esi, 1
lea eax, [ebx + esi]
add eax, 1
mov dword [0x416944], eax
push eax
call fcn.00405300
add esp, 4
add esi, eax
add esi, 1
lea edi, [ebx + esi]
add edi, 1
mov dword [0x416948], edi
push edi
call fcn.00405300
add esp, 4
add esi, eax
add esi, 1
lea eax, [ebx + esi]
add eax, 1
mov dword [0x416950], eax
push eax
call fcn.00405300
add esp, 4
add esi, eax
add esi, 1
mov dword [ebp - 0x28], ebx
lea eax, [ebx + esi]
add eax, 1
mov dword [0x416954], eax
push eax
call fcn.00405300
add esp, 4
add eax, esi
add eax, 2
mov dword [0x41692c], eax
mov dword [ebp - 0x4c], 0
lea eax, [ebp - 0x4c]
lea ecx, [ebp - 0x50]
push edi
push eax
push ecx
call fcn.00403b99
add esp, 0xc
lea esi, [ebp - 0x2064]
push 0x1000
push 0
push esi
call fcn.00402cf0
add esp, 0xc
push dword [ebp - 0x50]
push esi
call fcn.00405210
add esp, 8
push esi
call fcn.00405300
add esp, 4
mov dword [0x41694c], eax
cmp byte [eax + esi - 1], 0x5c
je 0x401279
mov word [ebp + eax - 0x2064], 0x5c
add eax, 1
mov dword [0x41694c], eax
lea esi, [ebp - 0x3064]
push 0x1000
push 0
push esi
call fcn.00402cf0
add esp, 0xc
lea eax, [ebp - 0x2064]
push eax
mov ebx, eax
push esi
call fcn.00405210
add esp, 8
push dword [0x416954]
push esi
call fcn.00405210
add esp, 8
mov esi, dword [0x41692c]
mov eax, dword [ebp - 0x28]
movzx edi, byte [eax + esi]
mov dword [ebp - 0x1c], edi
add esi, 1
mov dword [0x41692c], esi
mov eax, dword [0x416930]
mov dword [ebp - 0x20], eax
push eax
call fcn.00405300
add esp, 4
mov dword [ebp - 0x40], eax
push ebx
call fcn.00405300
add esp, 4
mov dword [ebp - 0x3c], eax
mov eax, dword [0x416934]
mov dword [ebp - 0x18], eax
push eax
call fcn.00405300
add esp, 4
mov dword [ebp - 0x38], eax
mov eax, dword [0x416938]
mov dword [ebp - 0x10], eax
push eax
call fcn.00405300
add esp, 4
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
push eax
call fcn.00405300
add esp, 4
mov dword [ebp - 0x34], eax
mov eax, dword [0x41693c]
mov dword [ebp - 0x24], eax
push eax
call fcn.00405300
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x3064]
push eax
call fcn.00405300
add esp, 4
add ebx, dword [ebp - 0x30]
mov ecx, edi
shl ecx, 0xc
add ecx, dword [ebp - 0x40]
add ecx, dword [ebp - 0x3c]
add ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x34]
add ecx, eax
lea eax, [ecx + ebx*2]
cmp eax, 1
mov edi, 0
sbb edi, edi
or edi, eax
push edi
call fcn.004016a2
add esp, 4
mov ebx, eax
mov byte [eax], 0
add eax, 1
add edi, 0xffffffff
push edi
push 0
push eax
call fcn.00402cf0
add esp, 0xc
push dword [ebp - 0x20]
push ebx
call fcn.00405210
add esp, 8
lea eax, [ebp - 0x2064]
push eax
push ebx
call fcn.00405210
add esp, 8
push dword [ebp - 0x18]
push ebx
call fcn.00405210
add esp, 8
push dword [ebp - 0x10]
push ebx
call fcn.00405210
add esp, 8
push dword [ebp - 0x44]
push ebx
call fcn.00405210
add esp, 8
mov edi, dword [ebp - 0x24]
push edi
push ebx
call fcn.00405210
add esp, 8
push dword [ebp - 0x10]
push ebx
call fcn.00405210
add esp, 8
lea eax, [ebp - 0x3064]
push eax
push ebx
call fcn.00405210
add esp, 8
push edi
mov dword [ebp - 0x18], ebx
push ebx
call fcn.00405210
mov eax, dword [ebp - 0x1c]
add esp, 8
test eax, eax
je 0x401548
nop dword [eax + eax]
add eax, 0xffffffff
mov dword [ebp - 0x1c], eax
mov edi, dword [ebp - 0x28]
mov ebx, dword [edi + esi]
push 0x1000
push 0
lea eax, [ebp - 0x1064]
push eax
call fcn.00402cf0
add esp, 0xc
lea eax, [ebp - 0x2064]
push eax
lea eax, [ebp - 0x1064]
push eax
call fcn.00405210
add esp, 8
lea eax, [ebp - 0x2064]
push eax
call fcn.00405300
add esp, 4
add eax, ebp
add eax, 0xffffef9c
lea ecx, [edi + esi + 4]
push ebx
push ecx
push eax
call fcn.00402770
add esp, 0xc
lea eax, [esi + ebx]
add eax, 4
mov eax, dword [edi + eax]
mov dword [ebp - 0x20], eax
lea eax, [esi + ebx + 8]
mov dword [0x41692c], eax
push dword [ebp - 0x10]
mov esi, dword [ebp - 0x18]
push esi
call fcn.00405210
add esp, 8
lea ebx, [ebp - 0x1064]
push ebx
push esi
call fcn.00405210
add esp, 8
push dword [ebp - 0x24]
push esi
call fcn.00405210
sub esp, 0x14
movaps xmm0, xmmword [section..rdata]
movups xmmword [esp + 4], xmm0
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov eax, dword [0x41692c]
add eax, edi
push 0
lea ecx, [ebp - 0x64]
push ecx
mov edi, dword [ebp - 0x20]
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, edi
add esi, dword [0x41692c]
mov dword [0x41692c], esi
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x401548
mov ecx, dword [0x416938]
mov dword [ebp - 0x10], ecx
mov ecx, dword [0x41693c]
mov dword [ebp - 0x24], ecx
jmp 0x401410
mov eax, ecx
test ecx, ecx
je 0x40112a
movzx ecx, byte [esi + eax - 1]
test cl, cl
je 0x401536
xor byte [esi + eax], cl
lea ecx, [eax - 2]
movzx edx, byte [esi + eax - 2]
test dl, dl
je 0x401520
xor byte [esi + eax - 1], dl
jmp 0x401520
sub esp, 0x1c
movaps xmm0, xmmword [section..rdata]
movups xmmword [esp + 4], xmm0
lea eax, [ebp - 0x3064]
mov dword [esp], eax
mov ebx, eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov edi, dword [ebp - 0x18]
push edi
call fcn.00405300
add esp, 4
lea ecx, [ebp - 0x54]
push 0
push ecx
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x416940]
mov dword [ebp - 0x10], eax
push eax
call fcn.00405300
add esp, 4
mov esi, eax
push ebx
call fcn.00405300
add esp, 4
mov edi, eax
mov ebx, dword [0x416944]
push ebx
call fcn.00405300
add esp, 4
add edi, esi
add eax, edi
add eax, 0x64
cmp eax, 1
mov esi, 0
sbb esi, esi
or esi, eax
push esi
call fcn.004016a2
add esp, 4
mov edi, eax
mov byte [eax], 0
add eax, 1
add esi, 0xffffffff
push esi
push 0
push eax
call fcn.00402cf0
add esp, 0xc
push dword [ebp - 0x10]
push edi
call fcn.00405210
add esp, 8
lea eax, [ebp - 0x3064]
push eax
push edi
call fcn.00405210
add esp, 8
push ebx
push edi
call fcn.00405210
add esp, 8
xorps xmm0, xmm0
movups xmmword [ebp - 0x1030], xmm0
movups xmmword [ebp - 0x1040], xmm0
movups xmmword [ebp - 0x1050], xmm0
movups xmmword [ebp - 0x1060], xmm0
mov dword [ebp - 0x1064], 0x44
mov dword [ebp - 0x1038], 1
mov word [ebp - 0x1034], 0
sub esp, 0x28
lea eax, [ebp - 0x64]
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x1064]
mov dword [esp + 0x20], eax
movups xmmword [esp + 8], xmm0
mov dword [esp + 4], edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp], 0
call dword [ebp - 0x48]
xor eax, eax
add esp, 0x3058
pop esi
pop edi
pop ebx
pop ebp
ret