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

Disassembly:
sub esp, 0xf8
mov eax, dword [0x42cb90]
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.0040eb90
push 0x33
lea ecx, [esp + 0xa9]
push ebx
push ecx
mov byte [esp + 0xb0], bl
call fcn.0040eb90
push 0x33
lea edx, [esp + 0xe9]
push ebx
push edx
mov byte [esp + 0xf0], bl
call fcn.0040eb90
push 0x33
lea eax, [esp + 0x8d]
push ebx
push eax
mov byte [esp + 0x94], bl
call fcn.0040eb90
push 0x4233d0
push esi
call fcn.0040f6c8
mov ebp, eax
add esp, 0x38
cmp ebp, ebx
jne 0x40165a
pop esi
pop ebp
lea eax, [ebx - 4]
pop ebx
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040f6db
add esp, 0xf8
ret
push 2
push ebx
push ebp
call fcn.0040f57f
push ebp
call fcn.0040f48a
push ebx
push ebx
push ebp
mov esi, eax
call fcn.0040f57f
add esp, 0x1c
cmp esi, 1
jge 0x4016a1
push ebp
call fcn.0040f276
add esp, 4
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
mov ecx, dword [esp + 0xf4]
xor ecx, esp
call fcn.0040f6db
add esp, 0xf8
ret
push edi
lea edi, [esi + 0xa]
push edi
call fcn.0040f141
add esp, 4
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x401a14
push edi
push ebx
push eax
call fcn.0040eb90
mov edi, dword [esp + 0x1c]
push ebp
push esi
push 1
push edi
call fcn.0040f0d7
mov esi, eax
push ebp
mov dword [esp + 0x30], esi
call fcn.0040f276
push esi
push edi
lea ecx, [esp + 0x44]
push ecx
push str.eyVal
xor ebp, ebp
call fcn.00401500
add esp, 0x30
cmp eax, ebx
jne 0x401a23
mov eax, dword [esp + 0x1c]
mov cl, byte [eax]
cmp cl, 0xa
je 0x4019c2
cmp cl, 0xd
je 0x4019c2
push 0x32
lea edx, [esp + 0x6c]
push edx
push eax
call fcn.0040b5a0
push esi
push edi
lea eax, [esp + 0x28]
push eax
push str.xVal
call fcn.00401500
add esp, 0x1c
cmp eax, ebx
jne 0x401a23
mov esi, dword [esp + 0x14]
mov al, byte [esi]
cmp al, 0xa
je 0x4019de
cmp al, 0xd
je 0x4019de
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 0x401753
push 0x32
lea eax, [esp + 0x38]
push eax
push esi
call fcn.0040b5a0
add esp, 0xc
xor eax, eax
jmp 0x401780
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 0x401780
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 0x4017e0
mov edx, dword [esp + 0x10]
push edx
push edi
lea eax, [esp + 0x20]
push eax
push str.yVal
call fcn.00401500
add esp, 0x10
cmp eax, ebx
jne 0x401a0b
mov ecx, dword [esp + 0x18]
mov al, byte [ecx]
cmp al, 0xa
je 0x4019de
cmp al, 0xd
je 0x4019de
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 0x401824
push 0x32
lea edx, [esp + 0xa0]
push edx
push ecx
call fcn.0040b5a0
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 0x401851
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 0x4018c5
mov edx, dword [esp + 0x10]
push edx
push edi
lea eax, [esp + 0x28]
push eax
push str.zVal
call fcn.00401500
add esp, 0x10
cmp eax, ebx
jne 0x401a0b
mov ecx, dword [esp + 0x20]
mov al, byte [ecx]
cmp al, 0xa
je 0x4019de
cmp al, 0xd
je 0x4019de
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 0x401910
push 0x32
lea edx, [esp + 0xd4]
push edx
push ecx
call fcn.0040b5a0
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 0x401940
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 0x4019b4
jmp 0x4019de
push esi
push edi
lea edx, [esp + 0x1c]
push edx
push str.xVal
call fcn.00401500
mov esi, dword [esp + 0x24]
add esp, 0x10
cmp esi, ebx
je 0x401a0b
cmp byte [esi], 0x78
je 0x4019eb
sub esi, 1
cmp byte [esi], 0x78
jne 0x4019e3
mov eax, dword [esp + 0x30]
push 0x4233ac
push eax
call fcn.0040f6c8
mov ebp, eax
push ebp
sub esi, edi
push esi
push 1
push edi
call fcn.0040edb9
add esp, 0x18
push edi
call fcn.0040e862
add esp, 4
cmp ebp, ebx
je 0x401a21
push ebp
call fcn.0040f276
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x104]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040f6db
add esp, 0xf8
ret