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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x480560
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push esi
push edi
mov eax, dword [0x4ad980]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x2c]
lea esi, [ebx + 0x2c]
push eax
call dword [0x485498]
test eax, eax
je 0x402d4a
mov eax, dword [esi]
push eax
call dword [0x4853a4]
test al, 1
je 0x402d4a
mov ecx, dword [esi]
and eax, 0xfffffffe
push eax
push ecx
call dword [0x4853a0]
mov eax, dword [esi]
xor edi, edi
sub eax, 0x10
mov dword [esp + 0x18], edi
cmp dword [eax + 0xc], 1
jle 0x402d66
mov eax, dword [eax + 4]
push eax
mov ecx, esi
call fcn.00406780
mov esi, dword [esi]
push 0x48cc28
lea ecx, [esp + 0x1c]
push esi
push ecx
call fcn.004650ad
add esp, 0xc
push 0x48cc30
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.004063f0
mov dword [esp + 0x70], edi
cmp dword [esp + 0x18], edi
je 0x403073
cmp esi, edi
jne 0x403073
push 0xc
push 0x48cc84
lea ecx, [esp + 0x1c]
call fcn.00405380
push 0xa
lea ecx, [esp + 0x4c]
call fcn.00445b85
mov byte [esp + 0x70], 1
call dword [0x48539c]
lea eax, [ebx + 0x30]
push eax
mov dword [esp + 0x38], eax
call dword [0x4853f8]
mov eax, dword [ebx + 0x74]
mov esi, dword [eax]
mov eax, dword [ebx + 0x5c]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], eax
mov bl, 3
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x74]
mov ecx, dword [ecx + 0x5c]
mov dword [esp + 0x44], edx
test eax, eax
je 0x402dfc
cmp eax, ecx
je 0x402e05
call fcn.004659c2
mov eax, dword [esp + 0x38]
cmp esi, dword [esp + 0x44]
je 0x402f7f
test eax, eax
jne 0x402f78
call fcn.004659c2
xor eax, eax
cmp esi, dword [eax + 0x18]
jne 0x402e28
call fcn.004659c2
mov esi, dword [esi + 0x10]
lea ecx, [esp + 0x20]
call fcn.00406680
mov byte [esp + 0x70], 2
push edi
lea eax, [esp + 0x24]
push 0x48cca0
push eax
call fcn.00405fb0
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax - 0xc]
add esp, 0xc
push ecx
push eax
lea ecx, [esp + 0x1c]
inc edi
call fcn.00405380
lea ecx, [esp + 0x1c]
call fcn.00406680
mov byte [esp + 0x70], bl
mov ecx, dword [esi + 4]
push ecx
lea edx, [esp + 0x20]
push 0x48d764
push edx
call fcn.00405fb0
push esi
lea eax, [esp + 0x38]
push 0x48ccf0
push eax
call fcn.00404fd0
mov byte [esp + 0x88], 4
push 0x48cccc
push eax
lea ecx, [esp + 0x44]
push ecx
call fcn.00404f00
add esp, 0x24
mov byte [esp + 0x70], 5
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00405380
mov byte [esp + 0x70], 4
lea ecx, [esp + 0x24]
call fcn.004065d0
mov byte [esp + 0x70], bl
lea ecx, [esp + 0x28]
call fcn.004065d0
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x34]
push 0x48cd40
push eax
call fcn.00404fd0
mov byte [esp + 0x7c], 6
push 0x48cd24
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.00404f00
add esp, 0x18
mov byte [esp + 0x70], 7
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.00405380
mov byte [esp + 0x70], 6
lea ecx, [esp + 0x2c]
call fcn.004065d0
mov byte [esp + 0x70], bl
lea ecx, [esp + 0x30]
call fcn.004065d0
push 0xc
push 0x48cd6c
lea ecx, [esp + 0x1c]
call fcn.00405380
mov byte [esp + 0x70], 2
lea ecx, [esp + 0x1c]
call fcn.004065d0
mov byte [esp + 0x70], 1
lea ecx, [esp + 0x20]
call fcn.004065d0
lea esi, [esp + 0x38]
call fcn.004307f0
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
jmp 0x402de7
mov eax, dword [eax]
jmp 0x402e1e
mov edx, dword [esp + 0x34]
push edx
call dword [0x4853f4]
push 0xd
push 0x48cd88
lea ecx, [esp + 0x1c]
call fcn.00405380
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], 1
jle 0x402fb5
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x18]
call fcn.00406780
mov eax, dword [esp + 0x14]
mov ebx, dword [0x485398]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0
call ebx
mov esi, eax
inc esi
push esi
call fcn.00464729
mov edi, eax
mov eax, dword [esp + 0x18]
add esp, 4
cmp dword [eax - 4], 1
jle 0x402ff5
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [esp + 0x18]
call fcn.00406780
mov eax, dword [esp + 0x14]
push 0
push 0
push esi
push edi
push 0xffffffffffffffff
push eax
push 0
push 0
call ebx
test edi, edi
je 0x403030
xor eax, eax
test esi, esi
jle 0x403019
mov edi, edi
xor byte [eax + edi], 0xab
inc eax
cmp eax, esi
jl 0x403010
mov edx, dword [esp + 0x18]
push edx
push esi
push 1
push edi
call fcn.00465262
push edi
call fcn.0046464c
add esp, 0x14
mov eax, dword [esp + 0x18]
push eax
call fcn.0046535b
add esp, 4
mov byte [esp + 0x70], 0
lea ecx, [esp + 0x48]
call fcn.00445c76
mov dword [esp + 0x70], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.004065d0
mov al, 1
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [esp + 0x70], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.004065d0
xor al, al
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4