Function at 0x4020e0
Capabilities:
Encode data using xor
Parse pe header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x444
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x14], edx
push edi
test esi, esi
je 0x402374
mov ebx, dword [esi + 0xc]
test ebx, ebx
je 0x402374
test edx, edx
je 0x402374
mov dword [esi + 0x18], 0
mov edi, 0x5a4d
movzx eax, word [edx]
xor ecx, ecx
cmp di, ax
sete cl
jne 0x402155
mov edi, dword [edx + 0x3c]
xor ecx, ecx
cmp dword [edi + edx], 0x4550
sete cl
jne 0x402155
mov eax, 0x14c
cmp ax, word [edi + edx + 4]
jne 0x402159
mov eax, 0x10b
xor ecx, ecx
cmp ax, word [edi + edx + 0x18]
sete cl
test ecx, ecx
jne 0x402169
mov dword [esi + 0x18], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0xc]
xor edi, edi
mov ebx, dword [edx + 0x3c]
add ebx, edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], ebx
movzx ecx, word [ebx + 6]
lea edx, [ebx + 0xf8]
mov dword [esp + 0x14], edx
xor edx, edx
mov dword [esp + 0x1c], ecx
test ecx, ecx
je 0x40230a
cmp ecx, 8
jb 0x40230a
cmp dword [0x405f20], 2
jl 0x40230a
mov edi, ecx
xorps xmm3, xmm3
and edi, 0xfffffff8
movaps xmmword [esp + 0x30], xmm3
xorps xmm6, xmm6
lea ecx, [ebx + 0x154]
xorps xmm7, xmm7
nop word [eax + eax]
movd xmm2, dword [ecx + 0x28]
lea ecx, [ecx + 0x140]
movd xmm0, dword [ecx - 0x140]
add edx, 8
movd xmm1, dword [ecx - 0x168]
movd xmm4, dword [ecx - 0x190]
punpckldq xmm4, xmm0
movd xmm0, dword [ecx - 0x13c]
punpckldq xmm1, xmm2
movd xmm2, dword [ecx - 0x114]
punpckldq xmm4, xmm1
movd xmm1, dword [ecx - 0x164]
movaps xmm5, xmm4
punpckldq xmm1, xmm2
pcmpeqd xmm5, xmm3
movd xmm3, dword [ecx - 0x18c]
pandn xmm5, xmmword [0x401250]
movd xmm2, dword [ecx - 0x78]
punpckldq xmm3, xmm0
movaps xmm0, xmm6
punpckldq xmm3, xmm1
movd xmm1, dword [ecx - 0xc8]
paddd xmm3, xmm4
movd xmm4, dword [ecx - 0xf0]
punpckldq xmm1, xmm2
movd xmm2, dword [ecx - 0x74]
pmaxud xmm0, xmm3
movd xmm3, dword [ecx - 0xec]
pand xmm0, xmm5
pandn xmm5, xmm6
por xmm0, xmm5
movaps xmm6, xmm0
movd xmm0, dword [ecx - 0xa0]
punpckldq xmm4, xmm0
movd xmm0, dword [ecx - 0x9c]
punpckldq xmm4, xmm1
movd xmm1, dword [ecx - 0xc4]
movaps xmm5, xmm4
pcmpeqd xmm5, xmmword [esp + 0x30]
pandn xmm5, xmmword [0x401250]
punpckldq xmm3, xmm0
movaps xmm0, xmm7
punpckldq xmm1, xmm2
punpckldq xmm3, xmm1
paddd xmm3, xmm4
pmaxud xmm0, xmm3
movaps xmm3, xmmword [esp + 0x30]
pand xmm0, xmm5
pandn xmm5, xmm7
por xmm0, xmm5
movaps xmm7, xmm0
cmp edx, edi
jl 0x4021d0
mov ecx, dword [esp + 0x1c]
pmaxud xmm6, xmm7
movaps xmm0, xmm6
psrldq xmm0, 8
pmaxud xmm6, xmm0
movups xmm0, xmm6
psrldq xmm0, 4
pmaxud xmm6, xmm0
movd edi, xmm6
cmp edx, ecx
jge 0x402341
mov ecx, dword [esp + 0x14]
lea eax, [edx + edx*4]
mov ebx, dword [esp + 0x1c]
lea ecx, [ecx + eax*8]
add ecx, 0x10
sub ebx, edx
mov edx, dword [ecx - 4]
test edx, edx
je 0x402331
mov eax, dword [ecx]
add eax, edx
cmp edi, eax
cmovb edi, eax
add ecx, 0x28
sub ebx, 1
jne 0x402321
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x2c]
push 4
push 0x3000
push edi
push dword [ebx + 0x34]
call eax
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40237d
push 4
push 0x3000
push edi
mov edi, dword [esp + 0x38]
push eax
call edi
mov dword [esp + 0x14], eax
test eax, eax
jne 0x402381
mov dword [esi + 0x18], 2
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x2c]
push 4
push 0x1000
push dword [ebx + 0x54]
push eax
call edi
mov ebx, eax
test ebx, ebx
je 0x40236d
mov edi, dword [esp + 0x10]
mov ecx, ebx
mov edx, dword [esp + 0x18]
push dword [edi + 0x54]
call fcn.004039a0
mov dword [esi], ebx
xor edx, edx
mov eax, dword [edi + 0x50]
add esp, 4
mov dword [esi + 4], eax
mov dword [esi + 0x14], 1
mov eax, dword [ebx + 0x3c]
add eax, ebx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
cmp dword [esp + 0x1c], edx
jbe 0x4024cf
lea edi, [eax + 0x108]
mov dword [esp + 0x10], edi
nop dword [eax + eax]
mov eax, dword [edi - 4]
mov dword [esp + 0x28], eax
test eax, eax
je 0x4024b9
mov ecx, dword [esp + 0x14]
add ecx, eax
mov eax, dword [edi]
test eax, eax
jne 0x402449
mov eax, dword [edi - 8]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x402419
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x38]
mov dword [esp + 0x10], eax
test eax, eax
je 0x4024b6
push 4
push 0x1000
push eax
push ecx
call dword [esp + 0x3c]
mov ebx, eax
test ebx, ebx
je 0x40236d
push dword [esp + 0x10]
mov eax, dword [esp + 0x2c]
add eax, dword [esp + 0x18]
push 0
push eax
call fcn.00403971
add esp, 0xc
jmp 0x4024b2
push 4
push 0x1000
push eax
push ecx
call dword [esp + 0x3c]
mov ebx, eax
test ebx, ebx
je 0x40236d
mov edi, dword [edi + 4]
mov ecx, dword [esp + 0x10]
add edi, dword [esp + 0x18]
mov ecx, dword [ecx]
cmp edi, ebx
jae 0x402492
dec edi
lea edx, [ecx - 1]
add edx, ebx
add edi, ecx
test ecx, ecx
je 0x4024ae
nop dword [eax]
mov al, byte [edi]
lea edx, [edx - 1]
mov byte [edx + 1], al
lea edi, [edi - 1]
sub ecx, 1
jne 0x402480
jmp 0x4024ae
jbe 0x4024ae
mov edx, ebx
test ecx, ecx
je 0x4024ae
sub edi, ebx
nop dword [eax]
mov al, byte [edi + edx]
lea edx, [edx + 1]
mov byte [edx - 1], al
sub ecx, 1
jne 0x4024a0
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
mov dword [edi - 8], ebx
inc edx
add edi, 0x28
mov dword [esp + 0x20], edx
mov dword [esp + 0x10], edi
cmp edx, dword [esp + 0x1c]
jl 0x4023e0
mov ecx, dword [esi]
test ecx, ecx
je 0x402513
mov edx, dword [ecx + 0x3c]
mov eax, ecx
sub eax, dword [edx + ecx + 0x34]
mov dword [esp + 0x24], eax
je 0x402590
mov eax, dword [edx + ecx + 0xa0]
test eax, eax
je 0x402590
cmp dword [edx + ecx + 0xa4], 0
je 0x402590
lea edi, [eax + ecx]
test edi, edi
jne 0x40252f
mov dword [esi + 0x18], 3
lea eax, [esi + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x402374
cmp dword [esi + 0x14], 0
je 0x402374
jmp 0x4028a5
mov eax, dword [edi]
lea ecx, [edi + 4]
mov dword [esp + 0x18], ecx
mov ecx, dword [ecx]
add eax, ecx
je 0x402590
mov dword [esp + 0x28], 0x3000
lea ebx, [ecx - 8]
mov edx, 0
shr ebx, 1
je 0x40257a
movzx eax, word [edi + edx*2 + 8]
mov ecx, eax
and ecx, 0xf000
cmp word [esp + 0x28], cx
jne 0x402575
mov ecx, dword [esp + 0x24]
and eax, 0xfff
add eax, dword [edi]
add eax, dword [esi]
add dword [eax], ecx
inc edx
cmp edx, ebx
jl 0x402552
mov eax, dword [esp + 0x18]
add edi, dword [eax]
mov ecx, dword [edi + 4]
lea eax, [edi + 4]
mov dword [esp + 0x18], eax
mov eax, dword [edi]
add eax, ecx
jne 0x402546
lea ecx, [esi + 0xc]
mov ecx, dword [ecx]
test ecx, ecx
je 0x40288e
mov eax, dword [esi]
test eax, eax
je 0x40288e
mov edx, dword [ecx + 4]
mov dword [esp + 0x28], edx
mov edx, dword [ecx + 8]
mov ecx, dword [ecx]
mov dword [esp + 0x18], ecx
mov ecx, dword [eax + 0x3c]
mov dword [esp + 0x24], edx
mov edx, dword [ecx + eax + 0x80]
test edx, edx
je 0x40266d
cmp dword [ecx + eax + 0x84], 0
je 0x40266d
cmp dword [edx + eax + 0xc], 0
lea ebx, [edx + eax]
mov dword [esp + 0x1c], ebx
je 0x40266d
nop dword [eax]
mov edi, dword [ebx + 0xc]
add edi, eax
push edi
call dword [esp + 0x2c]
mov edx, eax
mov dword [esp + 0x14], edx
test edx, edx
jne 0x402617
push edi
call dword [esp + 0x28]
mov edx, eax
mov dword [esp + 0x14], eax
test edx, edx
je 0x4027aa
mov ecx, dword [ebx]
mov eax, dword [esi]
test ecx, ecx
je 0x402624
lea edi, [eax + ecx]
jmp 0x402629
mov edi, dword [ebx + 0x10]
add edi, eax
mov ebx, dword [ebx + 0x10]
mov ecx, dword [edi]
add ebx, eax
test ecx, ecx
je 0x40265c
jns 0x40263b
movzx eax, cx
jmp 0x402642
mov eax, dword [esi]
add eax, 2
add eax, ecx
push eax
push edx
call dword [esp + 0x20]
mov edx, dword [esp + 0x14]
add edi, 4
mov dword [ebx], eax
add ebx, 4
mov ecx, dword [edi]
test ecx, ecx
jne 0x402634
mov eax, dword [esi]
mov ebx, dword [esp + 0x1c]
add ebx, 0x14
mov dword [esp + 0x1c], ebx
cmp dword [ebx + 0xc], 0
jne 0x4025f0
mov edi, dword [esi + 4]
xor ebx, ebx
mov ecx, ebx
shl ecx, 0x18
lea eax, [ecx + ecx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [edx + edx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
lea eax, [ecx + ecx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [edx + edx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
lea eax, [ecx + ecx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [edx + edx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
lea eax, [ecx + ecx]
mov edx, eax
xor edx, 0x4c10db7
test ecx, ecx
cmovns edx, eax
lea eax, [edx + edx]
mov ecx, eax
xor ecx, 0x4c10db7
test edx, edx
cmovns ecx, eax
mov dword [esp + ebx*4 + 0x50], ecx
inc ebx
cmp ebx, 0x100
jl 0x402672
mov ebx, dword [esi]
xor edx, edx
test edi, edi
je 0x402729
movzx eax, byte [ebx]
lea ebx, [ebx + 1]
mov ecx, edx
shl edx, 8
shr ecx, 0x18
xor ecx, eax
xor edx, dword [esp + ecx*4 + 0x50]
sub edi, 1
jne 0x402710
mov ecx, dword [esi + 0xc]
mov dword [esi + 8], edx
test ecx, ecx
je 0x40288e
mov eax, dword [ecx + 0x14]
movaps xmm0, xmmword [0x401220]
mov ecx, dword [ecx + 0x10]
mov dword [esp + 0x24], eax
mov eax, dword [esi]
movups xmmword [esp + 0x30], xmm0
mov dword [esp + 0x18], ecx
movaps xmm0, xmmword [0x401230]
mov edi, dword [eax + 0x3c]
add edi, eax
mov dword [esp + 0x1c], 0
movups xmmword [esp + 0x40], xmm0
movzx ebx, word [edi + 6]
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x402815
add edi, 0x108
mov eax, ebx
mov ebx, dword [edi]
mov dword [esp + 0x28], 0
test ebx, ebx
je 0x402801
mov edx, dword [edi + 0x14]
test edx, 0x2000000
je 0x4027b6
push 0x4000
push ebx
push dword [edi - 8]
call ecx
jmp 0x4027f9
mov dword [esi + 0x18], 4
jmp 0x40288e
mov ecx, edx
mov eax, edx
shr eax, 0x1b
and eax, 4
shr ecx, 0x1d
and ecx, 2
add ecx, eax
mov eax, edx
shr eax, 0x1f
add ecx, eax
lea eax, [esp + 0x28]
push eax
mov ecx, dword [esp + ecx*4 + 0x34]
mov eax, ecx
or eax, 0x200
test edx, 0x4000000
cmove eax, ecx
push eax
push ebx
push dword [edi - 8]
call dword [esp + 0x34]
test eax, eax
je 0x40287a
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
add edi, 0x28
inc ebx
mov dword [esp + 0x1c], ebx
cmp ebx, eax
jl 0x402784
mov edi, dword [esi]
test edi, edi
je 0x402374
mov eax, dword [edi + 0x3c]
mov eax, dword [eax + edi + 0xc0]
test eax, eax
je 0x402852
mov edi, dword [edi + eax + 0xc]
test edi, edi
je 0x402852
mov eax, dword [edi]
test eax, eax
je 0x402852
nop dword [eax + eax]
push 0
push 1
push dword [esi]
call eax
mov eax, dword [edi + 4]
lea edi, [edi + 4]
test eax, eax
jne 0x402840
cmp dword [ebp + 8], 0
je 0x4028de
mov ecx, dword [esi]
test ecx, ecx
je 0x40288e
mov eax, dword [ecx + 0x3c]
mov eax, dword [eax + ecx + 0x28]
test eax, eax
je 0x40288e
add eax, ecx
jne 0x402883
mov dword [esi + 0x18], 6
jmp 0x40288e
mov dword [esi + 0x18], 5
jmp 0x40288e
push 0
push 1
push ecx
call eax
test eax, eax
jne 0x4028de
mov eax, dword [esi + 0xc]
test eax, eax
je 0x402374
cmp dword [esi + 0x14], 0
je 0x402374
mov ecx, dword [esi]
test ecx, ecx
je 0x402374
mov eax, dword [eax + 0x10]
push 0x8000
push 0
push ecx
call eax
mov dword [esi], 0
xor eax, eax
mov dword [esi + 8], 0
mov dword [esi + 4], 0
mov dword [esi + 0x14], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret