Function at 0x403f50
Capabilities:
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x429a68
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x174
push ebx
push ebp
push esi
push edi
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x3d]
mov byte [esp + 0x3c], 0
rep stosd dword es:[edi], eax
mov ecx, 0x3f
lea edi, [esp + 0x85]
mov byte [esp + 0x84], al
push 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x80
push 3
stosb byte es:[edi], al
mov eax, dword [esp + 0x1a0]
push 0
push 1
push SysReAllocStringLen
push eax
mov dword [esp + 0x1a8], 0
mov dword [esp + 0x34], 0xa0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x404256
xor edi, edi
lea ebx, [esp + 0x70]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], ebx
push 0
push 0
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x44]
push 0x1c
push edx
push ebp
call esi
test eax, eax
je 0x404218
lea eax, [esp + 0x10]
push 0
push eax
push 4
push ebx
push ebp
call esi
test eax, eax
je 0x404221
test edi, edi
jbe 0x40402e
mov eax, dword [ebx - 4]
jmp 0x404030
xor eax, eax
mov ecx, dword [esp + 0x18]
mov esi, str.nllfile
add ecx, eax
lea eax, [esp + 0x3c]
mov dword [esp + 0x18], ecx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x404067
test cl, cl
je 0x404063
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x404067
add eax, 2
add esi, 2
test cl, cl
jne 0x404043
xor eax, eax
jmp 0x40406c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4041c0
mov edi, dword [esp + 0x19c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x84]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x84]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x438100
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x80
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x8c]
and ecx, 3
push 2
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x48]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push 2
and ecx, 3
lea eax, [esp + 0x98]
push 0x40000000
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x20], edi
je 0x404228
mov ecx, dword [esp + 0x18]
push 0
push 0
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor ebx, ebx
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x30]
push 0x10
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40424a
mov esi, dword [esp + 0x10]
xor eax, eax
test esi, esi
jbe 0x404187
mov edi, dword [esp + 0x198]
lea ecx, [esp + 0x28]
sub edi, ecx
lea ecx, [esp + eax + 0x28]
mov dl, byte [edi + ecx]
xor dl, byte [ecx]
inc eax
cmp eax, esi
mov byte [esp + eax + 0x5b], dl
jb 0x404171
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x64]
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40424a
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
add ebx, ecx
cmp ebx, dword [edx]
jb 0x40413d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
add edi, 0x20
add ebx, 4
cmp edi, 0xa0
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], ebx
jb 0x403fe5
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x194]
mov dword [esp + 0x18c], 0xffffffff
call fcn.0041e51a
mov eax, 1
mov ecx, dword [esp + 0x184]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x180
ret 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x404256
mov eax, dword [esp + 0x20]
push eax
jmp 0x40424b
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x194]
mov dword [esp + 0x18c], 0xffffffff
call fcn.0041e51a
xor eax, eax
jmp 0x4041fd
push edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push ebp
call esi
lea ecx, [esp + 0x194]
mov dword [esp + 0x18c], 0xffffffff
call fcn.0041e51a
xor eax, eax
jmp 0x4041fd