Function at 0x405b00
Capabilities:
Encode data using xor
Hash data with crc32
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
cmp dword [0x412064], 2
mov eax, dword [esp + 0x44]
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x1c], eax
jg 0x405da0
mov eax, dword [esp + 0x18]
mov edx, ebp
lea esi, [ebp + eax]
mov edi, esi
cmp edi, ebp
je 0x405cfd
movzx eax, byte [ebp]
mov ebx, ebp
movsx esi, byte [eax + 0x412140]
test esi, esi
je 0x405b64
jmp 0x405cd9
movzx eax, byte [ebx]
movsx esi, byte [eax + 0x412140]
test esi, esi
jne 0x405ca0
add ebx, 1
cmp edi, ebx
jne 0x405b52
mov esi, edi
mov edi, ebp
mov ebp, edx
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov ebx, esi
mov dword [esp + 8], 1
sub ebx, edi
mov dword [esp], edi
mov dword [esp + 4], ebx
mov dword [esp + 0xc], eax
call sub.cygwin1.dll_fwrite
movzx eax, byte [esi - 1]
mov edx, dword [esp + 0x18]
test edx, edx
mov byte [0x412240], al
mov eax, 0xffffffff
je 0x405d12
mov edx, eax
xor dl, byte [ebp]
add ebp, 1
shr eax, 8
movzx edx, dl
xor eax, dword [edx*4 + 0x40c040]
cmp ebp, esi
jne 0x405baf
mov esi, eax
mov ebx, eax
shr esi, 8
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], 0x18
mov dword [esp + 4], eax
call sub.cygwin1.dll_putc
call sub.cygwin1.dll___getreent
mov edi, dword [esp + 0x1c]
mov eax, dword [eax + 8]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.cygwin1.dll_putc
mov eax, ebx
xor eax, edi
mov edi, 4
movzx eax, al
xor esi, dword [eax*4 + 0x40c040]
not esi
mov ebx, esi
jmp 0x405c3d
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov byte [0x412240], bl
mov dword [esp + 4], eax
movsx eax, bl
mov dword [esp], eax
call sub.cygwin1.dll_putc
shr ebx, 8
sub edi, 1
je 0x405c87
test bl, 0x60
jne 0x405c18
movzx esi, bl
movzx eax, byte [esi + 0x412140]
cmp al, 1
je 0x405d33
cmp al, 2
je 0x405d21
test al, al
jne 0x405c35
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov ecx, esi
shr ebx, 8
movsx esi, cl
mov byte [0x412240], cl
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.cygwin1.dll_putc
sub edi, 1
jne 0x405c3d
cmp dword [esp + 0x1c], 0x6b
je 0x405e0b
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ebp, ebx
je 0x405cd9
mov dword [esp + 0x14], edx
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 8], 1
mov dword [esp], ebp
mov dword [esp + 0xc], eax
mov eax, ebx
sub eax, ebp
mov dword [esp + 4], eax
call sub.cygwin1.dll_fwrite
movzx eax, byte [ebx - 1]
mov edx, dword [esp + 0x14]
mov byte [0x412240], al
cmp esi, 1
movzx ebp, byte [ebx]
je 0x405e05
cmp esi, 2
je 0x405dd3
test esi, esi
je 0x405d71
lea ebp, [ebx + 1]
cmp edi, ebp
jne 0x405b3c
mov ebp, edx
mov edx, dword [esp + 0x18]
mov esi, edi
mov eax, 0xffffffff
test edx, edx
jne 0x405baf
mov esi, 0xffffff
mov ebx, 0xffffffff
jmp 0x405bcf
movzx eax, byte [0x412240]
and eax, 0x7f
cmp al, 0x40
jne 0x405c60
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], 0x18
mov dword [esp + 4], eax
call sub.cygwin1.dll_putc
call sub.cygwin1.dll___getreent
mov edx, dword [eax + 8]
mov eax, esi
xor eax, 0x40
mov byte [0x412240], al
movsx eax, al
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygwin1.dll_putc
jmp 0x405c35
mov dword [esp + 0x14], edx
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov ecx, ebp
movsx ebp, cl
mov byte [0x412240], cl
mov dword [esp], ebp
lea ebp, [ebx + 1]
mov dword [esp + 4], eax
call sub.cygwin1.dll_putc
mov edx, dword [esp + 0x14]
jmp 0x405cf5
and eax, 3
mov ebx, dword [eax*4 + 0x40f304]
call sub.cygwin1.dll___getreent
mov ecx, dword [esp + 0x18]
mov dword [esp + 4], str.zsdat32:__d__s
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
jmp 0x405b28
movzx eax, byte [0x412240]
mov dword [esp + 0x14], edx
and eax, 0x7f
cmp al, 0x40
jne 0x405d75
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], 0x18
xor ebp, 0x40
mov dword [esp + 4], eax
call sub.cygwin1.dll_putc
jmp 0x405d75
mov dword [esp + 0x14], edx
jmp 0x405de5
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp], 0x11
mov dword [esp + 4], eax
call sub.cygwin1.dll_putc
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 8]
mov dword [esp + 0x40], eax
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
jmp sub.cygwin1.dll_fflush