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

Disassembly:
sub esp, 0x190
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov eax, dword [esi + 0x538]
cmp eax, ebx
je 0x404e94
push ebp
push edi
jmp 0x404c92
mov eax, dword [esp + 0x10]
mov edi, dword [eax + 8]
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
cmp dword [edi + 0x14], ebx
je 0x404e88
cmp dword [edi + 0xc], ebx
je 0x404e88
xor ebp, ebp
call fcn.0040ee6b
mov byte [esp + ebp + 0x18], al
inc ebp
cmp ebp, 0x40
jl 0x404caf
lea edx, [esp + 0x14]
push ebx
mov byte [esp + 0x1c], 0x41
mov byte [esp + 0x1d], 0x43
mov byte [esp + 0x1e], 0x51
mov byte [esp + 0x1f], bl
mov ecx, dword [edi + 8]
push edx
lea eax, [esp + 0x20]
push 0x40
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [edi + 4]
lea edx, [esp + 0x58]
push ebx
push edx
lea eax, [esp + 0x64]
push 0x40
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404e79
xor eax, eax
mov dl, byte [esp + eax + 0x5c]
mov cl, byte [esp + eax + 0x64]
xor cl, dl
mov byte [esp + eax + 0x64], cl
inc eax
cmp eax, 8
jl 0x404d09
movsx ecx, byte [esp + 0x2b]
xor eax, eax
mov edx, ecx
and edx, 0xff
mov dl, byte [edx + 0x42b8a8]
xor byte [esp + eax + 0x5c], dl
inc eax
inc ecx
cmp eax, 0x10
jl 0x404d24
lea ebp, [esi + 0x514]
lea eax, [esp + 0x5c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [ebp]
jne 0x404d6c
cmp cl, bl
je 0x404d68
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [ebp + 1]
jne 0x404d6c
add eax, 2
add ebp, 2
cmp cl, bl
jne 0x404d47
xor eax, eax
jmp 0x404d71
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x404df3
mov eax, dword [esi + 0x524]
mov ecx, dword [esi + 0x528]
mov edx, dword [esi + 0x52c]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x530]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
xor eax, eax
mov cl, byte [esp + eax + 0x18]
mov dl, byte [esp + eax + 0x20]
xor dl, cl
mov byte [esp + eax + 0x20], dl
inc eax
cmp eax, 8
jl 0x404d9f
xor eax, eax
mov dl, byte [esp + 0x2b]
add edx, eax
and edx, 0xff
mov cl, byte [edx + 0x42b8a8]
mov dl, byte [esp + eax + 0x18]
xor dl, cl
mov byte [esp + eax + 0x18], dl
inc eax
cmp eax, 0x10
jl 0x404db5
mov ecx, dword [edi + 8]
lea edx, [esp + 0x14]
push ebx
push edx
lea eax, [esp + 0x20]
push 0x40
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x404e88
mov edx, dword [edi]
push 1
push edx
mov ecx, esi
mov dword [edi + 0xc], ebx
call fcn.00403210
mov eax, dword [edi]
mov ecx, esi
inc eax
push eax
push 0x13
call fcn.00405c20
lea ecx, [esp + 0xa0]
push eax
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edi, [esi + 0x4dc]
lea edx, [esp + 0x9c]
mov ecx, edi
push edx
call fcn.0042131b
push 0x43828c
mov ecx, edi
call fcn.0042131b
push ebx
mov ecx, esi
call fcn.0041fd0c
mov eax, dword [esi + 0x50c]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push ebx
push ebx
mov eax, dword [eax + 0x1c]
push 0xba
push eax
call edi
mov ecx, dword [esi + 0x50c]
dec eax
push eax
push ebx
mov edx, dword [ecx + 0x1c]
push 0xb6
push edx
call edi
jmp 0x404e88
mov eax, dword [edi]
push 1
push eax
mov ecx, esi
mov dword [edi + 0xc], ebx
call fcn.00403210
cmp dword [esp + 0x10], ebx
jne 0x404c8e
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x190
ret