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

Disassembly:
sub esp, 0xf8
mov eax, dword [0x435e80]
xor eax, esp
mov dword [esp + 0xf4], eax
mov eax, dword [esp + 0x100]
mov ecx, dword [esp + 0x104]
mov edx, dword [esp + 0x108]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x108]
xor ebx, ebx
push 0x33
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x35]
push ebx
push eax
mov dword [esp + 0x38], esi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebx
mov byte [esp + 0x3c], bl
call fcn.00412590
push 0x33
lea ecx, [esp + 0xa9]
push ebx
push ecx
mov byte [esp + 0xb0], bl
call fcn.00412590
push 0x33
lea edx, [esp + 0xe9]
push ebx
push edx
mov byte [esp + 0xf0], bl
call fcn.00412590
push 0x33
lea eax, [esp + 0x8d]
push ebx
push eax
mov byte [esp + 0x94], bl
call fcn.00412590
push 0x42a3f4
push esi
call fcn.0041349e
mov ebp, eax
add esp, 0x38
cmp ebp, ebx
jne 0x40175a
pop esi
pop ebp
lea eax, [ebx - 4]
pop ebx
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.00412a21
add esp, 0xf8
ret
push 2
push ebx
push ebp
call fcn.00413355
push ebp
call fcn.00413260
push ebx
push ebx
push ebp
mov esi, eax
call fcn.00413355
add esp, 0x1c
cmp esi, 1
jge 0x4017a1
push ebp
call fcn.0041304c
add esp, 4
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.00412a21
add esp, 0xf8
ret
push edi
lea edi, [esi + 0xa]
push edi
call fcn.00412f17
add esp, 4
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x401b14
push edi
push ebx
push eax
call fcn.00412590
mov edi, dword [esp + 0x1c]
push ebp
push esi
push 1
push edi
call fcn.00412ead
mov esi, eax
push ebp
mov dword [esp + 0x30], esi
call fcn.0041304c
push esi
push edi
lea ecx, [esp + 0x44]
push ecx
push str.eyVal
xor ebp, ebp
call fcn.00401600
add esp, 0x30
cmp eax, ebx
jne 0x401b23
mov eax, dword [esp + 0x1c]
mov cl, byte [eax]
cmp cl, 0xa
je 0x401ac2
cmp cl, 0xd
je 0x401ac2
push 0x32
lea edx, [esp + 0x6c]
push edx
push eax
call fcn.0040efa0
push esi
push edi
lea eax, [esp + 0x28]
push eax
push str.xVal
call fcn.00401600
add esp, 0x1c
cmp eax, ebx
jne 0x401b23
mov esi, dword [esp + 0x14]
mov al, byte [esi]
cmp al, 0xa
je 0x401ade
cmp al, 0xd
je 0x401ade
xor eax, eax
mov dl, byte [esi + eax*2 + 1]
mov cl, byte [esi + eax*2]
mov byte [esi + eax*2], dl
mov byte [esi + eax*2 + 1], cl
add eax, 1
cmp eax, 0x32
jl 0x401853
push 0x32
lea eax, [esp + 0x38]
push eax
push esi
call fcn.0040efa0
add esp, 0xc
xor eax, eax
jmp 0x401880
movzx ecx, byte [esp + eax + 0x68]
xor byte [esp + eax + 0x34], cl
movzx edx, byte [esp + eax + 0x69]
movzx ecx, byte [esp + eax + 0x6a]
xor byte [esp + eax + 0x35], dl
xor byte [esp + eax + 0x36], cl
movzx edx, byte [esp + eax + 0x6b]
movzx ecx, byte [esp + eax + 0x6c]
xor byte [esp + eax + 0x37], dl
xor byte [esp + eax + 0x38], cl
add eax, 5
cmp eax, 0x32
jl 0x401880
movzx eax, byte [esp + 0x34]
lea edx, [eax + eax*4]
movzx eax, byte [esp + 0x35]
lea ecx, [esp + eax + 0x36]
mov byte [ecx + edx*2 - 0x210], bl
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x36]
mov ecx, eax
sub edx, ecx
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
cmp cl, bl
jne 0x4018e0
mov edx, dword [esp + 0x10]
push edx
push edi
lea eax, [esp + 0x20]
push eax
push str.yVal
call fcn.00401600
add esp, 0x10
cmp eax, ebx
jne 0x401b0b
mov ecx, dword [esp + 0x18]
mov al, byte [ecx]
cmp al, 0xa
je 0x401ade
cmp al, 0xd
je 0x401ade
xor eax, eax
mov bl, byte [ecx + eax*2 + 1]
mov dl, byte [ecx + eax*2]
mov byte [ecx + eax*2], bl
mov byte [ecx + eax*2 + 1], dl
add eax, 1
cmp eax, 0x32
jl 0x401924
push 0x32
lea edx, [esp + 0xa0]
push edx
push ecx
call fcn.0040efa0
add esp, 0xc
xor ebx, ebx
xor eax, eax
movzx ecx, byte [esp + eax + 0x68]
xor byte [esp + eax + 0x9c], cl
movzx edx, byte [esp + eax + 0x69]
movzx ecx, byte [esp + eax + 0x6a]
xor byte [esp + eax + 0x9d], dl
xor byte [esp + eax + 0x9e], cl
movzx edx, byte [esp + eax + 0x6b]
movzx ecx, byte [esp + eax + 0x6c]
xor byte [esp + eax + 0x9f], dl
xor byte [esp + eax + 0xa0], cl
add eax, 5
cmp eax, 0x32
jl 0x401951
movzx eax, byte [esp + 0x9c]
lea edx, [eax + eax*4]
movzx eax, byte [esp + 0x9d]
lea ecx, [esp + eax + 0x9e]
mov byte [ecx + edx*2 - 0x210], bl
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x9e]
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
cmp cl, bl
jne 0x4019c5
mov edx, dword [esp + 0x10]
push edx
push edi
lea eax, [esp + 0x28]
push eax
push str.zVal
call fcn.00401600
add esp, 0x10
cmp eax, ebx
jne 0x401b0b
mov ecx, dword [esp + 0x20]
mov al, byte [ecx]
cmp al, 0xa
je 0x401ade
cmp al, 0xd
je 0x401ade
xor eax, eax
lea esp, [esp]
mov bl, byte [ecx + eax*2 + 1]
mov dl, byte [ecx + eax*2]
mov byte [ecx + eax*2], bl
mov byte [ecx + eax*2 + 1], dl
add eax, 1
cmp eax, 0x32
jl 0x401a10
push 0x32
lea edx, [esp + 0xd4]
push edx
push ecx
call fcn.0040efa0
add esp, 0xc
xor ebx, ebx
xor eax, eax
lea ecx, [ecx]
movzx ecx, byte [esp + eax + 0x68]
xor byte [esp + eax + 0xd0], cl
movzx edx, byte [esp + eax + 0x69]
movzx ecx, byte [esp + eax + 0x6a]
xor byte [esp + eax + 0xd1], dl
xor byte [esp + eax + 0xd2], cl
movzx edx, byte [esp + eax + 0x6b]
movzx ecx, byte [esp + eax + 0x6c]
xor byte [esp + eax + 0xd3], dl
xor byte [esp + eax + 0xd4], cl
add eax, 5
cmp eax, 0x32
jl 0x401a40
movzx eax, byte [esp + 0xd0]
lea edx, [eax + eax*4]
movzx eax, byte [esp + 0xd1]
lea ecx, [esp + eax + 0xd2]
mov byte [ecx + edx*2 - 0x210], bl
mov edx, dword [esp + 0x28]
lea eax, [esp + 0xd2]
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
cmp cl, bl
jne 0x401ab4
jmp 0x401ade
push esi
push edi
lea edx, [esp + 0x1c]
push edx
push str.xVal
call fcn.00401600
mov esi, dword [esp + 0x24]
add esp, 0x10
cmp esi, ebx
je 0x401b0b
cmp byte [esi], 0x78
je 0x401aeb
sub esi, 1
cmp byte [esi], 0x78
jne 0x401ae3
mov eax, dword [esp + 0x30]
push 0x42a3d0
push eax
call fcn.0041349e
mov ebp, eax
push ebp
sub esi, edi
push esi
push 1
push edi
call fcn.00412b8f
add esp, 0x18
push edi
call fcn.00412262
add esp, 4
cmp ebp, ebx
je 0x401b21
push ebp
call fcn.0041304c
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x104]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00412a21
add esp, 0xf8
ret