Function at 0x401000
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 + 0x2c], eax
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
lea eax, [esp + 0xa4]
not eax
mov dword [esp + 0x54], eax
mov eax, ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], edi
jmp 0x401048
mov edi, ebx
mov byte [edi], al
inc edi
mov eax, esi
inc eax
test al, 3
mov dword [esp + 0x18], edi
mov esi, eax
je 0x401060
movzx eax, byte [eax]
jmp 0x40107e
mov eax, dword [eax]
mov edx, eax
not edx
and edx, 0x80808080
mov ecx, eax
xor ecx, 0x25252525
add ecx, 0xfefefeff
test ecx, edx
je 0x4010d4
cmp al, 0x25
je 0x401144
mov edi, dword [esp + 0x18]
test al, al
je 0x4036b4
cmp dword [ebp + 8], 0
je 0x401042
mov ebx, edi
mov ecx, edi
mov edi, dword [esp + 0x1c]
sub ecx, edi
lea edx, [ecx + 1]
cmp edx, 0x200
jl 0x401040
add dword [esp + 0x24], ecx
push ecx
push dword [ebp + 0xc]
push edi
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x4036fe
mov edi, eax
mov eax, esi
movzx eax, byte [esi]
mov dword [esp + 0x1c], edi
jmp 0x401042
mov ecx, dword [esp + 0x1c]
sub ecx, edi
add ecx, 0x200
jmp 0x401122
mov dword [edx], eax
add edx, 4
mov dword [esp + 0x18], edx
mov eax, dword [esi + 4]
add esi, 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 0x40107e
lea edi, [eax - 0x1010101]
test edx, edi
jne 0x401086
cmp dword [ebp + 8], 0
mov edx, dword [esp + 0x18]
je 0x4010f0
cmp ecx, 4
jge 0x4010f0
jmp 0x40107e
mov ecx, esi
add ecx, 2
xor esi, esi
jmp 0x401163
movzx eax, byte [ecx - 1]
lea edi, [eax - 0x20]
cmp edi, 0x3f
ja 0x4011c0
mov edx, 2
jmp dword [edi*4 + 0x4c4564]
dec ecx
mov edx, esi
cmp al, 0x2a
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x18], edi
jne 0x401212
mov eax, dword [esp + 0x2c]
mov edi, dword [eax]
add eax, 4
mov dword [esp + 0x2c], eax
movzx eax, byte [ecx + 1]
inc ecx
cmp al, 0x2e
jne 0x4012af
movzx eax, byte [ecx + 1]
cmp al, 0x2a
jne 0x40126d
mov eax, dword [esp + 0x2c]
mov ebx, dword [eax]
mov dword [esp + 0x20], ebx
add eax, 4
mov dword [esp + 0x2c], eax
movzx eax, byte [ecx + 2]
add ecx, 2
jmp 0x4012c7
mov dword [esp + 8], edx
mov edx, eax
add dl, 0xd0
cmp dl, 9
ja 0x4012a1
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, edi
and esi, 0xa
mov edx, edi
or edi, 0xa
imul edi, esi
xor esi, 0xa
and edx, 0xfffffff5
imul edx, esi
add edi, edx
movzx eax, al
add edi, eax
add edi, 0xffffffd0
movzx eax, byte [ecx + 1]
inc ecx
mov edx, eax
add dl, 0xd0
cmp dl, 0xa
jb 0x401230
mov edx, dword [esp + 8]
mov esi, dword [esp + 0x24]
cmp al, 0x2e
je 0x4011ed
jmp 0x4012af
mov esi, edx
inc ecx
mov edx, eax
add dl, 0xd0
cmp dl, 9
ja 0x4012b9
xor ebx, ebx
nop
nop
nop
nop
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 0x401280
mov dword [esp + 0x20], ebx
jmp 0x4012c1
mov edx, dword [esp + 8]
xor edi, edi
cmp al, 0x2e
je 0x4011ed
mov dword [esp + 0x20], 0xffffffff
jmp 0x4012c7
mov dword [esp + 0x20], 0
mov edx, esi
mov esi, dword [esp + 0x24]
movzx eax, al
add eax, 0xffffffb7
cmp eax, 0x31
mov dword [esp + 0x50], edi
ja 0x40134b
jmp dword [eax*4 + 0x4c4664]
mov edi, dword [esp + 0x18]
movzx eax, byte [ecx]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x10], eax
movzx eax, al
add eax, 0xffffffbf
cmp eax, 0x37
mov dword [esp + 0x24], esi
ja 0x401a90
jmp dword [eax*4 + 0x4c472c]
mov eax, dword [esp + 0x10]
mov byte [esp + 0x263], al
mov dword [esp + 0x28], 1
mov byte [esp + 0x3c], 0
mov byte [esp + 0x30], 0
mov dword [esp + 0x38], 0
mov dword [esp + 4], 0
lea eax, [esp + 0x263]
mov dword [esp], eax
xor edx, edx
mov dword [esp + 0x14], 0
xor esi, esi
mov dword [esp + 0x50], 0
jmp 0x4029ab
mov dword [esp + 8], edx
mov ecx, dword [esp + 0x28]
cmp esi, ecx
jg 0x4029b9
mov esi, ecx
movsx eax, byte [esp + 0x3c]
mov dword [esp + 0x20], esi
lea edx, [esi + eax]
movsx esi, byte [esp + 0x30]
add esi, edx
mov edx, esi
mov edi, dword [esp + 0x14]
and edx, edi
xor esi, edi
lea edi, [esi + edx*2]
mov esi, dword [esp + 0x50]
cmp esi, edi
jg 0x4029e3
mov esi, edi
mov edx, esi
not edx
and edx, edi
not edi
and edi, esi
sub edi, edx
mov dword [esp + 0x10], edi
sub dword [esp + 0x20], ecx
mov edx, dword [esp + 8]
test dl, 1
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
jne 0x402a0f
test dl, 0x10
jne 0x402a15
xor edx, edx
mov ecx, dword [esp + 0x10]
jmp 0x402a29
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
cmp ecx, ebx
jg 0x402a23
mov ecx, ebx
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov dword [esp + 0x10], ecx
add ecx, dword [esp + 0x20]
mov dword [esp + 8], edx
je 0x402f20
test dl, 1
jne 0x402bbc
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x10]
test ebx, ebx
jg 0x402a70
jmp 0x402bb8
mov ebx, dword [esp + 0x10]
sub ebx, dword [esp + 0x18]
test ebx, ebx
jle 0x402bab
mov eax, esi
sub eax, edi
add eax, 0x200
mov ecx, ebx
mov dword [esp + 0x18], ebx
cmp ebx, eax
jl 0x402a87
mov dword [esp + 0x18], eax
cmp dword [ebp + 8], 0
jne 0x402a93
mov eax, ebx
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x18], 0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], ebx
je 0x402b10
mov eax, edi
and eax, 3
je 0x402b10
mov ecx, edi
not edi
and edi, 3
mov eax, dword [esp + 0x18]
lea ebx, [eax - 1]
cmp edi, ebx
jb 0x402abd
mov edi, ebx
lea eax, [edi + 1]
push eax
push 0x20
mov esi, ecx
push ecx
call fcn.0040cc00
add esp, 0xc
lea ecx, [edi + esi]
inc ecx
sub ebx, edi
mov edx, dword [esp + 8]
mov esi, dword [esp + 0x1c]
cmp ebx, 4
jge 0x402b1b
test ebx, ebx
je 0x402b5e
push ebx
push 0x20
mov edi, ecx
push ecx
call fcn.0040cc00
mov edx, dword [esp + 0x14]
add esp, 0xc
add edi, ebx
cmp dword [ebp + 8], 0
jne 0x402b6a
jmp 0x402a60
mov ecx, edi
mov ebx, dword [esp + 0x18]
cmp ebx, 4
jl 0x402ae1
mov eax, ebx
cmp ebx, 7
jl 0x402b27
mov eax, 7
neg eax
lea esi, [ebx + eax]
add esi, 3
and esi, 0xfffffffc
lea eax, [esi + 4]
push eax
push 0x20
mov edi, ebx
mov ebx, ecx
push ecx
call fcn.0040cc00
add esp, 0xc
lea ecx, [esi + ebx]
add ecx, 4
mov ebx, edi
sub ebx, esi
add ebx, 0xfffffffc
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 8]
test ebx, ebx
jne 0x402ae5
mov edi, ecx
cmp dword [ebp + 8], 0
je 0x402a60
mov ecx, edi
xor ecx, esi
mov eax, esi
not eax
and eax, edi
add eax, eax
sub eax, ecx
lea ecx, [eax + 1]
cmp ecx, 0x200
jl 0x402a60
add dword [esp + 0x24], eax
push eax
push dword [ebp + 0xc]
push esi
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x403706
mov edi, eax
mov esi, eax
mov edx, dword [esp + 8]
jmp 0x402a60
mov dword [esp + 0x10], ebx
movzx eax, byte [esp + 0x3c]
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x3d]
mov dword [esp + 0xc], ecx
jmp 0x402bdf
mov edi, eax
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 8]
movzx eax, byte [esp + 0x3c]
test al, al
je 0x402cfd
movsx edx, al
mov ebx, dword [esp + 0x1c]
sub ebx, edi
add ebx, 0x200
cmp ebx, edx
jl 0x402bfc
mov ebx, edx
cmp dword [ebp + 8], 0
jne 0x402c04
mov ebx, edx
sub al, bl
mov byte [esp + 0x3c], al
test ebx, ebx
je 0x402cab
mov eax, ebx
and eax, 3
je 0x402cf0
mov dword [esp + 0x24], esi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + 0xc]
mov ecx, edi
lea edi, [esi + 1]
mov dword [esp + 0xc], edi
mov edi, ecx
movzx ecx, byte [esi]
mov byte [edi + edx], cl
inc edx
cmp eax, edx
jne 0x402c30
add edi, edx
mov eax, ebx
sub eax, edx
mov esi, dword [esp + 0x24]
cmp ebx, 4
jb 0x402cab
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + 0xc]
lea edx, [ecx + 1]
mov dword [esp + 0xc], edx
movzx ecx, byte [ecx]
mov byte [edi], cl
mov ecx, dword [esp + 0xc]
lea edx, [ecx + 1]
mov dword [esp + 0xc], edx
movzx ecx, byte [ecx]
mov byte [edi + 1], cl
mov ecx, dword [esp + 0xc]
lea edx, [ecx + 1]
mov dword [esp + 0xc], edx
movzx ecx, byte [ecx]
mov byte [edi + 2], cl
mov ecx, dword [esp + 0xc]
lea edx, [ecx + 1]
mov dword [esp + 0xc], edx
movzx ecx, byte [ecx]
mov byte [edi + 3], cl
add edi, 4
add eax, 0xfffffffc
jne 0x402c60
cmp dword [ebp + 8], 0
je 0x402bd6
mov eax, edi
sub eax, dword [esp + 0x1c]
cmp eax, 0x1ff
jl 0x402bd6
add esi, eax
push eax
push dword [ebp + 0xc]
push dword [esp + 0x24]
call dword [ebp + 8]
add esp, 0xc
test eax, eax
jne 0x402bd0
jmp 0x403710
mov eax, ebx
cmp ebx, 4
jae 0x402c60
jmp 0x402cab
mov dword [esp + 0x24], esi
mov eax, dword [esp + 4]
mov ecx, eax
shr ecx, 0x18
mov dword [esp + 0x18], ecx
xor esi, esi
test dl, 0x40
je 0x402d2f
and eax, 0xffffff
add eax, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
lea ecx, [esi + 1]
xor edx, edx
div ecx
sub esi, edx
mov edx, dword [esp + 8]
cmp dword [esp + 0x20], 0
jle 0x40368a
mov ebx, dword [esp + 0x20]
jmp 0x402d50
mov ebx, dword [esp + 0x20]
sub ebx, dword [esp + 4]
test ebx, ebx
jle 0x402f17
mov eax, dword [esp + 0x1c]
sub eax, edi
add eax, 0x200
mov ecx, ebx
mov dword [esp + 4], ebx
mov dword [esp + 0x20], ebx
cmp ebx, eax
jl 0x402d6d
mov dword [esp + 4], eax
cmp dword [ebp + 8], 0
jne 0x402d7b
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
test dl, 0x40
mov ebx, dword [esp + 0x1c]
jne 0x402de0
cmp dword [esp + 4], 0
je 0x402df0
mov eax, edi
and eax, 3
je 0x402df0
mov ecx, edi
mov ebx, edi
not ebx
and ebx, 3
mov eax, dword [esp + 4]
lea ecx, [eax - 1]
cmp ebx, ecx
jb 0x402da8
mov ebx, ecx
lea eax, [ebx + 1]
push eax
push 0x30
push edi
mov dword [esp + 0x50], ecx
call fcn.0040cc00
mov ecx, dword [esp + 0x50]
add esp, 0xc
sub ecx, ebx
add edi, ebx
inc edi
mov edx, dword [esp + 8]
mov ebx, dword [esp + 0x1c]
cmp ecx, 4
jge 0x402df9
jmp 0x402e39
mov ecx, dword [esp + 4]
jmp 0x402e39
mov ecx, dword [esp + 4]
cmp ecx, 4
jl 0x402e39
mov eax, ecx
cmp ecx, 7
jl 0x402e05
mov eax, 7
neg eax
lea ebx, [ecx + eax]
add ebx, 3
and ebx, 0xfffffffc
lea eax, [ebx + 4]
push eax
push 0x30
push edi
mov dword [esp + 0x50], ecx
call fcn.0040cc00
mov ecx, dword [esp + 0x50]
add esp, 0xc
add edi, ebx
add edi, 4
sub ecx, ebx
add ecx, 0xfffffffc
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 8]
test ecx, ecx
je 0x402e80
test cl, 1
jne 0x402e50
mov eax, ecx
cmp ecx, 1
jne 0x402ed7
jmp 0x402e80
mov al, 0x30
test dl, 0x40
je 0x402e6b
cmp esi, dword [esp + 0x18]
jne 0x402e6a
movzx eax, byte [0x4c7001]
xor al, 0x5f
xor esi, esi
jmp 0x402e6b
inc esi
mov byte [edi], al
inc edi
lea eax, [ecx - 1]
cmp ecx, 1
jne 0x402ed7
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp dword [ebp + 8], 0
je 0x402d40
mov eax, edi
sub eax, ebx
cmp eax, 0x1ff
jl 0x402d40
add dword [esp + 0x24], eax
push eax
push dword [ebp + 0xc]
push ebx
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x403706
mov edi, eax
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 8]
jmp 0x402d40
movzx ecx, byte [0x4c7001]
xor cl, 0x5f
xor esi, esi
mov byte [edi + 1], cl
add edi, 2
add eax, 0xfffffffe
je 0x402e80
mov cl, 0x30
test dl, 0x40
je 0x402f01
cmp esi, dword [esp + 0x18]
jne 0x402f00
movzx edx, byte [0x4c7001]
xor dl, 0x5f
xor esi, esi
jmp 0x402f03
inc esi
mov dl, 0x30
mov byte [edi], dl
mov edx, dword [esp + 8]
test dl, 0x40
je 0x402ecc
cmp esi, dword [esp + 0x18]
je 0x402ec0
inc esi
jmp 0x402ecc
movzx eax, byte [esp + 0x3c]
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x3d]
mov dword [esp + 0xc], ecx
jmp 0x402f3f
mov edi, eax
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 8]
movzx eax, byte [esp + 0x3c]
test al, al
je 0x40305d
movsx ecx, al
mov ebx, ecx
cmp dword [ebp + 8], 0
je 0x402f64
mov ebx, dword [esp + 0x1c]
sub ebx, edi
add ebx, 0x200
cmp ebx, ecx
jl 0x402f64
mov ebx, ecx
sub cl, bl
mov byte [esp + 0x3c], cl
test ebx, ebx
je 0x40300b
mov ecx, ebx
and ecx, 3
je 0x403050
mov dword [esp + 0x24], esi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + 0xc]
mov eax, edi
lea edi, [esi + 1]
mov dword [esp + 0xc], edi
mov edi, eax
movzx eax, byte [esi]
mov byte [edi + edx], al
inc edx
cmp ecx, edx
jne 0x402f90
add edi, edx
mov ecx, ebx
sub ecx, edx
mov esi, dword [esp + 0x24]
cmp ebx, 4
jb 0x40300b
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0xc]
lea edx, [eax + 1]
mov dword [esp + 0xc], edx
movzx eax, byte [eax]
mov byte [edi], al
mov eax, dword [esp + 0xc]
lea edx, [eax + 1]
mov dword [esp + 0xc], edx
movzx eax, byte [eax]
mov byte [edi + 1], al
mov eax, dword [esp + 0xc]
lea edx, [eax + 1]
mov dword [esp + 0xc], edx
movzx eax, byte [eax]
mov byte [edi + 2], al
mov eax, dword [esp + 0xc]
lea edx, [eax + 1]
mov dword [esp + 0xc], edx
movzx eax, byte [eax]
mov byte [edi + 3], al
add edi, 4
add ecx, 0xfffffffc
jne 0x402fc0
cmp dword [ebp + 8], 0
je 0x402f36
mov eax, edi
sub eax, dword [esp + 0x1c]
lea ecx, [eax + 1]
cmp ecx, 0x200
jl 0x402f36
add esi, eax
push eax
push dword [ebp + 0xc]
push dword [esp + 0x24]
call dword [ebp + 8]
add esp, 0xc
test eax, eax
jne 0x402f30
jmp 0x403710
mov ecx, ebx
cmp ebx, 4
jae 0x402fc0
jmp 0x40300b
mov dword [esp + 0x24], esi
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x4030aa
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x403288
lea eax, [esp + 0x31]
mov dword [esp + 0xc], eax
movzx ecx, byte [esp + 0x30]
test cl, cl
je 0x4034dd
mov esi, dword [esp + 0x24]
jmp 0x4033d1
mov ecx, dword [esp + 4]
sub ecx, dword [esp + 0x18]
je 0x403069
mov eax, ecx
cmp dword [ebp + 8], 0
je 0x4030c7
mov eax, dword [esp + 0x1c]
sub eax, edi
add eax, 0x200
mov esi, ecx
cmp ecx, eax
jl 0x4030c5
mov esi, eax
mov eax, esi
cmp eax, 4
mov dword [esp + 4], ecx
mov dword [esp + 0x18], eax
jl 0x403130
mov esi, dword [esp + 0x1c]
lea ebx, [eax - 4]
mov ecx, eax
mov eax, ebx
shr eax, 2
inc eax
and eax, 7
je 0x403139
mov dword [esp + 0x20], ebx
shl eax, 2
xor edx, edx
mov ebx, dword [esp]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [ebx + edx]
mov dword [edi + edx], ecx
add edx, 4
cmp eax, edx
jne 0x403100
add edi, edx
mov ecx, dword [esp + 0x18]
sub ecx, edx
add ebx, edx
mov dword [esp], ebx
mov eax, ecx
mov edx, dword [esp + 8]
mov ebx, dword [esp + 0x20]
jmp 0x403139
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp]
jmp 0x403191
cmp ebx, 0x1c
mov ebx, dword [esp]
jb 0x403191
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [ebx]
mov dword [edi], eax
mov eax, dword [ebx + 4]
mov dword [edi + 4], eax
mov eax, dword [ebx + 8]
mov dword [edi + 8], eax
mov eax, dword [ebx + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [ebx + 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [ebx + 0x14]
mov dword [edi + 0x14], eax
mov eax, dword [ebx + 0x18]
mov dword [edi + 0x18], eax
mov eax, dword [ebx + 0x1c]
mov dword [edi + 0x1c], eax
add edi, 0x20
add ebx, 0x20
lea eax, [ecx - 0x20]
add ecx, 0xffffffdc
cmp ecx, 0xfffffff8
mov ecx, eax
jb 0x403150
test eax, eax
mov dword [esp + 0x1c], esi
je 0x403221
mov ecx, eax
and ecx, 7
je 0x403270
xor edx, edx
mov esi, ebx
nop
nop
nop
nop
movzx ebx, byte [esi + edx]
mov byte [edi + edx], bl
inc edx
cmp ecx, edx
jne 0x4031b0
add edi, edx
mov ecx, eax
sub ecx, edx
add esi, edx
mov ebx, esi
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 8]
cmp eax, 8
jb 0x403221
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx eax, byte [ebx]
mov byte [edi], al
movzx eax, byte [ebx + 1]
mov byte [edi + 1], al
movzx eax, byte [ebx + 2]
mov byte [edi + 2], al
movzx eax, byte [ebx + 3]
mov byte [edi + 3], al
movzx eax, byte [ebx + 4]
mov byte [edi + 4], al
movzx eax, byte [ebx + 5]
mov byte [edi + 5], al
movzx eax, byte [ebx + 6]
mov byte [edi + 6], al
movzx eax, byte [ebx + 7]
add ebx, 8
mov byte [edi + 7], al
add edi, 8
add ecx, 0xfffffff8
jne 0x4031e0
mov dword [esp], ebx
cmp dword [ebp + 8], 0
je 0x4030a0
mov eax, edi
sub eax, esi
lea ecx, [eax + 1]
cmp ecx, 0x200
jl 0x4030a0
add dword [esp + 0x24], eax
push eax
push dword [ebp + 0xc]
push dword [esp + 0x24]
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x403706
mov edi, eax
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 8]
jmp 0x4030a0
mov ecx, eax
cmp eax, 8
jae 0x4031e0
jmp 0x403221
sub esi, ecx
je 0x403075
mov ecx, esi
cmp dword [ebp + 8], 0
je 0x4032a3
mov eax, dword [esp + 0x1c]
sub eax, edi
add eax, 0x200
mov ecx, esi
cmp esi, eax
jl 0x4032a3
mov ecx, eax
test ecx, ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], ecx
je 0x403320
mov eax, edi
and eax, 3
je 0x403310
mov ecx, edi
mov ebx, edi
not ebx
and ebx, 3
mov eax, dword [esp + 0x18]
lea edi, [eax - 1]
cmp ebx, edi
jb 0x4032cc
mov ebx, edi
lea eax, [ebx + 1]
push eax
push 0x30
mov esi, ecx
push ecx
call fcn.0040cc00
add esp, 0xc
lea ecx, [ebx + esi]
inc ecx
sub edi, ebx
mov edx, dword [esp + 8]
mov esi, dword [esp + 0x14]
cmp edi, 4
jge 0x40332b
test edi, edi
je 0x40336a
push edi
push 0x30
mov esi, ecx
push ecx
call fcn.0040cc00
mov edx, dword [esp + 0x14]
add esp, 0xc
add esi, edi
mov edi, esi
mov esi, dword [esp + 0x14]
jmp 0x40336c
mov ecx, edi
mov edi, dword [esp + 0x18]
cmp edi, 4
jge 0x40332b
jmp 0x4032f0
mov eax, ecx
mov ecx, edi
mov edi, eax
cmp edi, 4
jl 0x4032f0
mov eax, edi
cmp edi, 7
jl 0x403337
mov eax, 7
neg eax
lea esi, [edi + eax]
add esi, 3
and esi, 0xfffffffc
lea eax, [esi + 4]
push eax
push 0x30
mov ebx, ecx
push ecx
call fcn.0040cc00
add esp, 0xc
lea ecx, [esi + ebx]
add ecx, 4
sub edi, esi
add edi, 0xfffffffc
mov edx, dword [esp + 8]
mov esi, dword [esp + 0x14]
test edi, edi
jne 0x4032f4
mov edi, ecx
cmp dword [ebp + 8], 0
mov ecx, dword [esp + 0x18]
je 0x403280
mov eax, edi
sub eax, dword [esp + 0x1c]
cmp eax, 0x1ff
jl 0x403280
add dword [esp + 0x24], eax
push eax
push dword [ebp + 0xc]
push dword [esp + 0x24]
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x403706
mov edi, eax
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 8]
mov ecx, dword [esp + 0x18]
jmp 0x403280
mov edx, dword [esp + 8]
movzx ecx, byte [esp + 0x30]
test cl, cl
je 0x4034e1
movsx edx, cl
mov eax, dword [esp + 0x1c]
sub eax, edi
add eax, 0x200
cmp eax, edx
jl 0x4033e5
mov eax, edx
cmp dword [ebp + 8], 0
jne 0x4033ed
mov eax, edx
sub cl, al
mov byte [esp + 0x30], cl
test eax, eax
je 0x40348b
mov ecx, eax
and ecx, 3
je 0x4034d0
mov dword [esp + 0x24], esi
xor edx, edx
nop
nop
nop
nop
mov esi, dword [esp + 0xc]
mov ebx, edi
lea edi, [esi + 1]
mov dword [esp + 0xc], edi
mov edi, ebx
movzx ebx, byte [esi]
mov byte [edi + edx], bl
inc edx
cmp ecx, edx
jne 0x403410
add edi, edx
mov ecx, eax
sub ecx, edx
mov esi, dword [esp + 0x24]
cmp eax, 4
jb 0x40348b
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [esp + 0xc]
lea edx, [eax + 1]
mov dword [esp + 0xc], edx
movzx eax, byte [eax]
mov byte [edi], al
mov eax, dword [esp + 0xc]
lea edx, [eax + 1]
mov dword [esp + 0xc], edx
movzx eax, byte [eax]
mov byte [edi + 1], al
mov eax, dword [esp + 0xc]
lea edx, [eax + 1]
mov dword [esp + 0xc], edx
movzx eax, byte [eax]
mov byte [edi + 2], al
mov eax, dword [esp + 0xc]
lea edx, [eax + 1]
mov dword [esp + 0xc], edx
movzx eax, byte [eax]
mov byte [edi + 3], al
add edi, 4
add ecx, 0xfffffffc
jne 0x403440
cmp dword [ebp + 8], 0
je 0x4033c0
mov eax, edi
sub eax, dword [esp + 0x1c]
lea ecx, [eax + 1]
cmp ecx, 0x200
jl 0x4033c0
add esi, eax
push eax
push dword [ebp + 0xc]
push dword [esp + 0x24]
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x403710
mov edi, eax
mov dword [esp + 0x1c], eax
jmp 0x4033c0
mov ecx, eax
cmp eax, 4
jae 0x403440
jmp 0x40348b
mov esi, dword [esp + 0x24]
test dl, 1
je 0x403697
mov ecx, dword [esp + 0x10]
test ecx, ecx
mov eax, dword [esp + 0x48]
jle 0x40369b
jne 0x403522
jmp 0x40369b
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x10]
sub ecx, dword [esp + 0x18]
je 0x40369b
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x1c]
mov edx, edi
not edi
mov ebx, ecx
cmp dword [ebp + 8], 0
mov dword [esp + 0x10], ecx
je 0x403559
mov eax, esi
and eax, edi
not esi
and esi, edx
sub eax, esi
mov ecx, dword [esp + 0x10]
add eax, 0x200
mov ebx, ecx
cmp ecx, eax
jl 0x403555
mov ebx, eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x18], ebx
test ebx, ebx
je 0x4035e0
mov eax, edx
and eax, 3
je 0x4035d0
and edi, 3
mov eax, dword [esp + 0x18]
lea ebx, [eax - 1]
cmp edi, ebx
jb 0x403578
mov edi, ebx
lea eax, [edi + 1]
push eax
push 0x20
mov esi, edx
push edx
call fcn.0040cc00
add esp, 0xc
lea edx, [edi + esi]
inc edx
sub ebx, edi
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
cmp ebx, 4
jge 0x4035ed
test ebx, ebx
je 0x403634
push ebx
push 0x20
mov edi, edx
push edx
call fcn.0040cc00
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x54]
add esp, 0xc
add edi, ebx
jmp 0x403636
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x48]
jmp 0x4035e4
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
cmp ebx, 4
jl 0x4035a0
mov eax, ebx
cmp ebx, 7
jl 0x4035f9
mov eax, 7
neg eax
lea esi, [ebx + eax]
add esi, 3
and esi, 0xfffffffc
lea eax, [esi + 4]
push eax
push 0x20
mov edi, edx
push edx
call fcn.0040cc00
add esp, 0xc
lea edx, [esi + edi]
add edx, 4
sub ebx, esi
add ebx, 0xfffffffc
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x10]
test ebx, ebx
jne 0x4035a8
mov edi, edx
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x403518
mov eax, edi
sub eax, dword [esp + 0x1c]
mov ecx, eax
and ecx, 1
mov edx, eax
xor edx, 1
lea ecx, [edx + ecx*2]
cmp ecx, 0x200
jl 0x403510
mov ecx, eax
and ecx, esi
xor esi, eax
lea esi, [esi + ecx*2]
push eax
push dword [ebp + 0xc]
push dword [esp + 0x24]
call dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x403710
mov edi, eax
mov dword [esp + 0x1c], eax
jmp 0x403510
lea eax, [esp + 0x3d]
mov dword [esp + 0xc], eax
jmp 0x403061
mov eax, dword [esp + 0x48]
mov dword [esp + 0x24], esi
inc eax
jmp 0x401048
cmp dword [ebp + 8], 0
je 0x4036f1
mov ecx, edi
mov edx, dword [esp + 0x1c]
xor ecx, edx
mov eax, edx
not eax
and eax, edi
add eax, eax
sub eax, ecx
lea ecx, [eax + 0x1ff]
cmp ecx, 0x200
mov esi, dword [esp + 0x24]
jl 0x403714
add esi, eax
push eax
push dword [ebp + 0xc]
push edx
call dword [ebp + 8]
add esp, 0xc
mov edi, eax
mov edx, eax
jmp 0x403714
mov byte [edi], 0
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
jmp 0x403714
xor edi, edi
mov esi, dword [esp + 0x24]
jmp 0x403712
xor edi, edi
xor edx, edx
mov esi, dword [esp + 0x24]
jmp 0x403714
xor edi, edi
xor edx, edx
sub edi, edx
mov eax, edi
and eax, esi
xor edi, esi
lea eax, [edi + eax*2]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret