Function at 0x41d640
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x594
mov eax, dword [0x544354]
xor eax, esp
mov dword [esp + 0x590], eax
push ebx
mov ebx, dword [esp + 0x5b0]
lea eax, [esp + 0x4c]
push ebp
mov ebp, dword [esp + 0x5b8]
push esi
mov esi, dword [esp + 0x5a4]
push edi
mov edi, dword [esp + 0x5ac]
push 0x44
push 0
push eax
mov dword [esp + 0x50], ebx
call fcn.004fa860
add esp, 0xc
mov ecx, esi
mov edx, edi
lea ecx, [ecx]
mov eax, dword [ecx]
lea ecx, [ecx + 4]
inc dword [esp + eax*4 + 0x58]
sub edx, 1
jne 0x41d690
cmp dword [esp + 0x58], edi
jne 0x41d6f5
push 0x18
call fcn.004fe8be
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x41daf5
lea eax, [ecx + 8]
mov word [ecx + 0x10], 0x163
mov byte [eax], 0x63
mov byte [ecx + 9], 1
mov dword [ecx + 4], 0
mov dword [ebx], eax
mov dword [ebp], 1
xor eax, eax
mov ecx, dword [esp + 0x5a0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004f833c
add esp, 0x594
ret 0x1c
mov ebx, dword [ebp]
mov ecx, 1
mov dword [esp + 0x14], ebx
cmp dword [esp + ecx*4 + 0x58], 0
jne 0x41d70e
inc ecx
cmp ecx, 0x10
jbe 0x41d701
mov dword [esp + 0x10], ecx
cmp ebx, ecx
jae 0x41d71c
mov ebx, ecx
mov dword [esp + 0x14], ebx
mov edx, 0x10
cmp dword [esp + edx*4 + 0x58], 0
jne 0x41d72d
sub edx, 1
jne 0x41d721
mov dword [esp + 0x24], edx
cmp ebx, edx
jbe 0x41d73b
mov ebx, edx
mov dword [esp + 0x14], ebx
mov eax, 1
mov dword [ebp], ebx
shl eax, cl
mov dword [esp + 0x28], eax
cmp ecx, edx
jae 0x41d765
lea ecx, [ecx]
sub eax, dword [esp + ecx*4 + 0x58]
js 0x41d985
inc ecx
add eax, eax
mov dword [esp + 0x28], eax
cmp ecx, edx
jb 0x41d750
mov ecx, dword [esp + 0x28]
lea ebp, [edx*4]
mov eax, dword [esp + ebp + 0x58]
sub ecx, eax
mov dword [esp + 0x28], ecx
js 0x41d985
add eax, ecx
xor ecx, ecx
mov dword [esp + ebp + 0x58], eax
mov dword [esp + 0xa0], ecx
sub edx, 1
je 0x41d7b3
xor eax, eax
jmp 0x41d7a0
add ecx, dword [esp + eax + 0x5c]
lea eax, [eax + 4]
mov dword [esp + eax + 0xa0], ecx
sub edx, 1
jne 0x41d7a0
xor ecx, ecx
mov edx, dword [esi]
lea esi, [esi + 4]
test edx, edx
je 0x41d7d4
mov eax, dword [esp + edx*4 + 0x9c]
mov dword [esp + eax*4 + 0x120], ecx
inc eax
mov dword [esp + edx*4 + 0x9c], eax
inc ecx
cmp ecx, edi
jb 0x41d7b5
mov eax, dword [esp + ebp + 0x9c]
xor edi, edi
mov ecx, dword [esp + 0x24]
mov edx, ebx
mov dword [esp + 0x54], eax
or ebp, 0xffffffff
lea eax, [esp + 0x120]
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], eax
neg edx
mov eax, dword [esp + 0x10]
xor esi, esi
mov dword [esp + 0x9c], edi
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x1c], edx
mov dword [esp + 0xe0], edi
mov dword [esp + 0x4c], edi
cmp eax, ecx
jg 0x41dab2
lea ecx, [esp + 0x58]
lea ecx, [ecx + eax*4]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x20]
nop
mov ecx, dword [ecx]
test ecx, ecx
je 0x41da94
lea ebx, [ebx]
mov dword [esp + 0x40], ecx
lea eax, [edx + ebx]
dec ecx
mov dword [esp + 0x50], ecx
cmp dword [esp + 0x10], eax
jle 0x41d95e
sub edx, ebx
mov ecx, edx
lea ebx, [ebx]
mov esi, dword [esp + 0x24]
inc ebp
add ecx, ebx
mov dword [esp + 0x3c], ebp
sub esi, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x48], ecx
cmp esi, ebx
jbe 0x41d88b
mov esi, ebx
mov ebx, dword [esp + 0x10]
sub ebx, eax
mov eax, 1
mov ecx, ebx
shl eax, cl
cmp eax, dword [esp + 0x40]
jbe 0x41d8c9
mov edx, dword [esp + 0x20]
or ecx, 0xffffffff
sub ecx, dword [esp + 0x50]
add eax, ecx
cmp ebx, esi
jae 0x41d8c9
inc ebx
cmp ebx, esi
jae 0x41d8c9
mov ecx, dword [edx + 4]
lea edx, [edx + 4]
add eax, eax
cmp eax, ecx
jbe 0x41d8c9
inc ebx
sub eax, ecx
cmp ebx, esi
jb 0x41d8b6
mov ecx, ebx
mov esi, 1
shl esi, cl
lea eax, [esi*8 + 8]
push eax
call fcn.004fe8be
add esp, 4
test eax, eax
je 0x41dad0
mov edx, dword [esp + 0x44]
lea ecx, [eax + 8]
add eax, 4
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x44], eax
mov dword [esp + ebp*4 + 0xe0], ecx
mov dword [edx], ecx
mov dword [eax], 0
test ebp, ebp
je 0x41d945
mov eax, dword [esp + 0x14]
add bl, 0x10
mov byte [esp + 0x2c], bl
mov edx, edi
mov ebx, ecx
mov byte [esp + 0x2d], al
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x2c]
shr edx, cl
mov ecx, dword [esp + ebp*4 + 0xdc]
mov dword [esp + ebp*4 + 0x9c], edi
mov dword [esp + 0x18], ebx
mov dword [ecx + edx*8], eax
mov dword [ecx + edx*8 + 4], ebx
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x48]
lea eax, [edx + ebx]
cmp dword [esp + 0x10], eax
jg 0x41d870
mov al, byte [esp + 0x10]
lea edi, [esp + 0x120]
sub al, dl
mov byte [esp + 0x2d], al
mov eax, dword [esp + 0x54]
lea eax, [edi + eax*4]
mov edi, dword [esp + 0x34]
cmp edi, eax
jb 0x41d98f
mov byte [esp + 0x2c], 0x63
jmp 0x41d9dd
mov eax, 2
jmp 0x41d6da
mov ecx, dword [edi]
cmp ecx, dword [esp + 0x5b0]
jae 0x41d9af
cmp ecx, 0x100
mov dword [esp + 0x18], ecx
setb al
add al, 0xf
mov byte [esp + 0x2c], al
jmp 0x41d9d6
mov eax, dword [esp + 0x5b8]
test eax, eax
je 0x41d9dd
sub ecx, dword [esp + 0x5b0]
mov al, byte [eax + ecx*4]
mov byte [esp + 0x2c], al
mov eax, dword [esp + 0x5b4]
mov eax, dword [eax + ecx*4]
mov dword [esp + 0x18], eax
add edi, 4
mov dword [esp + 0x34], edi
mov ecx, dword [esp + 0x10]
mov edi, 1
mov eax, dword [esp + 0x38]
sub ecx, edx
shl edi, cl
mov ecx, edx
shr eax, cl
cmp eax, esi
jae 0x41da2b
mov ebx, dword [esp + 0x2c]
lea ecx, [edi*8]
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x4c]
lea ecx, [ecx + eax*8]
mov dword [ecx], ebx
add eax, edi
mov dword [ecx + 4], ebp
add ecx, dword [esp + 0x40]
cmp eax, esi
jb 0x41da10
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x3c]
mov ecx, dword [esp + 0x10]
mov eax, 1
mov edi, dword [esp + 0x38]
lea ecx, [ecx - 1]
shl eax, cl
test edi, eax
je 0x41da49
xor edi, eax
shr eax, 1
test edi, eax
jne 0x41da41
xor edi, eax
mov ecx, edx
mov eax, 1
mov dword [esp + 0x38], edi
shl eax, cl
dec eax
and eax, edi
cmp eax, dword [esp + ebp*4 + 0x9c]
je 0x41da84
sub edx, ebx
mov eax, 1
mov ecx, edx
dec ebp
shl eax, cl
dec eax
and eax, edi
cmp eax, dword [esp + ebp*4 + 0x9c]
jne 0x41da64
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x1c], edx
mov ecx, dword [esp + 0x50]
test ecx, ecx
jne 0x41d850
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
inc eax
add ecx, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], ecx
cmp eax, dword [esp + 0x24]
jle 0x41d840
mov ecx, dword [esp + 0x24]
cmp dword [esp + 0x28], 0
je 0x41d6d8
cmp ecx, 1
je 0x41d6d8
mov eax, 1
jmp 0x41d6da
test ebp, ebp
je 0x41daf5
mov eax, dword [esp + 0xe0]
test eax, eax
je 0x41daf5
nop
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.004fe8b9
add esp, 4
mov eax, esi
test esi, esi
jne 0x41dae0
mov eax, 3
jmp 0x41d6da