Function at 0x401c00
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x268
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x24], eax
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
mov dword [esp + 0x2c], 0
mov edi, esi
jmp 0x401c3d
mov esi, eax
mov eax, ebx
movzx eax, byte [ebx]
mov edi, esi
mov byte [esi], al
inc esi
inc ebx
mov dword [esp + 0x20], edi
mov eax, ebx
test al, 3
je 0x401c50
mov eax, ebx
movzx eax, byte [ebx]
jmp 0x401c70
mov eax, ebx
mov eax, dword [ebx]
mov edx, eax
not edx
and edx, 0x80808080
mov ecx, eax
xor ecx, 0x25252525
add ecx, 0xfefefeff
test ecx, edx
je 0x401cae
cmp al, 0x25
je 0x401d04
test al, al
mov edi, dword [esp + 0x20]
je 0x4042cb
cmp dword [ebp + 8], 0
je 0x401c39
mov ecx, esi
sub ecx, edi
cmp ecx, 0x1ff
jl 0x401c39
add dword [esp + 0x2c], ecx
push ecx
push dword [ebp + 0xc]
push edi
call dword [ebp + 8]
add esp, 0xc
test eax, eax
jne 0x401c30
jmp 0x4042ee
mov ecx, dword [esp + 0x20]
sub ecx, esi
add ecx, 0x200
jmp 0x401cea
mov dword [esi], eax
add esi, 4
mov eax, dword [ebx + 4]
add ebx, 4
mov edx, eax
not edx
and edx, 0x80808080
mov edi, eax
xor edi, 0x25252525
add edi, 0xfefefeff
add ecx, 0xfffffffc
test edi, edx
jne 0x401c70
lea edi, [eax - 0x1010101]
test edx, edi
jne 0x401c78
cmp dword [ebp + 8], 0
je 0x401cc0
cmp ecx, 4
jge 0x401cc0
jmp 0x401c70
mov ecx, ebx
add ecx, 2
xor ebx, ebx
jmp 0x401d15
movzx eax, byte [ecx - 1]
lea edx, [eax - 0x20]
cmp edx, 0x3f
ja 0x401d91
jmp dword [edx*4 + 0x59c564]
dec ecx
mov edi, dword [esp + 0x20]
mov dword [esp + 8], ebx
cmp al, 0x2a
jne 0x401db2
mov eax, dword [esp + 0x24]
mov ebx, dword [eax]
add eax, 4
mov dword [esp + 0x24], eax
movzx eax, byte [ecx + 1]
inc ecx
jmp 0x401ddb
mov edx, eax
add dl, 0xd0
xor ebx, ebx
cmp dl, 9
ja 0x401ddb
xor ebx, ebx
movzx eax, al
lea edx, [ebx + ebx*4]
lea ebx, [eax + edx*2]
add ebx, 0xffffffd0
movzx eax, byte [ecx + 1]
inc ecx
mov edx, eax
add dl, 0xd0
cmp dl, 0xa
jb 0x401dc0
mov dword [esp + 4], 0xffffffff
cmp al, 0x2e
mov dword [esp + 0x3c], ebx
jne 0x401e67
movzx eax, byte [ecx + 1]
cmp al, 0x2a
jne 0x401e0d
mov eax, dword [esp + 0x24]
mov edx, dword [eax]
mov dword [esp + 4], edx
add eax, 4
mov dword [esp + 0x24], eax
movzx eax, byte [ecx + 2]
add ecx, 2
jmp 0x401e67
inc ecx
mov edx, eax
add dl, 0xd0
mov dword [esp + 4], 0
cmp dl, 9
ja 0x401e67
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, ebx
and edx, 0xfffffff5
mov edi, ebx
and edi, 0xa
or ebx, 0xa
imul ebx, edi
xor edi, 0xa
imul edi, edx
add ebx, edi
movzx eax, al
add ebx, eax
add ebx, 0xffffffd0
movzx eax, byte [ecx + 1]
inc ecx
mov edx, eax
add dl, 0xd0
cmp dl, 0xa
jb 0x401e30
mov dword [esp + 4], ebx
mov edi, dword [esp + 0x20]
movzx eax, al
add eax, 0xffffffb7
cmp eax, 0x31
ja 0x401e7a
jmp dword [eax*4 + 0x59c664]
movzx edx, byte [ecx]
mov dword [esp + 0x4c], ecx
movzx eax, dl
add eax, 0xffffffbf
cmp eax, 0x37
ja 0x40280e
jmp dword [eax*4 + 0x59c72c]
mov byte [esp + 0x263], dl
mov dword [esp + 0x1c], 1
mov byte [esp + 0x44], 0
mov byte [esp + 0x34], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0xc], 0
lea eax, [esp + 0x263]
mov dword [esp], eax
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
xor ecx, ecx
mov dword [esp + 0x3c], 0
jmp 0x40374f
mov ebx, dword [esp + 0x1c]
cmp ecx, ebx
jg 0x403759
mov ecx, ebx
movsx eax, byte [esp + 0x44]
movsx edi, byte [esp + 0x34]
mov edx, dword [esp + 0x10]
mov dword [esp + 4], ecx
add edx, ecx
add edx, eax
add edx, edi
mov edi, dword [esp + 0x3c]
cmp edi, edx
jg 0x40377b
mov edi, edx
sub edi, edx
mov dword [esp + 0x3c], edi
sub dword [esp + 4], ebx
mov ecx, dword [esp + 8]
test cl, 1
mov edi, dword [esp + 0x20]
jne 0x4037bb
test cl, 0x10
jne 0x4037a1
mov dword [esp + 8], 0
jmp 0x4037bb
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 4]
cmp ecx, edx
jg 0x4037af
mov ecx, edx
mov dword [esp + 4], ecx
mov dword [esp + 0x3c], 0
mov edx, dword [esp]
mov ecx, dword [esp + 0x3c]
add ecx, dword [esp + 4]
je 0x403c6c
test byte [esp + 8], 1
jne 0x4038e5
cmp dword [esp + 0x3c], 0
jle 0x4038e5
mov ecx, dword [esp + 0x3c]
jmp 0x4037fe
mov ecx, dword [esp + 0x3c]
sub ecx, ebx
test ecx, ecx
jle 0x4038dc
mov eax, edi
sub eax, esi
add eax, 0x200
mov ebx, ecx
cmp ecx, eax
jl 0x40380f
mov ebx, eax
cmp dword [ebp + 8], 0
jne 0x403817
mov ebx, ecx
mov dword [esp + 0x3c], ecx
test ebx, ebx
mov dword [esp + 0x20], edi
je 0x403860
mov eax, esi
and eax, 3
je 0x403860
mov eax, esi
not eax
and eax, 3
mov dword [esp + 0x18], ebx
lea edi, [ebx - 1]
cmp eax, edi
jb 0x40383e
mov eax, edi
mov ebx, eax
inc eax
push eax
push 0x20
push esi
call fcn.0040d780
add esp, 0xc
sub edi, ebx
add esi, ebx
inc esi
mov ebx, dword [esp + 0x18]
cmp edi, 4
jl 0x40388d
jmp 0x403870
mov edi, ebx
cmp edi, 4
jl 0x40388d
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esi], 0x20202020
add esi, 4
mov eax, edi
not eax
and eax, 4
and edi, 0x7ffffffb
sub edi, eax
cmp edi, 3
jg 0x403870
test edi, edi
je 0x40389f
push edi
push 0x20
push esi
call fcn.0040d780
add esp, 0xc
add esi, edi
mov edi, dword [esp + 0x20]
cmp dword [ebp + 8], 0
je 0x4037f0
mov eax, esi
sub eax, edi
cmp eax, 0x1ff
jl 0x4037f0
add dword [esp + 0x2c], eax
push eax
push dword [ebp + 0xc]
push edi
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x4042ee
mov esi, eax
mov edi, eax
jmp 0x4037f0
mov dword [esp + 0x3c], ecx
movzx eax, byte [esp + 0x44]
lea ecx, [esp + 0x45]
mov dword [esp + 0x14], ecx
jmp 0x4038f5
movzx eax, byte [esp + 0x44]
test al, al
je 0x403a1d
movsx edx, al
mov ebx, edi
sub ebx, esi
add ebx, 0x200
cmp ebx, edx
jl 0x403910
mov ebx, edx
cmp dword [ebp + 8], 0
jne 0x403918
mov ebx, edx
sub al, bl
mov byte [esp + 0x44], al
test ebx, ebx
je 0x4039bb
mov eax, ebx
and eax, 3
je 0x403a10
mov dword [esp + 0x20], edi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + 0x14]
lea ecx, [edi + 1]
mov dword [esp + 0x14], ecx
movzx ecx, byte [edi]
mov byte [esi + edx], cl
inc edx
cmp eax, edx
jne 0x403940
add esi, edx
mov eax, ebx
sub eax, edx
mov edi, dword [esp + 0x20]
cmp ebx, 4
jb 0x4039bb
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + 0x14]
lea edx, [ecx + 1]
mov dword [esp + 0x14], edx
movzx ecx, byte [ecx]
mov byte [esi], cl
mov ecx, dword [esp + 0x14]
lea edx, [ecx + 1]
mov dword [esp + 0x14], edx
movzx ecx, byte [ecx]
mov byte [esi + 1], cl
mov ecx, dword [esp + 0x14]
lea edx, [ecx + 1]
mov dword [esp + 0x14], edx
movzx ecx, byte [ecx]
mov byte [esi + 2], cl
mov ecx, dword [esp + 0x14]
lea edx, [ecx + 1]
mov dword [esp + 0x14], edx
movzx ecx, byte [ecx]
mov byte [esi + 3], cl
add esi, 4
add eax, 0xfffffffc
jne 0x403970
cmp dword [ebp + 8], 0
je 0x4038f0
mov eax, esi
sub eax, edi
lea ecx, [eax + 1]
cmp ecx, 0x200
jl 0x4038f0
mov ecx, eax
mov edx, dword [esp + 0x2c]
and ecx, edx
xor edx, eax
lea edx, [edx + ecx*2]
mov dword [esp + 0x2c], edx
push eax
push dword [ebp + 0xc]
push edi
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x4042ee
mov esi, eax
mov edi, eax
jmp 0x4038f0
mov eax, ebx
cmp ebx, 4
jae 0x403970
jmp 0x4039bb
mov dword [esp + 0x20], edi
mov eax, dword [esp + 0xc]
mov ecx, eax
shr ecx, 0x18
mov dword [esp + 0x18], ecx
xor edi, edi
test byte [esp + 8], 0x40
je 0x403a4d
and eax, 0xffffff
add eax, dword [esp + 4]
mov edi, dword [esp + 0x18]
lea ecx, [edi + 1]
xor edx, edx
div ecx
sub edi, edx
cmp dword [esp + 4], 0
jle 0x40429a
mov ebx, dword [esp + 4]
mov edx, dword [esp]
jmp 0x403a80
mov ebx, dword [esp + 4]
sub ebx, dword [esp + 0xc]
test ebx, ebx
jle 0x403c63
mov eax, dword [esp + 0x20]
sub eax, esi
add eax, 0x200
mov ecx, ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 4], ebx
cmp ebx, eax
jl 0x403b00
mov dword [esp + 0xc], eax
cmp dword [ebp + 8], 0
je 0x403b06
test byte [esp + 8], 0x40
jne 0x403b15
cmp dword [esp + 0xc], 0
je 0x403b20
mov eax, esi
and eax, 3
je 0x403b20
mov ecx, esi
not ecx
and ecx, 3
mov eax, dword [esp + 0xc]
lea ebx, [eax - 1]
cmp ecx, ebx
jb 0x403acc
mov ecx, ebx
mov dword [esp + 0x30], ecx
lea eax, [ecx + 1]
push eax
push 0x30
push esi
call fcn.0040d780
add esp, 0xc
mov eax, dword [esp + 0x30]
add esi, eax
inc esi
sub ebx, eax
mov edx, dword [esp]
cmp ebx, 4
jge 0x403b29
jmp 0x403b63
cmp dword [ebp + 8], 0
jne 0x403aa3
mov eax, dword [esp + 4]
mov dword [esp + 0xc], eax
test byte [esp + 8], 0x40
je 0x403aaa
mov ebx, dword [esp + 0xc]
jmp 0x403b63
mov ebx, dword [esp + 0xc]
cmp ebx, 4
jl 0x403b63
mov eax, ebx
cmp ebx, 7
jl 0x403b35
mov eax, 7
neg eax
add eax, ebx
add eax, 3
and eax, 0xfffffffc
mov dword [esp + 0x30], eax
add eax, 4
push eax
push 0x30
push esi
call fcn.0040d780
add esp, 0xc
mov eax, dword [esp + 0x30]
add esi, eax
add esi, 4
sub ebx, eax
add ebx, 0xfffffffc
mov edx, dword [esp]
test ebx, ebx
je 0x403bb0
test bl, 1
jne 0x403b80
mov eax, ebx
cmp ebx, 1
jne 0x403c0e
jmp 0x403bb0
mov al, 0x30
test byte [esp + 8], 0x40
je 0x403b9d
cmp edi, dword [esp + 0x18]
jne 0x403b9c
movzx eax, byte [0x59f001]
xor al, 0xe0
xor edi, edi
jmp 0x403b9d
inc edi
mov byte [esi], al
inc esi
lea eax, [ebx - 1]
cmp ebx, 1
jne 0x403c0e
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [ebp + 8], 0
je 0x403a70
mov eax, esi
mov ecx, dword [esp + 0x20]
sub eax, ecx
cmp eax, 0x1ff
jl 0x403a70
add dword [esp + 0x2c], eax
push eax
push dword [ebp + 0xc]
push ecx
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x4042ee
mov esi, eax
mov dword [esp + 0x20], eax
mov edx, dword [esp]
jmp 0x403a70
mov edx, dword [esp]
mov byte [esi + 1], cl
add esi, 2
add eax, 0xfffffffe
je 0x403bb0
mov cl, 0x30
test byte [esp + 8], 0x40
je 0x403c31
cmp edi, dword [esp + 0x18]
jne 0x403c30
movzx edx, byte [0x59f001]
xor dl, 0xe0
xor edi, edi
jmp 0x403c33
inc edi
mov dl, 0x30
mov byte [esi], dl
test byte [esp + 8], 0x40
je 0x403c00
cmp edi, dword [esp + 0x18]
mov edx, dword [esp]
jne 0x403c60
movzx ecx, byte [0x59f001]
xor cl, 0xe0
xor edi, edi
jmp 0x403c03
inc edi
jmp 0x403c03
movzx eax, byte [esp + 0x44]
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x45]
mov dword [esp + 0x14], ecx
jmp 0x403c8c
mov esi, eax
mov edi, eax
mov edx, dword [esp]
movzx eax, byte [esp + 0x44]
test al, al
je 0x403d8d
movsx edx, al
mov ebx, edi
sub ebx, esi
add ebx, 0x200
cmp ebx, edx
jl 0x403ca7
mov ebx, edx
cmp dword [ebp + 8], 0
jne 0x403caf
mov ebx, edx
sub al, bl
mov byte [esp + 0x44], al
test ebx, ebx
je 0x403d4b
mov eax, ebx
and eax, 3
je 0x403d80
mov dword [esp + 0x20], edi
xor edx, edx
nop
nop
mov edi, dword [esp + 0x14]
lea ecx, [edi + 1]
mov dword [esp + 0x14], ecx
movzx ecx, byte [edi]
mov byte [esi + edx], cl
inc edx
cmp eax, edx
jne 0x403cd0
add esi, edx
mov eax, ebx
sub eax, edx
mov edi, dword [esp + 0x20]
cmp ebx, 4
jb 0x403d4b
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + 0x14]
lea edx, [ecx + 1]
mov dword [esp + 0x14], edx
movzx ecx, byte [ecx]
mov byte [esi], cl
mov ecx, dword [esp + 0x14]
lea edx, [ecx + 1]
mov dword [esp + 0x14], edx
movzx ecx, byte [ecx]
mov byte [esi + 1], cl
mov ecx, dword [esp + 0x14]
lea edx, [ecx + 1]
mov dword [esp + 0x14], edx
movzx ecx, byte [ecx]
mov byte [esi + 2], cl
mov ecx, dword [esp + 0x14]
lea edx, [ecx + 1]
mov dword [esp + 0x14], edx
movzx ecx, byte [ecx]
mov byte [esi + 3], cl
add esi, 4
add eax, 0xfffffffc
jne 0x403d00
cmp dword [ebp + 8], 0
je 0x403c84
mov eax, esi
sub eax, edi
cmp eax, 0x1ff
jl 0x403c84
add dword [esp + 0x2c], eax
push eax
push dword [ebp + 0xc]
push edi
call dword [ebp + 8]
add esp, 0xc
test eax, eax
jne 0x403c80
jmp 0x4042ee
mov eax, ebx
cmp ebx, 4
jae 0x403d00
jmp 0x403d4b
mov dword [esp + 0x20], edi
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x403fe5
mov ecx, dword [esp + 0x10]
test ecx, ecx
mov edi, dword [esp + 0x20]
jne 0x403eed
lea eax, [esp + 0x35]
mov dword [esp + 0x14], eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + 0x34]
test cl, cl
je 0x40417d
movsx edx, cl
mov eax, edi
sub eax, esi
add eax, 0x200
cmp eax, edx
jl 0x403ddf
mov eax, edx
cmp dword [ebp + 8], 0
jne 0x403de7
mov eax, edx
sub cl, al
mov byte [esp + 0x34], cl
test eax, eax
je 0x403e8b
mov ecx, eax
and ecx, 3
je 0x403ed0
mov dword [esp + 0x20], edi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + 0x14]
lea ebx, [edi + 1]
mov dword [esp + 0x14], ebx
movzx ebx, byte [edi]
mov byte [esi + edx], bl
inc edx
cmp ecx, edx
jne 0x403e10
add esi, edx
mov ecx, eax
sub ecx, edx
mov edi, dword [esp + 0x20]
cmp eax, 4
jb 0x403e8b
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0x14]
lea edx, [eax + 1]
mov dword [esp + 0x14], edx
movzx eax, byte [eax]
mov byte [esi], al
mov eax, dword [esp + 0x14]
lea edx, [eax + 1]
mov dword [esp + 0x14], edx
movzx eax, byte [eax]
mov byte [esi + 1], al
mov eax, dword [esp + 0x14]
lea edx, [eax + 1]
mov dword [esp + 0x14], edx
movzx eax, byte [eax]
mov byte [esi + 2], al
mov eax, dword [esp + 0x14]
lea edx, [eax + 1]
mov dword [esp + 0x14], edx
movzx eax, byte [eax]
mov byte [esi + 3], al
add esi, 4
add ecx, 0xfffffffc
jne 0x403e40
cmp dword [ebp + 8], 0
je 0x403dc0
mov eax, esi
sub eax, edi
lea ecx, [eax + 1]
cmp ecx, 0x200
jl 0x403dc0
add dword [esp + 0x2c], eax
push eax
push dword [ebp + 0xc]
push edi
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x4042ee
mov esi, eax
mov edi, eax
jmp 0x403dc0
mov ecx, eax
cmp eax, 4
jae 0x403e40
jmp 0x403e8b
mov ecx, dword [esp + 0x10]
sub ecx, dword [esp]
je 0x403dad
mov eax, edi
sub eax, esi
add eax, 0x200
mov edx, ecx
cmp ecx, eax
jl 0x403efe
mov edx, eax
cmp dword [ebp + 8], 0
jne 0x403f06
mov edx, ecx
test edx, edx
mov dword [esp + 0x10], ecx
mov dword [esp], edx
je 0x403f50
mov eax, esi
and eax, 3
je 0x403f50
mov dword [esp + 0x20], edi
mov edi, esi
not edi
and edi, 3
lea ebx, [edx - 1]
cmp edi, ebx
jb 0x403f2c
mov edi, ebx
lea eax, [edi + 1]
push eax
push 0x30
push esi
call fcn.0040d780
add esp, 0xc
add esi, edi
inc esi
sub ebx, edi
mov edi, dword [esp + 0x20]
cmp ebx, 4
jl 0x403f7c
jmp 0x403f60
mov ebx, edx
cmp ebx, 4
jl 0x403f7c
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esi], 0x30303030
mov eax, ebx
and eax, 0xfffffffb
add eax, eax
xor ebx, 4
sub eax, ebx
add esi, 4
mov ebx, eax
cmp eax, 3
jg 0x403f60
test ebx, ebx
je 0x403f8e
push ebx
push 0x30
push esi
call fcn.0040d780
add esp, 0xc
add esi, ebx
cmp dword [ebp + 8], 0
je 0x403ee0
mov eax, esi
sub eax, edi
cmp eax, 0x1ff
jl 0x403ee0
add dword [esp + 0x2c], eax
push eax
push dword [ebp + 0xc]
push edi
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x4042ee
mov esi, eax
mov edi, eax
jmp 0x403ee0
mov esi, eax
mov dword [esp + 0x20], eax
mov edx, edi
mov edi, ebx
mov ecx, dword [esp]
sub ecx, edi
je 0x403d9d
mov eax, dword [esp + 0x20]
sub eax, esi
add eax, 0x200
mov edi, ecx
cmp ecx, eax
jl 0x403ff8
mov edi, eax
cmp dword [ebp + 8], 0
jne 0x404000
mov edi, ecx
cmp edi, 4
mov dword [esp], ecx
jl 0x404060
lea ebx, [edi - 4]
mov eax, ebx
shr eax, 2
inc eax
and eax, 7
je 0x404064
mov dword [esp + 0x18], ebx
shl eax, 2
mov ebx, edx
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [ebx + edx]
mov dword [esi + edx], ecx
add edx, 4
cmp eax, edx
jne 0x404030
add esi, edx
mov ecx, edi
sub ecx, edx
add ebx, edx
mov eax, ecx
mov edx, ebx
mov ebx, dword [esp + 0x18]
cmp ebx, 0x1c
jae 0x404070
jmp 0x4040b1
mov eax, edi
jmp 0x4040b1
mov ecx, edi
cmp ebx, 0x1c
jb 0x4040b1
nop
nop
nop
nop
nop
mov eax, dword [edx]
mov dword [esi], eax
mov eax, dword [edx + 4]
mov dword [esi + 4], eax
mov eax, dword [edx + 8]
mov dword [esi + 8], eax
mov eax, dword [edx + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [edx + 0x10]
mov dword [esi + 0x10], eax
mov eax, dword [edx + 0x14]
mov dword [esi + 0x14], eax
mov eax, dword [edx + 0x18]
mov dword [esi + 0x18], eax
mov eax, dword [edx + 0x1c]
mov dword [esi + 0x1c], eax
lea eax, [ecx - 0x20]
add edx, 0x20
add esi, 0x20
add ecx, 0xffffffdc
cmp ecx, 0xfffffff8
mov ecx, eax
jb 0x404070
test eax, eax
je 0x404131
mov ecx, eax
and ecx, 7
je 0x404170
mov dword [esp + 0x18], edi
mov edi, edx
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [edi + edx]
mov byte [esi + edx], bl
inc edx
cmp ecx, edx
jne 0x4040d0
add esi, edx
mov ecx, eax
sub ecx, edx
add edi, edx
mov edx, edi
mov edi, dword [esp + 0x18]
cmp eax, 8
jb 0x404131
nop
movzx eax, byte [edx]
mov byte [esi], al
movzx eax, byte [edx + 1]
mov byte [esi + 1], al
movzx eax, byte [edx + 2]
mov byte [esi + 2], al
movzx eax, byte [edx + 3]
mov byte [esi + 3], al
movzx eax, byte [edx + 4]
mov byte [esi + 4], al
movzx eax, byte [edx + 5]
mov byte [esi + 5], al
movzx eax, byte [edx + 6]
mov byte [esi + 6], al
movzx eax, byte [edx + 7]
add edx, 8
mov byte [esi + 7], al
add esi, 8
add ecx, 0xfffffff8
jne 0x4040f0
cmp dword [ebp + 8], 0
je 0x403fda
mov eax, esi
mov ecx, dword [esp + 0x20]
sub eax, ecx
cmp eax, 0x1ff
jl 0x403fda
mov ebx, edi
mov edi, edx
add dword [esp + 0x2c], eax
push eax
push dword [ebp + 0xc]
push ecx
call dword [ebp + 8]
add esp, 0xc
test eax, eax
jne 0x403fd0
jmp 0x4042ee
mov ecx, eax
cmp eax, 8
jae 0x4040f0
jmp 0x404131
test byte [esp + 8], 1
je 0x404191
cmp dword [esp + 0x3c], 0
jle 0x404191
mov ecx, dword [esp + 0x3c]
jne 0x4041a8
mov ebx, dword [esp + 0x4c]
inc ebx
jmp 0x401c3d
mov ecx, dword [esp + 0x3c]
sub ecx, edx
je 0x404191
mov eax, edi
sub eax, esi
add eax, 0x200
mov edx, ecx
mov dword [esp + 0x3c], ecx
cmp ecx, eax
jl 0x4041bd
mov edx, eax
cmp dword [ebp + 8], 0
jne 0x4041c7
mov edx, dword [esp + 0x3c]
test edx, edx
mov dword [esp + 8], edx
mov dword [esp + 0x20], edi
je 0x404210
mov eax, esi
and eax, 3
je 0x404210
mov ebx, esi
not ebx
and ebx, 3
lea edi, [edx - 1]
cmp ebx, edi
jb 0x4041ea
mov ebx, edi
lea eax, [ebx + 1]
push eax
push 0x20
push esi
call fcn.0040d780
add esp, 0xc
add esi, ebx
inc esi
sub edi, ebx
cmp edi, 4
jge 0x404217
jmp 0x404247
mov edi, edx
cmp edi, 4
jl 0x404247
mov eax, edi
cmp edi, 7
jl 0x404223
mov eax, 7
neg eax
lea ebx, [edi + eax]
add ebx, 3
and ebx, 0xfffffffc
lea eax, [ebx + 4]
push eax
push 0x20
push esi
call fcn.0040d780
add esp, 0xc
add esi, ebx
add esi, 4
sub edi, ebx
add edi, 0xfffffffc
test edi, edi
je 0x404259
push edi
push 0x20
push esi
call fcn.0040d780
add esp, 0xc
add esi, edi
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 8]
cmp dword [ebp + 8], 0
je 0x4041a0
mov eax, esi
sub eax, edi
cmp eax, 0x1ff
jl 0x4041a0
add dword [esp + 0x2c], eax
push eax
push dword [ebp + 0xc]
push edi
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x4042ee
mov esi, eax
mov edi, eax
mov edx, dword [esp + 8]
jmp 0x4041a0
lea eax, [esp + 0x45]
mov dword [esp + 0x14], eax
mov edx, dword [esp]
jmp 0x403d91
cmp dword [ebp + 8], 0
je 0x4042f4
mov eax, esi
sub eax, edi
test eax, eax
jle 0x4042f7
add dword [esp + 0x2c], eax
push eax
push dword [ebp + 0xc]
push edi
call dword [ebp + 8]
add esp, 0xc
mov esi, eax
mov edi, eax
jmp 0x4042f7
xor esi, esi
xor edi, edi
jmp 0x4042f7
mov byte [esi], 0
mov eax, edi
xor eax, esi
mov ecx, dword [esp + 0x2c]
sub ecx, eax
not edi
and edi, esi
lea eax, [ecx + edi*2]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret