Function at 0x404d60
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x5c8
push ebx
push ebp
mov ebp, dword [esp + 0x5d4]
push esi
mov esi, eax
cmp ebp, 0x100
jbe 0x404d86
mov eax, dword [esi + 0x400]
mov dword [esp + 0x38], eax
jmp 0x404d8e
mov dword [esp + 0x38], 0x10
push 0x44
xor ebx, ebx
lea ecx, [esp + 0x4c]
push ebx
push ecx
call fcn.00410d00
add esp, 0xc
mov ecx, esi
mov edx, ebp
mov eax, dword [ecx]
inc dword [esp + eax*4 + 0x48]
lea eax, [esp + eax*4 + 0x48]
add ecx, 4
sub edx, 1
jne 0x404da4
cmp dword [esp + 0x48], ebp
jne 0x404dda
mov edx, dword [esp + 0x5e8]
mov eax, dword [esp + 0x5ec]
pop esi
mov dword [edx], ebx
mov dword [eax], ebx
pop ebp
xor eax, eax
pop ebx
add esp, 0x5c8
ret
mov ecx, 1
nop
cmp dword [esp + ecx*4 + 0x48], ebx
jne 0x404dec
inc ecx
cmp ecx, 0x10
jbe 0x404de0
mov edx, dword [esp + 0x5ec]
mov dword [esp + 0xc], ecx
cmp dword [edx], ecx
jae 0x404dfd
mov dword [edx], ecx
mov eax, 0x10
cmp dword [esp + eax*4 + 0x48], ebx
jne 0x404e0d
sub eax, 1
jne 0x404e02
mov dword [esp + 0x30], eax
cmp dword [edx], eax
jbe 0x404e17
mov dword [edx], eax
mov edx, 1
shl edx, cl
cmp ecx, eax
jae 0x404e2f
sub edx, dword [esp + ecx*4 + 0x48]
js 0x404e53
inc ecx
add edx, edx
cmp ecx, eax
jb 0x404e22
push edi
lea edi, [eax*4]
mov ecx, dword [esp + edi + 0x4c]
sub edx, ecx
mov dword [esp + 0x48], edx
jns 0x404e62
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x5c8
ret
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x5c8
ret
add ecx, edx
mov dword [esp + edi + 0x4c], ecx
xor ecx, ecx
sub eax, 1
mov dword [esp + 0xd8], ebx
je 0x404e93
xor edx, edx
jmp 0x404e80
add ecx, dword [esp + edx + 0x50]
add edx, 4
sub eax, 1
mov dword [esp + edx + 0xd8], ecx
jne 0x404e80
push 0x480
lea ecx, [esp + 0x15c]
push ebx
push ecx
call fcn.00410d00
add esp, 0xc
xor edx, edx
jmp 0x404eb0
mov eax, dword [esi]
add esi, 4
cmp eax, ebx
je 0x404ed1
mov ecx, dword [esp + eax*4 + 0xd4]
lea eax, [esp + eax*4 + 0xd4]
mov dword [esp + ecx*4 + 0x158], edx
inc ecx
mov dword [eax], ecx
inc edx
cmp edx, ebp
jb 0x404eb0
mov edx, dword [esp + edi + 0xd4]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x158]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x34]
xor ebp, ebp
or esi, 0xffffffff
xor edi, edi
cmp ecx, eax
mov dword [esp + 0x5dc], edx
mov dword [esp + 0x20], ebp
mov dword [esp + 0xd4], ebx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x118], ebx
mov dword [esp + 0x40], ebx
jg 0x4051fa
lea edx, [ecx - 1]
mov dword [esp + 0x38], edx
lea edx, [esp + ecx*4 + 0x4c]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x24]
mov edx, dword [edx]
mov dword [esp + 0x1c], edx
test edx, edx
je 0x4051e4
jmp 0x404f50
mov eax, dword [esp + esi*4 + 0x94]
dec dword [esp + 0x1c]
add eax, ebx
cmp ecx, eax
jle 0x4050b4
lea edx, [esp + 0x118]
sub edx, 4
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x34]
mov ebp, eax
mov eax, dword [esp + 0x5f0]
mov eax, dword [eax]
sub edx, ebp
inc esi
mov dword [esp + 0x14], ebp
cmp edx, eax
jbe 0x404f8f
mov edx, eax
mov ebx, ecx
sub ebx, ebp
mov ecx, ebx
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x1c]
inc ecx
cmp eax, ecx
jbe 0x404fca
mov edi, dword [esp + 0x24]
or ecx, 0xffffffff
sub ecx, dword [esp + 0x1c]
inc ebx
add eax, ecx
cmp ebx, edx
jae 0x404fca
mov ecx, dword [edi + 4]
add edi, 4
add eax, eax
cmp eax, ecx
jbe 0x404fca
inc ebx
sub eax, ecx
cmp ebx, edx
jb 0x404fb7
mov eax, dword [esp + 0x3c]
lea edx, [ebx + ebp]
cmp edx, eax
jbe 0x404fdd
cmp ebp, eax
jae 0x404fdd
mov ebx, eax
sub ebx, ebp
mov ecx, ebx
mov edi, 1
shl edi, cl
mov dword [esp + esi*4 + 0x94], ebx
lea eax, [edi + edi*2 + 3]
add eax, eax
add eax, eax
push eax
call fcn.0040b8ee
add esp, 4
test eax, eax
je 0x405226
mov ecx, dword [0x5f637c]
mov edx, dword [esp + 0x5ec]
mov dword [eax], ecx
lea ecx, [eax + 0xc]
mov dword [0x5f637c], eax
add eax, 8
mov dword [edx], ecx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x5ec], eax
mov dword [eax], 0
mov dword [esp + 0x40], ecx
mov dword [esp + esi*4 + 0x118], ecx
test esi, esi
je 0x405097
mov al, byte [esp + esi*4 + 0x90]
mov ebp, dword [esp + 0x20]
mov byte [esp + 0x2d], al
add bl, 0x10
mov byte [esp + 0x2c], bl
mov ebx, ecx
mov ecx, edx
mov eax, 1
shl eax, cl
sub ecx, dword [esp + esi*4 + 0x90]
mov dword [esp + esi*4 + 0xd4], ebp
mov dword [esp + 0x30], ebx
dec eax
and eax, ebp
shr eax, cl
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0x44]
mov eax, dword [eax + esi*4]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x28]
mov dword [eax], ecx
mov ecx, dword [esp + 0x2c]
mov dword [eax + 4], ecx
mov dword [eax + 8], ebx
mov eax, dword [esp + esi*4 + 0x94]
mov ecx, dword [esp + 0x10]
add eax, edx
cmp ecx, eax
jg 0x404f73
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x5dc]
mov dl, cl
sub dl, bl
mov byte [esp + 0x2d], dl
lea edx, [esp + eax*4 + 0x158]
mov eax, dword [esp + 0x18]
cmp eax, edx
jb 0x4050d9
mov byte [esp + 0x2c], 0x63
jmp 0x405130
mov eax, dword [eax]
mov edx, dword [esp + 0x5e0]
cmp eax, edx
jae 0x405109
cmp eax, 0x100
setb al
add al, 0xf
mov byte [esp + 0x2c], al
mov eax, dword [esp + 0x18]
mov dx, word [eax]
add eax, 4
mov word [esp + 0x30], dx
mov dword [esp + 0x18], eax
jmp 0x405130
sub eax, edx
mov edx, dword [esp + 0x5e8]
add eax, eax
mov dl, byte [eax + edx]
add dword [esp + 0x18], 4
mov byte [esp + 0x2c], dl
mov edx, dword [esp + 0x5e4]
mov ax, word [eax + edx]
mov word [esp + 0x30], ax
sub ecx, ebx
mov edx, 1
shl edx, cl
mov eax, ebp
mov ecx, ebx
shr eax, cl
cmp eax, edi
jae 0x405178
mov ebx, dword [esp + 0x40]
lea ebp, [edx + edx*2]
add ebp, ebp
lea ecx, [eax + eax*2]
add ebp, ebp
lea ecx, [ebx + ecx*4]
mov ebx, dword [esp + 0x28]
mov dword [ecx], ebx
mov ebx, dword [esp + 0x2c]
mov dword [ecx + 4], ebx
mov ebx, dword [esp + 0x30]
mov dword [ecx + 8], ebx
add eax, edx
add ecx, ebp
cmp eax, edi
jb 0x405154
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x38]
mov eax, 1
shl eax, cl
test ebp, eax
je 0x40518f
xor ebp, eax
shr eax, 1
test ebp, eax
jne 0x405187
mov edx, 1
mov ecx, ebx
shl edx, cl
xor ebp, eax
mov dword [esp + 0x20], ebp
dec edx
and edx, ebp
cmp edx, dword [esp + esi*4 + 0xd4]
je 0x4051d1
lea ebx, [ebx]
sub ebx, dword [esp + esi*4 + 0x90]
dec esi
mov eax, 1
mov ecx, ebx
shl eax, cl
dec eax
and eax, ebp
cmp eax, dword [esp + esi*4 + 0xd4]
jne 0x4051b0
mov dword [esp + 0x14], ebx
cmp dword [esp + 0x1c], 0
mov ecx, dword [esp + 0x10]
jne 0x404f50
mov eax, dword [esp + 0x34]
add dword [esp + 0x24], 4
inc dword [esp + 0x38]
inc ecx
cmp ecx, eax
mov dword [esp + 0x10], ecx
jle 0x404f36
cmp dword [esp + 0x48], 0
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x5f0]
mov dword [edx], ecx
je 0x405236
cmp eax, 1
je 0x405236
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x5c8
ret
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x5c8
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x5c8
ret