Function at 0x10004380
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
test ebx, ebx
jne 0x10004392
mov eax, 0x57
pop ebx
pop ecx
ret
cmp dword [ebx], 0
je 0x1000438a
cmp dword [ebx + 4], 0
je 0x1000438a
cmp byte [ebx + 8], 0
lea edx, [ebx + 8]
je 0x1000438a
cmp byte [ebx + 0x28], 0
lea ecx, [ebx + 0x28]
je 0x1000438a
push edi
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x100043bf
lea eax, [edi + 0x57]
pop edi
pop ebx
pop ecx
ret
push ebp
mov ebp, dword [esp + 0x1c]
cmp ebp, 8
ja 0x100043d3
pop ebp
pop edi
mov eax, 0x57
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x20]
test eax, eax
je 0x100043e1
mov dword [eax], 0
imul eax, ebx, 0xe368
cmp byte [edx], 0
push esi
mov esi, 8
mov dword [esp + 0x10], eax
je 0x10004438
mov ecx, edx
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100043f8
sub cl, dl
dec cl
cmp cl, 0x20
jae 0x10004435
cmp cl, 0x1f
jae 0x1000440f
inc cl
movzx esi, cl
lea eax, [esi + 0xa]
cmp eax, ebp
jae 0x100046ec
push esi
push edx
lea eax, [edi + 0xa]
mov byte [edi + 8], 1
push eax
mov byte [edi + 9], cl
call fcn.10005ad0
add esp, 0xc
add esi, 0xa
lea ecx, [ebx + 0x28]
cmp dword [ebx], 0
je 0x10004457
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100046ec
mov word [esi + edi], 0x402
mov eax, dword [ebx]
mov dword [esi + edi + 2], eax
add esi, 6
cmp dword [ebx + 4], 0
je 0x10004478
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100046ec
mov word [esi + edi], 0x403
mov eax, dword [ebx + 4]
mov dword [esi + edi + 2], eax
add esi, 6
cmp byte [ecx], 0
je 0x100044ce
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004480
lea eax, [ebx + 0x28]
sub cl, al
dec cl
cmp cl, 0x20
jae 0x100044ce
cmp cl, 0x1f
jae 0x1000449a
inc cl
movzx edx, cl
lea eax, [esi + 2]
add eax, edx
mov dword [esp + 0x18], edx
cmp eax, ebp
jae 0x100046ec
mov byte [esi + edi], 4
lea eax, [ebx + 0x28]
mov byte [esi + edi + 1], cl
add esi, 2
push edx
push eax
lea eax, [esi + edi]
push eax
call fcn.10005ad0
add esp, 0xc
add esi, dword [esp + 0x18]
cmp dword [ebx + 0x48], 0
je 0x100044ef
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100046ec
mov word [esi + edi], 0x405
mov eax, dword [ebx + 0x48]
mov dword [esi + edi + 2], eax
add esi, 6
cmp dword [ebx + 0x4c], 0
je 0x10004510
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100046ec
mov word [esi + edi], 0x407
mov eax, dword [ebx + 0x4c]
mov dword [esi + edi + 2], eax
add esi, 6
cmp word [ebx + 0x50], 0
je 0x10004534
lea eax, [esi + 4]
cmp eax, ebp
jae 0x100046ec
mov word [esi + edi], 0x206
mov ax, word [ebx + 0x50]
mov word [esi + edi + 2], ax
add esi, 4
cmp word [ebx + 0x52], 0
je 0x10004558
lea eax, [esi + 4]
cmp eax, ebp
jae 0x100046ec
mov word [esi + edi], 0x208
mov ax, word [ebx + 0x52]
mov word [esi + edi + 2], ax
add esi, 4
cmp dword [ebx + 0x54], 0
je 0x10004579
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100046ec
mov word [esi + edi], 0x409
mov eax, dword [ebx + 0x54]
mov dword [esi + edi + 2], eax
add esi, 6
cmp dword [ebx + 0x58], 0
je 0x1000459a
lea eax, [esi + 6]
cmp eax, ebp
jae 0x100046ec
mov word [esi + edi], 0x40a
mov eax, dword [ebx + 0x58]
mov dword [esi + edi + 2], eax
add esi, 6
cmp word [ebx + 0x5c], 0
lea edx, [ebx + 0x5c]
je 0x100045f9
mov ecx, edx
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100045a6
sub ecx, edx
sar ecx, 1
dec cl
cmp cl, 0x20
jae 0x100045f9
cmp cl, 0x1f
jae 0x100045c3
inc cl
add cl, cl
movzx eax, cl
mov dword [esp + 0x18], eax
add eax, 2
add eax, esi
cmp eax, ebp
jae 0x100046ec
push dword [esp + 0x18]
mov byte [esi + edi], 0xb
mov byte [esi + edi + 1], cl
add esi, 2
push edx
lea eax, [esi + edi]
push eax
call fcn.10005ad0
add esp, 0xc
add esi, dword [esp + 0x18]
cmp word [ebx + 0x9c], 0
lea edx, [ebx + 0x9c]
je 0x10004663
mov ecx, edx
jmp 0x10004610
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004610
sub ecx, edx
sar ecx, 1
dec cl
cmp cl, 0x20
jae 0x10004663
cmp cl, 0x1f
jae 0x1000462d
inc cl
add cl, cl
movzx eax, cl
mov dword [esp + 0x18], eax
add eax, 2
add eax, esi
cmp eax, ebp
jae 0x100046ec
push dword [esp + 0x18]
mov byte [esi + edi], 0xc
mov byte [esi + edi + 1], cl
add esi, 2
push edx
lea eax, [esi + edi]
push eax
call fcn.10005ad0
add esp, 0xc
add esi, dword [esp + 0x18]
cmp byte [ebx + 0xdc], 0
lea edx, [ebx + 0xdc]
je 0x100046ba
mov ecx, edx
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10004674
sub cl, dl
dec cl
cmp cl, 0x30
jae 0x100046ba
cmp cl, 0x2f
jae 0x1000468b
inc cl
movzx eax, cl
mov dword [esp + 0x18], eax
add eax, 2
add eax, esi
cmp eax, ebp
jae 0x100046ec
mov ebp, dword [esp + 0x18]
mov byte [esi + edi], 0xd
mov byte [esi + edi + 1], cl
add esi, 2
push ebp
push edx
lea eax, [esi + edi]
push eax
call fcn.10005ad0
add esp, 0xc
add esi, ebp
add ebx, 0x10c
cmp byte [ebx], 0
je 0x10004712
mov ecx, ebx
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100046c7
sub cl, bl
dec cl
cmp cl, 0x30
jae 0x10004712
cmp cl, 0x2f
jae 0x100046de
inc cl
movzx ebp, cl
lea eax, [ebp + 2]
add eax, esi
cmp eax, dword [esp + 0x20]
jb 0x100046f7
pop esi
pop ebp
pop edi
mov eax, 0x7a
pop ebx
pop ecx
ret
mov byte [esi + edi], 0xe
mov byte [esi + edi + 1], cl
add esi, 2
push ebp
push ebx
lea eax, [esi + edi]
push eax
call fcn.10005ad0
add esp, 0xc
add esi, ebp
lea ebx, [esi + 3]
xor ecx, ecx
and ebx, 0xfffffffc
xor edx, edx
mov dword [esp + 0x18], ebx
lea esi, [ebx - 8]
mov al, byte [edx + edi + 8]
test al, al
je 0x1000472f
add ecx, ecx
jmp 0x10004730
inc ecx
movzx eax, al
inc edx
add ecx, eax
cmp edx, esi
jbe 0x10004723
or eax, 0xffffffff
lea ebp, [ebx - 4]
test ecx, ecx
lea edx, [edi + 4]
cmove ecx, eax
mov eax, dword [esp + 0x10]
mov dword [edx], ecx
mov esi, eax
cmp ebp, 4
jb 0x1000477e
mov ebx, 4
mov ecx, 0x8790ea3
sub ebx, edx
xor esi, ecx
lea edx, [edx + 4]
xor dword [edx - 4], esi
lea eax, [ebx + edx]
add ecx, 0x3a6cd4
cmp eax, ebp
jbe 0x10004761
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
xor eax, 0xe9b35
mov dword [edi], eax
mov eax, dword [esp + 0x24]
test eax, eax
je 0x1000478f
mov dword [eax], ebx
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
pop ecx
ret