Function at 0x403880
Capabilities:
Encode data using xor

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x59c
mov eax, dword [esp + 0x5c4]
lea edx, [esp + 8]
mov dword [esp], edx
mov dword [esp + 0x570], eax
mov dword [esp + 4], 0x44
call fcn.00403830
mov eax, dword [esp + 0x5b0]
mov edx, dword [esp + 0x5b4]
mov ebx, dword [esp + 0x5c8]
mov ecx, dword [eax]
add eax, 4
inc dword [esp + ecx*4 + 8]
dec edx
jne 0x4038c1
mov eax, dword [esp + 8]
mov edx, dword [esp + 0x5b4]
cmp eax, edx
jne 0x4038f6
mov eax, dword [esp + 0x570]
xor edx, edx
mov dword [eax], edx
mov dword [ebx], edx
xor eax, eax
add esp, 0x59c
pop ebx
pop ebp
pop esi
pop edi
ret
mov edx, 1
mov edi, dword [ebx]
mov ecx, edx
nop
mov eax, dword [esp + ecx*4 + 8]
test eax, eax
jne 0x403f9c
inc ecx
cmp ecx, 0x10
ja 0x403f9c
mov eax, dword [esp + ecx*4 + 8]
test eax, eax
jne 0x403f9c
inc ecx
cmp ecx, 0x10
ja 0x403f9c
mov eax, dword [esp + ecx*4 + 8]
test eax, eax
jne 0x403f9c
inc ecx
cmp ecx, 0x10
jbe 0x403900
mov edx, ecx
mov esi, edx
cmp edx, edi
mov dword [esp + 0x568], esi
jbe 0x40394f
mov edi, esi
mov eax, 0x10
mov dword [esp + 0x588], edx
nop
lea esi, [esi]
mov edx, dword [esp + eax*4 + 8]
test edx, edx
jne 0x403f90
dec eax
jne 0x403960
mov edx, dword [esp + 0x588]
mov dword [esp + 0x558], eax
cmp eax, edi
jae 0x403983
mov edi, eax
mov ecx, 1
mov dword [ebx], edi
mov ebx, ecx
mov ecx, edx
shl ebx, cl
cmp edx, eax
jae 0x4039ba
mov ecx, edx
lea esi, [esi]
lea edi, [edi]
mov edx, dword [esp + ecx*4 + 8]
mov ebp, edx
mov edx, ebx
sub edx, ebp
test edx, edx
jl 0x403fb3
lea ebx, [edx + edx]
inc ecx
cmp ecx, eax
jb 0x4039a0
mov edx, dword [esp + eax*4 + 8]
mov ebp, ebx
sub ebp, edx
test ebp, ebp
jl 0x403fa3
lea ecx, [esp + 0x4c]
lea ebx, [esp + 8]
add ecx, 8
add ebx, 4
add edx, ebp
mov dword [esp + 0x588], ebx
xor ebx, ebx
mov dword [esp + eax*4 + 8], edx
dec eax
mov dword [esp + 0x50], 0
mov edx, eax
je 0x403a19
mov dword [esp + 0x58c], ebp
mov eax, dword [esp + 0x588]
add ebx, dword [eax]
mov ebp, ecx
add ecx, 4
add eax, 4
dec edx
mov dword [ebp], ebx
jne 0x403a02
mov ebp, dword [esp + 0x58c]
mov edx, dword [esp + 0x5b0]
xor ecx, ecx
mov dword [esp + 0x574], esi
mov esi, dword [esp + 0x5b4]
mov dword [esp + 0x58c], ebp
mov esi, esi
lea edi, [edi]
mov eax, dword [edx]
add edx, 4
test eax, eax
je 0x403a5f
mov ebx, dword [esp + eax*4 + 0x4c]
mov ebp, 1
add ebp, ebx
mov dword [esp + eax*4 + 0x4c], ebp
mov dword [esp + ebx*4 + 0x90], ecx
inc ecx
cmp ecx, esi
jb 0x403a40
lea eax, [esp + 0x90]
mov esi, dword [esp + 0x574]
mov dword [esp + 0x580], eax
mov ebx, edi
neg ebx
mov eax, dword [esp + 0x558]
xor edx, edx
mov ecx, 0xffffffff
mov dword [esp + 0x588], edx
mov dword [esp + 0x584], edx
mov dword [esp + 0x510], edx
mov dword [esp + 0x4c], edx
mov edx, esi
xor esi, esi
cmp edx, eax
mov dword [esp + 0x57c], ecx
mov ebp, dword [esp + 0x58c]
jg 0x403e57
mov dword [esp + 0x56c], edi
mov dword [esp + 0x58c], ebp
mov ebp, ebx
mov ebx, dword [esp + 0x568]
mov eax, dword [esp + ebx*4 + 8]
mov edx, 0xffffffff
add edx, eax
test eax, eax
mov dword [esp + 0x55c], edx
je 0x403e40
mov dword [esp + 0x568], ebx
mov eax, dword [esp + 0x56c]
mov edx, dword [esp + 0x568]
add eax, ebp
cmp edx, eax
jle 0x403f7a
mov eax, dword [esp + 0x56c]
mov dword [esp + 0x554], esi
mov dword [esp + 0x560], eax
mov eax, dword [esp + 0x56c]
mov edx, dword [esp + 0x558]
add ebp, eax
mov eax, dword [esp + 0x57c]
mov ecx, dword [esp + 0x560]
inc eax
mov dword [esp + 0x57c], eax
mov eax, edx
sub eax, ebp
cmp eax, ecx
jbe 0x403b60
mov esi, ecx
jmp 0x403b62
mov esi, eax
mov ecx, dword [esp + 0x568]
mov eax, 1
sub ecx, ebp
mov edx, dword [esp + 0x55c]
mov dword [esp + 0x574], ecx
inc edx
mov edi, ecx
shl eax, cl
cmp eax, edx
jbe 0x403bd7
mov edx, dword [esp + 0x55c]
inc edx
inc edi
mov ecx, eax
sub ecx, edx
cmp edi, esi
mov eax, dword [esp + 0x568]
lea edx, [esp + eax*4 + 8]
jae 0x403bd7
mov dword [esp + 0x578], ebp
mov eax, edx
mov ebx, edi
mov esi, esi
lea edx, [ecx + ecx]
mov ecx, dword [eax + 4]
add eax, 4
cmp edx, ecx
jbe 0x403e7c
mov ecx, dword [eax]
inc ebx
mov ebp, ecx
mov ecx, edx
sub ecx, ebp
cmp ebx, esi
jb 0x403bb0
mov edi, ebx
mov ebp, dword [esp + 0x578]
mov esi, 1
mov ecx, edi
shl esi, cl
lea eax, [esi*8 + 8]
mov dword [esp], eax
call fcn.004024c0
test eax, eax
je 0x403f50
mov edx, dword [esp + 0x570]
lea ecx, [eax + 8]
mov ebx, dword [esp + 0x57c]
mov dword [edx], ecx
mov dword [eax + 4], 0
lea edx, [eax + 4]
add eax, 8
mov dword [esp + 0x570], edx
mov edx, eax
mov dword [esp + ebx*4 + 0x510], eax
test ebx, ebx
je 0x403cb3
mov ecx, dword [esp + 0x56c]
mov ebx, dword [esp + 0x564]
add edi, 0x10
and ebx, 0xffff00ff
mov dword [esp + 0x550], eax
mov dword [esp + 0x590], edx
movzx edx, cl
shl edx, 8
and edx, 0xff00
or ebx, edx
mov edx, edi
movzx edx, dl
and ebx, 0xffffff00
mov edi, dword [esp + 0x554]
or ebx, edx
mov edx, dword [esp + 0x57c]
mov dword [esp + 0x564], ebx
mov dword [esp + edx*4 + 0x4c], edi
mov edx, dword [esp + edx*4 + 0x50c]
mov dword [esp + 0x594], esi
mov esi, ebp
sub esi, ecx
mov ecx, esi
shr edi, cl
mov dword [edx + edi*8], ebx
mov dword [edx + edi*8 + 4], eax
mov esi, dword [esp + 0x594]
mov edx, dword [esp + 0x590]
mov eax, dword [esp + 0x56c]
mov ecx, dword [esp + 0x568]
add eax, ebp
cmp ecx, eax
jg 0x403b23
mov dword [esp + 0x584], edx
mov dword [esp + 0x588], esi
mov esi, dword [esp + 0x554]
mov eax, dword [esp + 0x574]
mov edx, dword [esp + 0x564]
movzx eax, al
and edx, 0xffff00ff
shl eax, 8
mov ecx, dword [esp + 0x5b4]
and eax, 0xff00
lea ecx, [esp + ecx*4 + 0x90]
or eax, edx
mov edx, dword [esp + 0x580]
cmp edx, ecx
jb 0x403e90
and eax, 0xffffff00
or eax, 0x63
mov dword [esp + 0x564], eax
mov ecx, dword [esp + 0x574]
mov edi, 1
mov eax, dword [esp + 0x588]
shl edi, cl
mov ecx, ebp
mov edx, esi
shr edx, cl
mov ecx, eax
mov eax, edx
cmp eax, ecx
jae 0x403dba
mov dword [esp + 0x578], ebp
mov ebx, dword [esp + 0x564]
mov dword [esp + 0x554], esi
mov ebp, ecx
mov ecx, edi
mov esi, dword [esp + 0x550]
mov edx, dword [esp + 0x584]
mov esi, esi
lea edi, [edi]
lea edi, [eax + ecx]
mov dword [edx + eax*8], ebx
mov dword [edx + eax*8 + 4], esi
mov eax, edi
cmp eax, ebp
jb 0x403d80
mov dword [esp + 0x584], edx
mov dword [esp + 0x550], esi
mov dword [esp + 0x588], ebp
mov esi, dword [esp + 0x554]
mov dword [esp + 0x564], ebx
mov ebp, dword [esp + 0x578]
mov ecx, dword [esp + 0x568]
mov eax, 1
dec ecx
shl eax, cl
test eax, esi
je 0x403dd8
lea esi, [esi]
xor esi, eax
shr eax, 1
test esi, eax
jne 0x403dd0
mov edx, 1
mov ecx, ebp
xor esi, eax
mov eax, dword [esp + 0x57c]
shl edx, cl
mov eax, dword [esp + eax*4 + 0x4c]
dec edx
and edx, esi
cmp edx, eax
je 0x403e21
mov edi, dword [esp + 0x56c]
mov ebx, dword [esp + 0x57c]
sub ebp, edi
mov eax, 1
mov ecx, ebp
dec ebx
shl eax, cl
mov edx, dword [esp + ebx*4 + 0x4c]
dec eax
and eax, esi
cmp eax, edx
jne 0x403e03
mov dword [esp + 0x57c], ebx
mov eax, dword [esp + 0x55c]
dec eax
mov dword [esp + 0x55c], eax
cmp eax, 0xffffffff
jne 0x403af6
mov ebx, dword [esp + 0x568]
inc ebx
mov eax, dword [esp + 0x558]
cmp ebx, eax
jle 0x403ad5
mov ebp, dword [esp + 0x58c]
test ebp, ebp
je 0x403e6f
test eax, eax
je 0x403e6f
add esp, 0x59c
mov eax, 0xfffffffc
pop ebx
pop ebp
pop esi
pop edi
ret
add esp, 0x59c
xor eax, eax
pop ebx
pop ebp
pop esi
pop edi
ret
mov edi, ebx
mov ebp, dword [esp + 0x578]
jmp 0x403bd7
mov ecx, dword [esp + 0x5b8]
mov ebx, ecx
mov ecx, dword [edx]
cmp ecx, ebx
jae 0x403ef0
cmp ecx, 0x100
jae 0x403eb0
mov ecx, 0x10
jmp 0x403eb5
mov ecx, 0xf
mov ebx, dword [esp + 0x550]
movzx edi, word [edx]
and ebx, 0xffff0000
and eax, 0xffffff00
movzx ecx, cl
add edx, 4
or eax, ecx
mov dword [esp + 0x580], edx
mov dword [esp + 0x564], eax
or ebx, edi
mov dword [esp + 0x550], ebx
jmp 0x403d2d
mov edi, dword [edx]
add ebx, ebx
add edi, edi
add ecx, ecx
sub edi, ebx
sub ecx, ebx
mov ebx, dword [esp + 0x5bc]
and eax, 0xffffff00
movzx ebx, word [ebx + edi]
mov edi, dword [esp + 0x550]
add edx, 4
and edi, 0xffff0000
mov dword [esp + 0x580], edx
mov edx, dword [esp + 0x5c0]
or edi, ebx
movzx edx, word [edx + ecx]
mov dword [esp + 0x550], edi
movzx edx, dl
or eax, edx
mov dword [esp + 0x564], eax
jmp 0x403d2d
mov eax, dword [esp + 0x57c]
test eax, eax
je 0x403f6a
mov eax, dword [esp + 0x510]
mov dword [esp], eax
call fcn.00403fd0
add esp, 0x59c
mov eax, 0xfffffffa
pop ebx
pop ebp
pop esi
pop edi
ret
mov eax, edx
sub eax, ebp
mov dword [esp + 0x574], eax
jmp 0x403ce0
mov edx, dword [esp + 0x588]
jmp 0x403976
mov edx, ecx
jmp 0x403940
add esp, 0x59c
mov eax, 0xfffffffb
pop ebx
pop ebp
pop esi
pop edi
ret
add esp, 0x59c
mov eax, 0xfffffffb
pop ebx
pop ebp
pop esi
pop edi
ret