Function at 0x403238
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x150
cmp dword [ebp + 0xc], 0x100
push ebx
push esi
push edi
jbe 0x40325b
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x400]
mov dword [ebp - 0x34], ecx
jmp 0x403262
mov dword [ebp - 0x34], 0x10
push 0x44
lea eax, [ebp - 0x88]
push 0
push eax
call fcn.004036b3
add esp, 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [eax]
add eax, 4
inc dword [ebp + edx*4 - 0x88]
dec ecx
jne 0x40327b
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x88], eax
jne 0x4032a6
xor eax, eax
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x20]
mov dword [ecx], eax
mov dword [edx], eax
jmp 0x40368c
mov ecx, 1
lea eax, [ebp - 0x84]
cmp dword [eax], 0
jne 0x4032c1
add eax, 4
inc ecx
lea edx, [ebp - 0x48]
cmp eax, edx
jbe 0x4032b1
mov edx, dword [ebp + 0x20]
mov dword [ebp - 0x14], ecx
mov esi, ecx
cmp dword [edx], ecx
jae 0x4032cf
mov dword [edx], esi
mov edi, 0x10
lea eax, [ebp - 0x48]
cmp dword [eax], 0
jne 0x4032ea
sub eax, 4
dec edi
lea edx, [ebp - 0x88]
cmp eax, edx
jne 0x4032d7
mov edx, dword [ebp + 0x20]
mov dword [ebp - 0x24], edi
cmp dword [edx], edi
jbe 0x4032f6
mov dword [edx], edi
mov eax, 1
shl eax, cl
mov dword [ebp - 0x20], eax
cmp ecx, edi
jae 0x403322
lea eax, [ebp + ecx*4 - 0x88]
mov edx, dword [eax]
sub dword [ebp - 0x20], edx
js 0x40333a
add eax, 4
inc ecx
mov edx, dword [ebp - 0x20]
add edx, edx
cmp ecx, edi
mov dword [ebp - 0x20], edx
jb 0x40330b
lea ecx, [ebp + edi*4 - 0x88]
mov eax, dword [ecx]
sub dword [ebp - 0x20], eax
jns 0x403344
mov eax, 2
jmp 0x40368c
mov eax, 2
jmp 0x40368c
add eax, dword [ebp - 0x20]
xor edx, edx
dec edi
mov dword [ecx], eax
lea eax, [ebp - 0x84]
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x10c], edx
je 0x40336d
add edx, dword [eax]
add eax, 4
mov dword [ecx], edx
add ecx, 4
dec edi
jne 0x403360
mov edx, dword [ebp + 8]
xor edi, edi
mov eax, dword [edx]
add edx, 4
test eax, eax
je 0x40338e
lea ecx, [ebp + eax*4 - 0x110]
mov eax, dword [ecx]
inc eax
mov dword [ecx], eax
mov dword [eax*4 + 0x405034], edi
inc edi
cmp edi, dword [ebp + 0xc]
jb 0x403372
mov dword [ebp - 0x30], 0x405038
mov dword [ebp - 0x28], 0xffffffff
xor ebx, ebx
xor edx, edx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x110], ebx
mov dword [ebp - 0xcc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x150], ebx
mov dword [ebp - 0x2c], ebx
cmp dword [ebp - 0x24], esi
jl 0x403651
mov eax, dword [ebp - 0x14]
lea ecx, [ebp + eax*4 - 0x88]
mov dword [ebp - 0x40], ecx
mov eax, dword [ecx]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
dec dword [ebp - 0x38]
test eax, eax
je 0x403642
mov eax, dword [ebp - 0x28]
shl eax, 2
mov ecx, dword [ebp + eax - 0xc8]
add ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x14]
jge 0x40353a
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x24]
mov edx, dword [ebp + 0x20]
add eax, dword [ebp + ecx - 0xc8]
inc dword [ebp - 0x28]
sub esi, eax
mov dword [ebp - 8], eax
add dword [ebp - 0xc], 4
mov eax, dword [edx]
cmp esi, eax
jbe 0x403434
mov esi, eax
mov eax, dword [ebp - 0x14]
mov edx, 1
sub eax, dword [ebp - 8]
mov cl, al
mov dword [ebp - 4], eax
shl edx, cl
cmp edx, dword [ebp - 0x44]
jbe 0x403471
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x40]
inc eax
inc dword [ebp - 4]
sub edx, eax
cmp dword [ebp - 4], esi
jae 0x403471
add edx, edx
add ecx, 4
mov eax, dword [ecx]
cmp edx, eax
jbe 0x403471
sub edx, eax
inc dword [ebp - 4]
cmp dword [ebp - 4], esi
jb 0x40345c
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 4]
add eax, ecx
cmp eax, dword [ebp - 0x34]
jbe 0x40348b
cmp dword [ebp - 0x34], ecx
jbe 0x40348b
mov eax, dword [ebp - 0x34]
sub eax, ecx
mov dword [ebp - 4], eax
mov eax, 1
mov cl, byte [ebp - 4]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
lea edx, [ebp + ecx - 0xc8]
mov dword [ebp - 0x3c], edx
mov dword [edx], eax
mov eax, dword [ebp - 0x2c]
inc eax
imul eax, eax, 6
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
je 0x40366f
lea edx, [eax + 6]
mov ecx, dword [ebp + 0x1c]
add eax, 2
mov dword [ecx], edx
mov ecx, dword [ebp - 0xc]
mov dword [ebp + 0x1c], eax
mov dword [eax], 0
test ecx, ecx
mov dword [ebp + ecx - 0x150], edx
je 0x403529
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1a], edx
mov dword [ebp + ecx - 0x110], eax
mov al, byte [ebp + ecx - 0xcc]
mov cl, byte [ebp - 4]
lea esi, [ebp - 0x1c]
add cl, 0x10
mov edi, 1
mov byte [ebp - 0x1b], al
mov byte [ebp - 0x1c], cl
mov cl, byte [ebp - 8]
shl edi, cl
dec edi
sub cl, al
and edi, dword [ebp - 0x10]
shr edi, cl
mov ecx, dword [ebp - 0xc]
imul edi, edi, 6
add edi, dword [ebp + ecx - 0x154]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx]
add eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x14]
jl 0x40340d
mov cl, byte [ebp - 0x14]
mov eax, dword [ebp + 0xc]
sub cl, byte [ebp - 8]
lea esi, [eax*4 + 0x405038]
mov byte [ebp - 0x1b], cl
cmp esi, dword [ebp - 0x30]
ja 0x403558
mov byte [ebp - 0x1c], 0x63
jmp 0x403595
mov eax, dword [ebp - 0x30]
mov esi, dword [eax]
cmp esi, dword [ebp + 0x10]
jae 0x403578
mov byte [ebp - 4], 0x10
cmp esi, 0x100
adc byte [ebp - 4], 0xff
mov al, byte [ebp - 4]
mov byte [ebp - 0x1c], al
jmp 0x40358d
sub esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0x18]
add esi, esi
mov edi, dword [ebp + 0x14]
mov al, byte [esi + eax]
mov si, word [esi + edi]
mov byte [ebp - 0x1c], al
add dword [ebp - 0x30], 4
mov word [ebp - 0x1a], si
mov eax, 1
shl eax, cl
mov cl, byte [ebp - 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
shr eax, cl
mov dword [ebp - 4], eax
cmp eax, dword [ebp - 0x2c]
jae 0x4035d7
imul eax, eax, 6
lea ecx, [eax + edx]
mov eax, dword [ebp - 0xc]
imul eax, eax, 6
mov dword [ebp - 0x3c], eax
lea esi, [ebp - 0x1c]
mov edi, ecx
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
add ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0x2c]
add dword [ebp - 4], eax
cmp dword [ebp - 4], esi
jb 0x4035be
mov eax, 1
mov cl, byte [ebp - 0x14]
dec cl
shl eax, cl
test dword [ebp - 0x10], eax
je 0x4035f2
xor dword [ebp - 0x10], eax
shr eax, 1
test dword [ebp - 0x10], eax
jne 0x4035e8
mov esi, dword [ebp - 0x28]
mov cl, byte [ebp - 8]
shl esi, 2
xor dword [ebp - 0x10], eax
mov eax, 1
shl eax, cl
dec eax
and eax, dword [ebp - 0x10]
cmp eax, dword [ebp + esi - 0x110]
je 0x4033dc
mov eax, dword [ebp + esi - 0xcc]
sub esi, 4
dec dword [ebp - 0x28]
sub dword [ebp - 8], eax
mov eax, 1
mov cl, byte [ebp - 8]
shl eax, cl
dec eax
and eax, dword [ebp - 0x10]
cmp eax, dword [ebp + esi - 0x110]
jne 0x403616
jmp 0x4033dc
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x24], eax
jge 0x4033ca
mov eax, dword [ebp - 0xc8]
mov edx, dword [ebp + 0x20]
cmp dword [ebp - 0x20], 0
mov dword [edx], eax
je 0x40368a
cmp dword [ebp - 0x24], 1
je 0x40368a
mov eax, 1
jmp 0x40368c
cmp dword [ebp - 0x28], 0
je 0x403683
push dword [ebp - 0x150]
call fcn.00403693
add esp, 4
mov eax, 3
jmp 0x40368c
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret