Function at 0x401000
Capabilities:
Access peb ldr_data
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x43c
mov eax, dword fs:[0x30]
xor edx, edx
push ebx
push esi
push edi
mov eax, dword [eax + 0xc]
mov ecx, 0x20a
add eax, 0xc
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], eax
mov ebx, dword [eax]
test ebx, ebx
je 0x4010ec
cmp word [ebx + 0x2e], cx
jae 0x4010e2
mov ecx, dword [ebx + 0x30]
lea edx, [esp + 0x28]
sub edx, ecx
jmp 0x401050
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x401050
lea ecx, [esp + 0x28]
cmp word [esp + 0x28], ax
je 0x40108d
jmp 0x401070
movzx edx, word [ecx]
lea eax, [edx - 0x41]
cmp ax, 0x19
lea eax, [edx + 0x20]
jbe 0x401081
mov eax, edx
mov word [ecx], ax
add ecx, 2
cmp word [ecx], 0
jne 0x401070
lea ecx, [esp + 0x28]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401094
sub ecx, edx
xor esi, esi
sar ecx, 1
mov edx, 0xb12d667
lea edi, [ecx*2 + 2]
test edi, edi
je 0x4010d7
movzx ecx, byte [esp + esi + 0x28]
mov eax, edx
shl eax, 5
inc esi
add ecx, eax
mov eax, edx
shr eax, 2
add ecx, eax
xor edx, ecx
cmp esi, edi
jb 0x4010b5
cmp edx, 0xc73d5fac
je 0x401100
mov ebx, dword [ebx]
mov ecx, 0x20a
mov eax, dword [esp + 0x10]
cmp ebx, eax
jne 0x401034
xor edx, edx
mov dword [esp + 0x18], edx
test edx, edx
jne 0x401109
mov eax, 0xc0000225
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebx + 0x18]
mov dword [esp + 0xc], edx
jmp 0x4010ec
mov eax, dword [edx + 0x3c]
mov ecx, dword [eax + edx + 0x78]
test ecx, ecx
je 0x40140e
mov ebx, dword [eax + edx + 0x7c]
test ebx, ebx
je 0x40140e
mov eax, dword [ecx + edx + 0x24]
lea edi, [ecx + edx]
add eax, edx
mov ecx, 0x2e2813d1
push eax
mov eax, dword [edi + 0x20]
mov esi, 0xc0000001
add eax, edx
push eax
push edx
mov edx, dword [edi + 0x18]
call fcn.00403220
movzx eax, ax
test ax, ax
je 0x40118a
mov ecx, eax
cmp ecx, dword [edi + 0x14]
jae 0x40118a
mov eax, dword [edi + 0x1c]
add eax, dword [esp + 0xc]
mov edx, dword [eax + ecx*4]
mov ecx, dword [esp + 0xc]
add ecx, edx
cmp ecx, edi
jbe 0x401180
lea eax, [edi + ebx]
cmp ecx, eax
jae 0x401180
mov edx, ecx
lea ecx, [esp + 0x20]
call fcn.00403340
mov esi, eax
jmp 0x40118a
test edx, edx
je 0x40118a
mov dword [esp + 0x20], ecx
xor esi, esi
test esi, esi
js 0x401413
mov edi, 0x40f078
xor esi, esi
lea esp, [esp]
lea eax, [esp + 0x18]
push eax
push edi
push 0
push 0
call dword [esp + 0x30]
test eax, eax
js 0x401405
add esi, 8
add edi, 8
cmp esi, 0x48
jb 0x4011a0
mov ecx, section..data
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov eax, dword [ecx]
xor edx, edx
mov dword [esp + 0x14], eax
mov eax, dword fs:[0x30]
mov dword [esp + 0x1c], edx
mov eax, dword [eax + 0xc]
add eax, 0xc
mov dword [esp + 0x24], eax
mov ebx, dword [eax]
test ebx, ebx
je 0x4012d3
mov ecx, 0x20a
lea ecx, [ecx]
cmp word [ebx + 0x2e], cx
jae 0x4012c3
mov ecx, dword [ebx + 0x30]
lea edx, [esp + 0x238]
sub edx, ecx
jmp 0x401220
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x401220
cmp word [esp + 0x238], 0
lea eax, [esp + 0x238]
je 0x40125f
movzx edx, word [eax]
lea ecx, [edx - 0x41]
cmp cx, 0x19
lea ecx, [edx + 0x20]
jbe 0x401253
mov ecx, edx
mov word [eax], cx
add eax, 2
cmp word [eax], 0
jne 0x401242
lea ecx, [esp + 0x238]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401270
sub ecx, edx
xor esi, esi
sar ecx, 1
mov edx, 0xb12d667
lea edi, [ecx*2 + 2]
test edi, edi
je 0x4012ae
movzx ecx, byte [esp + esi + 0x238]
mov eax, edx
shl eax, 5
inc esi
add ecx, eax
mov eax, edx
shr eax, 2
add ecx, eax
xor edx, ecx
cmp esi, edi
jb 0x401291
cmp edx, dword [esp + 0x14]
je 0x40137c
mov ebx, dword [ebx]
mov ecx, 0x20a
mov eax, dword [esp + 0x24]
cmp ebx, eax
jne 0x401200
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x18], edx
test edx, edx
je 0x4010f4
cmp dword [ecx + 4], 0
mov esi, dword [ecx + 8]
mov dword [esp + 0x14], 0
jbe 0x4013a3
add esi, 4
jmp 0x401300
mov ecx, dword [esi - 4]
mov dword [esi], 0
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40138a
test esi, esi
je 0x40138a
test ecx, ecx
je 0x40138a
mov eax, dword [edi + 0x3c]
mov edx, dword [eax + edi + 0x78]
test edx, edx
je 0x40138a
mov eax, dword [eax + edi + 0x7c]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x40138a
mov eax, dword [edx + edi + 0x24]
lea ebx, [edx + edi]
mov edx, dword [ebx + 0x20]
add eax, edi
add edx, edi
push eax
push edx
mov edx, dword [ebx + 0x18]
push edi
call fcn.00403220
movzx eax, ax
test ax, ax
je 0x40138a
mov ecx, eax
cmp ecx, dword [ebx + 0x14]
jae 0x40138a
mov eax, dword [ebx + 0x1c]
add eax, edi
mov edx, dword [eax + ecx*4]
lea ecx, [edx + edi]
cmp ecx, ebx
jbe 0x401384
mov eax, dword [esp + 0x1c]
add eax, ebx
cmp ecx, eax
jae 0x401384
mov edx, ecx
mov ecx, esi
call fcn.00403340
jmp 0x40138a
mov edx, dword [ebx + 0x18]
jmp 0x4012cf
test edx, edx
je 0x40138a
mov dword [esi], ecx
mov edi, dword [esp + 0x14]
add esi, 8
mov ecx, dword [esp + 0xc]
inc edi
mov dword [esp + 0x14], edi
cmp edi, dword [ecx + 4]
jb 0x401300
mov esi, dword [esp + 0x10]
add ecx, 0xc
add esi, 0xc
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], esi
cmp esi, 0x78
jb 0x4011d2
xor edi, edi
mov esi, dword [edi + 0x40f004]
xor eax, eax
mov edx, dword [edi + 0x40f008]
test esi, esi
je 0x4013fd
mov ecx, dword [edx + eax*8]
cmp ecx, 0x5b0c1d36
je 0x4013f8
cmp ecx, 0x76b00e64
je 0x4013f8
cmp ecx, 0xe3298473
je 0x4013f8
cmp dword [edx + eax*8 + 4], 0
je 0x4010f4
inc eax
cmp eax, esi
jb 0x4013d2
add edi, 0xc
cmp edi, 0x78
jb 0x4013c0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 0xc000007b
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret