Function at 0x40163a
Capabilities:
Access peb ldr_data
Check os version
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
jmp 0x40164f
push ecx
mov ecx, 1
mov ecx, 2
mov ecx, 4
mov ecx, 2
mov ecx, 5
mov ecx, 4
mov ecx, 2
mov ecx, 5
mov ecx, 5
pop ecx
push esi
mov esi, 1
mov esi, 2
mov esi, 4
mov esi, 2
mov esi, 5
mov esi, 4
mov esi, 2
mov esi, 5
mov esi, 5
pop esi
nop
nop
nop
nop
jmp 0x4016df
and esp, 0xfffffff8
sub esp, 0xa4
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push ebx
push esi
cdq
push edi
mov dword [esp + 0x50], eax
movlpd qword [esp + 0x58], xmm0
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x38], eax
mov edx, dword [esp + 0x38]
mov edi, edx
test edi, edi
je 0x4017b9
mov ecx, edi
mov eax, dword [ecx + 0x28]
movzx esi, word [eax]
cmp si, 0x4b
je 0x401849
cmp si, 0x6b
jne 0x40173d
cmp word [eax + 2], 0x45
je 0x401849
cmp word [eax + 2], 0x65
jne 0x40174f
cmp word [eax + 4], 0x52
je 0x401849
cmp word [eax + 4], 0x72
jne 0x401761
cmp word [eax + 6], 0x4e
je 0x401849
cmp word [eax + 6], 0x6e
jne 0x401773
cmp word [eax + 8], 0x45
je 0x401849
cmp word [eax + 8], 0x65
jne 0x401785
cmp word [eax + 0xa], 0x6c
je 0x401849
cmp word [eax + 0xa], 0x4c
jne 0x4017a5
cmp word [eax + 0xc], 0x33
jne 0x4017a5
cmp word [eax + 0xe], 0x32
jne 0x4017a5
cmp word [eax + 0x10], 0x2e
je 0x401849
mov edx, dword [edx]
mov ecx, edx
mov dword [esp + 0x38], edx
cmp edi, ecx
je 0x4017b9
test ecx, ecx
jne 0x40171c
mov edi, dword [esp + 0x20]
test edi, edi
je 0x401ef2
mov eax, dword [edi + 0x3c]
xor esi, esi
mov eax, dword [eax + edi + 0x78]
mov ebx, dword [eax + edi + 0x1c]
mov edx, dword [eax + edi + 0x20]
add ebx, edi
mov ecx, dword [eax + edi + 0x24]
add edx, edi
mov eax, dword [eax + edi + 0x18]
add ecx, edi
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], eax
test eax, eax
je 0x401963
nop dword [eax]
mov eax, dword [edx + esi*4]
or ecx, 0xffffffff
mov edx, dword [eax + edi]
add eax, edi
cmp edx, 0x74726956
jne 0x40185f
mov edx, dword [eax + 4]
cmp edx, 0x416c6175
jne 0x40182e
cmp dword [eax + 8], 0x636f6c6c
jne 0x40182e
cmp byte [eax + 0xc], 0
jne 0x40182e
mov ecx, 2
cmp edx, 0x466c6175
jne 0x401851
cmp dword [eax + 8], 0x656572
jne 0x401851
mov ecx, 6
jmp 0x40193b
mov edi, dword [ecx + 0x10]
jmp 0x4017bd
cmp ecx, 0xffffffff
je 0x401954
jmp 0x40193b
cmp edx, 0x4d6c7452
jne 0x401896
cmp dword [eax + 4], 0x4d65766f
jne 0x401954
cmp dword [eax + 8], 0x726f6d65
jne 0x401954
cmp word [eax + 0xc], 0x79
jne 0x401954
mov ecx, 3
jmp 0x40193b
cmp edx, 0x64616f4c
jne 0x4018c9
cmp dword [eax + 4], 0x7262694c
jne 0x401954
cmp dword [eax + 8], 0x41797261
jne 0x401954
cmp byte [eax + 0xc], 0
jne 0x401954
mov ecx, 4
jmp 0x40193b
cmp edx, 0x50746547
jne 0x4018fb
cmp dword [eax + 4], 0x41636f72
jne 0x401954
cmp dword [eax + 8], 0x65726464
jne 0x401954
mov ecx, 0x7373
cmp word [eax + 0xc], cx
jne 0x401954
cmp byte [eax + 0xe], 0
jne 0x401954
mov ecx, 5
jmp 0x40193b
cmp edx, 0x4d746547
jne 0x401954
cmp dword [eax + 4], 0x6c75646f
jne 0x401954
cmp dword [eax + 8], 0x6c694665
jne 0x401954
cmp dword [eax + 0xc], 0x6d614e65
jne 0x401954
cmp byte [eax + 0x10], 0x65
jne 0x401954
mov al, byte [eax + 0x11]
cmp al, 0x41
jne 0x401932
mov ecx, 7
jmp 0x40193b
cmp al, 0x57
jne 0x401954
mov ecx, 8
mov eax, dword [esp + 0x20]
mov dword [esp + ecx*8 + 0x54], 0
movzx eax, word [eax + esi*2]
mov eax, dword [ebx + eax*4]
add eax, edi
mov dword [esp + ecx*8 + 0x50], eax
mov edx, dword [esp + 0x28]
inc esi
cmp esi, dword [esp + 0x1c]
jb 0x4017fc
mov edi, dword [esp + 0x60]
mov eax, edi
or eax, dword [esp + 0x64]
je 0x401ee6
mov eax, dword [esp + 0x68]
mov dword [esp + 0x18], eax
or eax, dword [esp + 0x6c]
je 0x401ee6
mov eax, dword [esp + 0x70]
mov dword [esp + 0x3c], eax
or eax, dword [esp + 0x74]
je 0x401ee6
mov eax, dword [esp + 0x78]
mov dword [esp + 0x2c], eax
or eax, dword [esp + 0x7c]
je 0x401ee6
mov eax, dword [esp + 0x80]
mov dword [esp + 0x20], eax
or eax, dword [esp + 0x84]
je 0x401ee6
mov esi, dword [esp + 0x50]
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x401ef2
mov ebx, dword [esi + 0x3c]
add ebx, esi
cmp dword [ebx], 0x4550
jne 0x401ef2
test byte [ebx + 0x38], 1
jne 0x401ef2
cmp dword [ebp + 0xc], 3
jne 0x401a21
mov eax, dword [ebx + 0x28]
push 0
push 0
add eax, esi
push esi
call eax
cmp eax, 1
jne 0x401ef2
push 0x8000
push 0
push esi
call dword [esp + 0x2c]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x50]
add eax, 0xfff
push 4
and eax, 0xfffff000
add eax, 0x1000
push 0x3000
push eax
push dword [ebx + 0x34]
mov dword [esp + 0x44], eax
call edi
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
jne 0x401a6a
push 4
push 0x3000
push dword [esp + 0x3c]
push eax
call edi
mov edx, eax
mov dword [esp + 0x10], eax
test edx, edx
je 0x401ef2
cmp dword [ebp + 0xc], 0
mov eax, dword [esp + 0x34]
mov dword [edx + eax - 0x800], 0x80054f5c
mov dword [edx + eax - 0x7fc], 0x7948003a
mov dword [edx + eax - 0x7f8], 0x59294e91
mov dword [edx + eax - 0x7f4], 0x4e0a
jne 0x401ab5
xorps xmm0, xmm0
movlpd qword [esp + 0x88], xmm0
movlpd qword [esp + 0x90], xmm0
mov esi, dword [esp + 0x8c]
lea edi, [eax - 0x401]
add edi, edx
mov dword [esp + 0x44], esi
mov eax, edi
mov dword [esp + 0x28], edi
add eax, 0x200
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x40], eax
or eax, esi
je 0x401b6c
mov dword [edi], 0xb8
mov eax, dword [esp + 0x40]
mov dword [edi + 4], 0x247c8100
mov dword [edi + 8], 4
mov dword [edi + 0xc], 0xff327500
mov dword [edi + 0x10], 0xff0c2474
mov dword [edi + 0x14], 0x6a0c2474
mov dword [edi + 0x18], 0x8bd0ff00
mov dword [edi + 0x1c], 0x308244c
mov dword [edi + 0x20], 0x4e983c8
mov dword [edi + 0x24], 0x752e3980
mov dword [edi + 0x28], 0xcc203
mov dword [edi + 0x2c], 0x8304c183
mov dword [edi + 0x30], 0x1c704c0
mov dword [edi + 0x34], 0x2e
mov dword [edi + 0x38], 0x8304c183
mov dword [edi + 0x3c], 0xcc20021
mov dword [edi + 0x40], 0x90e0ff00
mov dword [edi + 1], eax
mov dword [edi + 9], edx
jmp 0x401b83
xorps xmm0, xmm0
movlpd qword [esp + 0x98], xmm0
mov eax, dword [esp + 0x98]
mov dword [esp + 0x28], eax
mov edi, dword [esp + 0x90]
mov eax, edi
mov ecx, dword [esp + 0x94]
or eax, ecx
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], ecx
je 0x401bf7
mov eax, dword [esp + 0x30]
mov dword [eax], 0x57ec8b55
mov dword [eax + 4], 0x8b1075ff
mov dword [eax + 8], 0xb80c7d
mov dword [eax + 0xc], 0x57000000
mov dword [eax + 0x10], 0xff0875ff
mov dword [eax + 0x14], 0x87d81d0
mov dword [eax + 0x18], edx
mov dword [eax + 0x1c], 0xc0850f75
mov dword [eax + 0x20], 0x7c70b75
mov dword [eax + 0x24], 0x2e
mov dword [eax + 0x28], 0x1b8
mov dword [eax + 0x2c], 0xc35d5f00
mov dword [eax + 0xb], edi
jmp 0x401c0e
xorps xmm0, xmm0
movlpd qword [esp + 0xa0], xmm0
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x30], eax
mov edi, dword [esp + 0x68]
mov ecx, 0x544e
mov esi, dword [esp + 0x50]
movzx eax, word [edi]
cmp ax, cx
je 0x401c2d
mov ecx, 0x746e
cmp ax, cx
jne 0x401c5a
push edx
mov dword [edx], 0x4c44544e
mov dword [edx + 4], 0x4c
call dword [esp + 0x40]
lea ecx, [edi + 6]
push ecx
push eax
call dword [esp + 0x34]
mov edx, dword [esp + 0x10]
mov edi, eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x6c], 0
push 0x1000
push esi
push edx
call edi
mov edx, dword [esp + 0x10]
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x14], ecx
mov esi, edx
mov edi, dword [edx + 0x3c]
add edi, edx
mov dword [esp + 0x24], edi
mov dword [edi + 0x34], edx
cmp ax, word [ebx + 6]
jge 0x401cce
lea esi, [edi + 0x108]
nop dword [eax]
mov edi, dword [esi - 4]
mov eax, dword [esi]
add edi, edx
test eax, eax
jne 0x401c9e
cmp dword [ebx + 0x38], eax
jle 0x401cb7
jmp 0x401cb4
push eax
mov eax, dword [esi + 4]
add eax, dword [esp + 0x54]
push eax
push edi
call dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov dword [esi - 8], edi
movsx eax, word [ebx + 6]
inc ecx
add esi, 0x28
mov dword [esp + 0x14], ecx
cmp ecx, eax
jl 0x401c8c
mov edi, dword [esp + 0x24]
mov esi, dword [edi + 0x34]
sub esi, dword [ebx + 0x34]
mov dword [esp + 0x18], esi
je 0x401d72
mov eax, dword [edi + 0xa0]
test eax, eax
je 0x401de3
cmp dword [edi + 0xa4], 0
je 0x401de3
lea ebx, [eax + edx]
mov eax, dword [ebx]
test eax, eax
jle 0x401d6c
mov esi, dword [ebx + 4]
lea edi, [ebx + 8]
add eax, edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
lea eax, [esi - 8]
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x401d5b
movzx eax, word [edi]
mov ecx, eax
and eax, 0xfff
add eax, dword [esp + 0x1c]
shr ecx, 0xc
cmp ecx, 3
je 0x401d3a
cmp ecx, 0xa
jne 0x401d5b
mov ecx, dword [esp + 0x18]
add edi, 2
add dword [eax], ecx
mov esi, dword [ebx + 4]
mov ecx, dword [esp + 0x14]
inc ecx
mov dword [esp + 0x14], ecx
lea eax, [esi - 8]
cdq
sub eax, edx
sar eax, 1
cmp ecx, eax
jl 0x401d1f
mov eax, dword [ebx + esi]
add ebx, esi
mov edx, dword [esp + 0x10]
test eax, eax
jg 0x401cff
mov edi, dword [esp + 0x24]
xor esi, esi
mov dword [esp + 0x18], esi
cmp dword [edi + 0x84], 0
je 0x401ea5
mov edi, dword [edi + 0x80]
add edi, edx
mov dword [esp + 0x1c], edi
mov eax, dword [edi + 0xc]
test eax, eax
je 0x401ea1
mov ecx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x58]
mov dword [esp + 0xa8], ecx
nop dword [eax]
add eax, edx
push eax
call dword [esp + 0x40]
mov dword [esp + 0x14], eax
test eax, eax
je 0x401ebe
mov ecx, dword [edi]
mov esi, dword [edi + 0x10]
mov edx, dword [esp + 0x10]
add esi, edx
test ecx, ecx
lea edi, [ecx + edx]
cmove edi, esi
mov eax, dword [edi]
test eax, eax
je 0x401e82
jns 0x401e05
movzx eax, ax
jmp 0x401e0a
mov esi, 1
mov eax, dword [esp + 0x10]
push 0x8000
push dword [esp + 0x38]
push eax
call dword [esp + 0x2c]
mov eax, esi
neg eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add edx, 2
add eax, edx
push eax
push dword [esp + 0x18]
call dword [esp + 0x34]
mov dword [esi], eax
test eax, eax
je 0x401ebe
xor ecx, ecx
cmp eax, dword [esp + 0x40]
jne 0x401e31
cmp ecx, dword [esp + 0x44]
jne 0x401e31
mov eax, dword [esp + 0x28]
mov dword [esi], eax
xor ecx, ecx
cmp eax, dword [esp + 0x48]
jne 0x401e45
cmp ecx, dword [esp + 0x4c]
jne 0x401e45
mov eax, dword [esp + 0x30]
mov dword [esi], eax
mov ecx, ebx
or ecx, dword [esp + 0xa8]
je 0x401e6d
mov edx, dword [ebx]
xor ecx, ecx
test edx, edx
jle 0x401e6d
nop dword [eax]
cmp dword [ebx + ecx*8 + 4], eax
jne 0x401e68
mov eax, dword [ebx + ecx*8 + 8]
mov dword [esi], eax
inc ecx
cmp ecx, edx
jl 0x401e5c
mov eax, dword [edi + 4]
add edi, 4
mov edx, dword [esp + 0x10]
add esi, 4
test eax, eax
jne 0x401ddc
mov esi, dword [esp + 0x18]
cmp esi, 2
je 0x401ea1
mov edi, dword [esp + 0x1c]
add edi, 0x14
mov dword [esp + 0x1c], edi
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x401dac
mov edi, dword [esp + 0x24]
test esi, esi
jne 0x401de8
mov ecx, dword [ebp + 0xc]
cmp ecx, 2
jne 0x401ec8
mov eax, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 2
jmp 0x401de8
xor eax, eax
test ecx, ecx
push 0
cmovne eax, edx
push 1
push eax
mov eax, dword [edi + 0x28]
add eax, edx
call eax
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xffffff01
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret