Function at 0x4036e1
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ecx, 0xffffff9a
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [ebp + 0x10]
cmp dword [ebp + 8], 0
je 0x403dbd
cmp dword [ebp + 0x28], 0
setne dl
xor eax, eax
cmp dword [ebp + 0x28], 8
setne al
test edx, eax
jne 0x403dbd
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2c], 1
jne 0x403730
push eax
call fcn.004036d0
mov edi, eax
pop eax
mov ecx, edi
test edi, edi
jne 0x403dbd
cmp dword [ebp + 0xc], 0
jne 0x40373d
mov dword [ebp + 0xc], 0x63a0af
mov dword [ebp - 0x30], 0
cmp dword [ebp + 0x24], 0
je 0x40375b
cld
or ecx, 0xffffffff
xor eax, eax
mov edi, dword [ebp + 0x24]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [ebp - 0x30], ecx
cld
or ecx, 0xffffffff
xor eax, eax
mov edi, dword [ebp + 0xc]
repne scasb al, byte es:[edi]
not ecx
test esi, esi
lea ebx, [ecx - 1]
jne 0x40377e
mov edx, dword [ebp + 8]
mov dword [edx + 0x4088], 0
jmp 0x4037db
mov eax, dword [esi + 0x18]
test eax, eax
je 0x403790
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x4088], eax
jmp 0x4037db
mov edx, dword [esi + 0x14]
cmp edx, 0x7bc
jbe 0x4037a3
sub edx, 0x7bc
jmp 0x4037ab
cmp edx, 0x50
jbe 0x4037ab
sub edx, 0x50
mov eax, dword [esi + 0x10]
mov ecx, dword [esi]
shl eax, 5
shl edx, 9
add eax, dword [esi + 0xc]
shr ecx, 1
lea eax, [eax + edx + 0x20]
mov edx, dword [esi + 8]
shl edx, 6
shl eax, 0x10
add edx, dword [esi + 4]
shl edx, 5
add edx, ecx
or eax, edx
mov edx, dword [ebp + 8]
mov dword [edx + 0x4088], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x2c]
sub eax, 8
mov dword [ecx + 0x7c], 0
cmp eax, 1
ja 0x4037f7
mov dword [ecx + 0x7c], 2
cmp dword [ebp + 0x2c], 2
jne 0x403806
mov eax, dword [ebp + 8]
or dword [eax + 0x7c], 4
jmp 0x403813
cmp dword [ebp + 0x2c], 1
jne 0x403813
mov edx, dword [ebp + 8]
or dword [edx + 0x7c], 6
cmp dword [ebp + 0x40], 0
je 0x403820
mov ecx, dword [ebp + 8]
or dword [ecx + 0x7c], 1
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x28]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x80], edx
mov dword [eax + 0x408c], 0
mov dword [eax + 0x4090], 0
mov dword [eax + 0x68], 0
mov dword [eax + 0x6c], 0
mov eax, dword [ebp + 0x30]
mov dword [ecx + 0x84], eax
push dword [ecx + 0x20]
push dword [ecx + 0x1c]
call dword [ecx + 0xc]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x20]
mov dword [edx + 0x70], eax
mov edx, dword [ebp - 0x30]
lea eax, [ebx + ecx]
mov ecx, dword [ebp + 8]
lea eax, [eax + edx + 0x2e]
mov dword [ecx + 0x78], eax
push eax
call sub.msvcrt.dll_malloc
mov edx, dword [ebp + 8]
mov dword [edx + 0x74], eax
mov edx, 0x2014b50
push 4
call fcn.00402c30
mov ecx, dword [ebp + 8]
xor edx, edx
mov eax, dword [ecx + 0x74]
push 2
add eax, 4
call fcn.00402c30
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x74]
mov edx, 0x14
add eax, 6
push 2
call fcn.00402c30
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x74]
mov edx, dword [ecx + 0x7c]
add eax, 8
push 2
call fcn.00402c30
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x80]
mov eax, dword [eax + 0x74]
add eax, 0xa
push 2
call fcn.00402c30
mov eax, dword [ebp + 8]
add esp, 0x20
mov edx, dword [eax + 0x4088]
mov eax, dword [eax + 0x74]
add eax, 0xc
push 4
call fcn.00402c30
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x74]
xor edx, edx
add eax, 0x10
push 4
call fcn.00402c30
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x74]
xor edx, edx
add eax, 0x14
push 4
call fcn.00402c30
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x74]
xor edx, edx
add eax, 0x18
push 4
call fcn.00402c30
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x74]
mov edx, ebx
add eax, 0x1c
push 2
call fcn.00402c30
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x74]
mov edx, dword [ebp + 0x20]
add eax, 0x1e
push 2
call fcn.00402c30
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x74]
mov edx, dword [ebp - 0x30]
add eax, 0x20
push 2
call fcn.00402c30
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x74]
xor edx, edx
add eax, 0x22
push 2
call fcn.00402c30
mov ecx, dword [ebp + 8]
add esp, 0x20
mov eax, dword [ecx + 0x74]
test esi, esi
jne 0x403993
add eax, 0x24
push 2
xor edx, edx
jmp 0x40399b
mov edx, dword [esi + 0x1c]
add eax, 0x24
push 2
call fcn.00402c30
mov edx, dword [ebp + 8]
pop edi
test esi, esi
mov eax, dword [edx + 0x74]
jne 0x4039b4
add eax, 0x26
push 4
xor edx, edx
jmp 0x4039bc
mov edx, dword [esi + 0x20]
add eax, 0x26
push 4
call fcn.00402c30
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x70]
mov eax, dword [ecx + 0x74]
sub edx, dword [ecx + 0x40ac]
add eax, 0x2a
mov dword [esp], 4
call fcn.00402c30
xor ecx, ecx
pop esi
cmp ecx, ebx
jae 0x4039f9
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x74]
mov esi, dword [ebp + 0xc]
mov al, byte [ecx + esi]
mov byte [edx + ecx + 0x2e], al
inc ecx
jmp 0x4039e2
xor ecx, ecx
cmp ecx, dword [ebp + 0x20]
jae 0x403a15
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x1c]
mov edx, dword [eax + 0x74]
mov al, byte [ecx + esi]
add edx, ebx
mov byte [edx + ecx + 0x2e], al
inc ecx
jmp 0x4039fb
xor ecx, ecx
cmp ecx, dword [ebp - 0x30]
jae 0x403a35
mov edx, dword [ebp + 0x20]
mov esi, dword [ebp + 8]
lea eax, [ebx + edx]
add eax, dword [esi + 0x74]
mov esi, dword [ebp + 0x24]
mov dl, byte [ecx + esi]
mov byte [eax + ecx + 0x2e], dl
inc ecx
jmp 0x403a17
mov eax, dword [ebp + 8]
mov ecx, 0xffffff98
cmp dword [eax + 0x74], 0
je 0x403dbd
mov edx, dword [eax + 0x20]
push 4
push 0x4034b50
call fcn.00402be1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x403b3f
mov ecx, dword [ebp + 8]
mov eax, ecx
mov edx, dword [ecx + 0x20]
push 2
push 0x14
call fcn.00402be1
pop ecx
mov edi, eax
pop esi
test eax, eax
jne 0x403b3f
mov esi, dword [ebp + 8]
mov eax, esi
mov edx, dword [esi + 0x20]
push 2
push dword [esi + 0x7c]
call fcn.00402be1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x403b3f
mov edx, dword [esi + 0x20]
push 2
push dword [esi + 0x80]
mov eax, esi
call fcn.00402be1
pop ecx
mov edi, eax
pop eax
test edi, edi
jne 0x403b3f
mov edx, dword [esi + 0x20]
push 4
push dword [esi + 0x4088]
mov eax, esi
call fcn.00402be1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x403b3f
mov edx, dword [esi + 0x20]
mov eax, esi
push 4
push 0
call fcn.00402be1
pop ecx
mov edi, eax
pop eax
test edi, edi
jne 0x403b3f
mov edx, dword [esi + 0x20]
mov eax, esi
push 4
push 0
call fcn.00402be1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x403b3f
mov edx, dword [esi + 0x20]
mov eax, esi
push 4
push 0
call fcn.00402be1
pop ecx
mov edi, eax
pop eax
test edi, edi
jne 0x403b3f
mov edx, dword [esi + 0x20]
mov eax, esi
push 2
push ebx
call fcn.00402be1
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x403b3f
mov edx, dword [esi + 0x20]
push 2
push dword [ebp + 0x18]
mov eax, esi
call fcn.00402be1
pop esi
mov edi, eax
pop eax
test edi, edi
sete dl
xor eax, eax
test ebx, ebx
setne al
test edx, eax
je 0x403b69
push ebx
mov eax, dword [ebp + 8]
push dword [ebp + 0xc]
push dword [eax + 0x20]
push dword [eax + 0x1c]
call dword [eax + 8]
add esp, 0x10
cmp eax, ebx
je 0x403b69
or edi, 0xffffffff
test edi, edi
sete dl
xor eax, eax
cmp dword [ebp + 0x18], 0
setne al
test edx, eax
je 0x403b98
push dword [ebp + 0x18]
push dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
push dword [ecx + 0x20]
push dword [ecx + 0x1c]
call dword [ecx + 8]
add esp, 0x10
cmp eax, dword [ebp + 0x18]
je 0x403b98
or edi, 0xffffffff
mov esi, dword [ebp + 8]
mov eax, esi
add eax, 0x88
mov dword [esi + 0x34], 0
mov dword [esi + 0x40], 0x4000
mov dword [esi + 0x3c], eax
mov dword [esi + 0x38], 0
mov dword [esi + 0x44], 0
test edi, edi
jne 0x403c26
cmp dword [esi + 0x80], 8
jne 0x403c26
cmp dword [esi + 0x84], 0
jne 0x403c26
mov dword [esi + 0x50], 0
mov dword [esi + 0x54], 0
mov dword [esi + 0x58], 0
mov eax, dword [ebp + 0x34]
sar eax, 0x1f
push 0x38
push 0x63a0b1
xor dword [ebp + 0x34], eax
push dword [ebp + 0x3c]
push dword [ebp + 0x38]
sub eax, dword [ebp + 0x34]
push eax
push 8
push dword [ebp + 0x2c]
mov eax, esi
add eax, 0x30
push eax
call fcn.004ab4ab
add esp, 0x20
mov edi, eax
test eax, eax
jne 0x403c26
mov dword [esi + 0x68], 1
mov eax, dword [ebp + 8]
test edi, edi
sete dl
mov dword [eax + 0x40a4], 0
xor eax, eax
cmp dword [ebp + 0x40], 0
setne al
test edx, eax
je 0x403dad
mov edx, dword [ebp + 8]
mov dword [edx + 0x4090], 1
call fcn.004aa3c0
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov dword [ecx + 0x40a0], eax
mov eax, dword [0x667010]
add ecx, 0x4094
inc eax
mov dword [ebp - 0x38], ecx
mov dword [0x667010], eax
dec eax
jne 0x403c93
push 0
call sub.msvcrt.dll_time
xor eax, 0xbb40e64e
mov dword [esp], eax
call sub.msvcrt.dll_srand
pop ecx
push dword [ebp - 0x34]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp + 0x40]
call fcn.00402ac0
pop edx
mov dword [ebp - 0x3c], 0
call sub.msvcrt.dll_rand
mov edx, dword [ebp - 0x34]
mov ebx, eax
mov eax, dword [ebp - 0x38]
sar ebx, 7
call fcn.00402a60
and ebx, 0xff
mov esi, eax
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
push ebx
xor ebx, esi
call fcn.00402a77
mov esi, dword [ebp - 0x3c]
mov byte [esi + ebp - 0x2c], bl
inc esi
pop eax
mov dword [ebp - 0x3c], esi
cmp esi, 9
jle 0x403ca9
push dword [ebp - 0x34]
mov eax, dword [ebp + 0x40]
mov edx, dword [ebp - 0x38]
call fcn.00402ac0
pop eax
mov dword [ebp - 0x3c], 0
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
call fcn.00402a60
mov edx, dword [ebp - 0x3c]
mov esi, eax
movzx eax, byte [edx + ebp - 0x2c]
mov edx, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x38]
call fcn.00402a77
mov ecx, dword [ebp - 0x3c]
pop eax
movzx eax, byte [ecx + ebp - 0x2c]
xor eax, esi
mov byte [ecx + ebp - 0x1c], al
inc ecx
mov dword [ebp - 0x3c], ecx
cmp ecx, 9
jle 0x403cfb
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
call fcn.00402a60
mov edx, dword [ebp - 0x34]
shr dword [ebp + 0x44], 0x10
movzx ebx, byte [ebp + 0x44]
mov esi, eax
push ebx
mov eax, dword [ebp - 0x38]
xor ebx, esi
call fcn.00402a77
pop eax
mov edx, dword [ebp - 0x34]
mov byte [ebp - 0x12], bl
mov eax, dword [ebp - 0x38]
call fcn.00402a60
mov ebx, dword [ebp + 0x44]
mov esi, eax
mov edx, dword [ebp - 0x34]
shr ebx, 8
mov eax, dword [ebp - 0x38]
push ebx
xor ebx, esi
call fcn.00402a77
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x1c]
mov byte [ebp - 0x11], bl
mov dword [esi + 0x40a4], 0xc
mov dword [esp], 0xc
push eax
push dword [esi + 0x20]
push dword [esi + 0x1c]
call dword [esi + 8]
add esp, 0x10
cmp eax, 0xc
je 0x403dad
or edi, 0xffffffff
jmp 0x403dbb
test edi, edi
jne 0x403dbb
mov eax, dword [ebp + 8]
mov dword [eax + 0x2c], 1
mov ecx, edi
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret