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

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebx, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x24]
push edi
mov edi, dword [esp + 0x20]
mov eax, dword [esi + 0xda8]
test eax, eax
je 0x5c27e7
test edi, edi
mov ebp, ebx
je 0x5c27e7
mov dword [esp + 0x20], edi
push esi
call fcn.005c2440
mov dword [esp + 0x18], eax
push esi
movsx eax, byte [ebp]
push eax
call fcn.005c2460
mov cl, byte [esp + 0x20]
mov dl, byte [ebp]
mov eax, dword [esp + 0x2c]
xor dl, cl
add esp, 0xc
mov byte [ebp], dl
inc ebp
dec eax
mov dword [esp + 0x20], eax
jne 0x5c27b7
mov eax, dword [esi + 0x1be]
xor ecx, ecx
cmp eax, ecx
je 0x5c28b2
mov eax, dword [esi + 0x1da]
lea edx, [esp + 0x10]
push edx
mov edx, dword [esi + 0x1d2]
push eax
mov eax, dword [esi + 0x1ce]
mov ecx, 0x20
mov dword [esp + 0x30], edi
mov dword [esp + 0x18], 3
call fcn.005d58c0
mov ecx, dword [esi + 0x1ce]
mov edx, dword [esi + 0x1ca]
push eax
mov eax, dword [esi + 0x1c6]
push ecx
mov ecx, 0x20
call fcn.005d58c0
mov edx, dword [esi + 0x1c6]
push eax
lea eax, [esp + 0x3c]
push edx
push eax
push ebx
push 1
call dword [esi + 0x1d6]
mov eax, dword [esp + 0x10]
cmp eax, 3
ja case.0x5c2866.0
jmp dword [eax*4 + 0x5c2ae0]
mov eax, dword [esp + 0x28]
cmp eax, edi
jne 0x5c2ad7
mov edx, dword [esi + 0x1ce]
pop edi
add edx, eax
mov dword [esi + 0x1ce], edx
mov ecx, dword [esi + 0x1d2]
adc ecx, 0
mov dword [esi + 0x1d2], ecx
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov dword [esi + 0x8e], 1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov ebp, dword [esp + 0x24]
cmp ebp, ecx
je case.0x5c2866.0
mov eax, dword [ebp]
cmp eax, 0xffffffff
je case.0x5c2866.0
test byte [esi + 0xdf1], 0x80
je 0x5c2aba
mov eax, dword [esi + 0x96]
mov dword [esp + 0x20], ecx
cmp eax, 0xffffffff
jne 0x5c2a00
mov ecx, dword [esi + 0xdb0]
push esi
push ecx
call fcn.005bd120
add esp, 8
cmp eax, edi
jl 0x5c2943
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp]
lea edx, [esp + 0x28]
push 0
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5c29f4
cmp dword [esp + 0x28], edi
jne 0x5c29f4
mov eax, dword [esi + 0xe04]
mov dword [esp + 0x20], edi
add eax, edi
mov dword [esi + 0xe04], eax
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
cmp edi, 0x200
jb 0x5c29ab
push esi
push 0x200
push ebp
push 0
call fcn.005bdf60
add esp, 0x10
test eax, eax
jne 0x5c29f4
lea edx, [esp + 0x28]
push eax
mov eax, dword [ebp]
push edx
push 0x200
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5c29f4
mov ecx, dword [esp + 0x28]
mov eax, 0x200
cmp ecx, eax
jne 0x5c29f4
mov ecx, dword [esi + 0xe04]
sub edi, eax
add ecx, eax
add ebx, eax
mov dword [esi + 0xe04], ecx
mov ecx, dword [esp + 0x20]
add ecx, eax
cmp edi, eax
mov dword [esp + 0x20], ecx
jae 0x5c294b
test edi, edi
je 0x5c29f4
push esi
push edi
push ebp
push 0
call fcn.005bdf60
add esp, 0x10
test eax, eax
jne 0x5c29f4
mov edx, dword [ebp]
lea ecx, [esp + 0x28]
push eax
push ecx
push edi
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5c29f4
cmp dword [esp + 0x28], edi
jne 0x5c29f4
mov ecx, dword [esi + 0xe04]
mov eax, dword [esp + 0x20]
add ecx, edi
add eax, edi
mov dword [esi + 0xe04], ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov ebp, ebx
mov ebx, edi
test edi, edi
jbe 0x5c2aae
push esi
call fcn.005be6f0
add esp, 4
mov edi, eax
cmp edi, ebx
push 0
jl 0x5c2a3d
mov ecx, dword [esi + 0x96]
lea eax, [esp + 0x2c]
push eax
push ebx
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5c2a8d
cmp dword [esp + 0x28], ebx
je 0x5c2a96
jmp 0x5c2a8d
mov eax, dword [esi + 0x96]
lea edx, [esp + 0x2c]
push edx
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x5c2a79
cmp dword [esp + 0x28], edi
jne 0x5c2a79
mov edx, dword [esp + 0x20]
mov eax, dword [esi + 0xe04]
sub ebx, edi
add edx, edi
add ebp, edi
add eax, edi
mov dword [esp + 0x20], edx
mov dword [esi + 0xe04], eax
jmp 0x5c2a7b
xor ebx, ebx
mov ecx, dword [esp + 0x24]
push esi
push ecx
call fcn.005be730
add esp, 8
test eax, eax
jne 0x5c2aae
test ebx, ebx
jbe 0x5c2aae
jmp 0x5c2a0c
mov ecx, dword [esp + 0x20]
mov eax, dword [esi + 0xe04]
add ecx, ebx
add eax, ebx
mov dword [esp + 0x20], ecx
mov dword [esi + 0xe04], eax
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
lea edx, [esp + 0x28]
push ecx
push edx
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je case.0x5c2866.0
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x5c2ad7
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret