Function at 0x40ea93
Capabilities:
Access peb ldr_data
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc88
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
test eax, eax
je 0x40eadc
mov ebx, dword [edx + 4]
mov edi, ecx
mov dword [esp + 0x10], eax
lea eax, [edx + 4]
mov esi, edx
mov ecx, edx
mov dword [esp + 4], eax
mov edx, edi
push 0
call fcn.0040ea66
pop ecx
test ax, ax
je 0x40eae5
mov ecx, dword [esp + 4]
mov edx, eax
mov dword [ecx], ebx
jmp 0x40eb6b
mov dx, 8
jmp 0x40eb75
mov eax, dword [esi + 4]
mov edx, dword [esi]
mov dword [esp + 0xc], ebx
lea ebx, [esp + 0xa70]
mov dword [esp + 0x20], edi
mov ecx, ebx
dec eax
push eax
call fcn.0040f226
pop eax
movzx edx, word [ebx + 0x210]
test dx, dx
je 0x40eb19
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
jmp 0x40eb69
mov dword [esp + 0x18], esi
lea eax, [esp + 0x60]
push 0x210
push ebx
push eax
call fcn.0040307b
add esp, 0xc
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
lea esi, [esp + 0x40]
mov ecx, esi
mov eax, dword [eax + 0x10]
mov edx, dword [eax + 0x2c]
lea eax, [esp + 0x64]
push 1
push 0
push eax
call fcn.0040f4dd
add esp, 0xc
cmp word [esi + 4], 0
mov ecx, dword [esp + 0xc]
je 0x40eb7f
mov eax, dword [esp + 4]
mov dx, 8
mov dword [eax], ecx
mov ebx, dword [ebp + 8]
mov eax, dword [esp + 0x10]
mov dword [ebx + 4], eax
mov eax, edx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x40]
mov eax, dword [esp + 4]
mov ebx, dword [ebp + 8]
mov dword [eax], ecx
mov ecx, ebx
mov edx, esi
push 0x2a
call fcn.0040ea66
pop ecx
test ax, ax
je 0x40eba4
push edi
jmp 0x40ebbd
mov dword [esp + 8], edi
mov ecx, ebx
mov edx, esi
push 0
call fcn.0040ea66
pop ecx
test ax, ax
je 0x40ebd2
push dword [esp + 8]
mov esi, eax
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov edx, esi
mov dword [eax], ecx
jmp 0x40eb6e
mov eax, dword [ebx]
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 4]
and dword [esp + 0x34], 0
lea eax, [eax + eax - 2]
cmp eax, 0xffff
jbe 0x40ec02
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov dx, 0xb
jmp 0x40ebce
mov edi, eax
mov ebx, 0x800
mov dword [esp + 0x30], 0
mov dword [esp + 0x1c], 0
mov eax, edi
mov esi, dword [esp + 8]
mov word [esp + 0x38], ax
mov word [esp + 0x3a], ax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], eax
push 0
lea eax, [esp + 0x3c]
push eax
push 0
push 1
push 0x800
lea eax, [esp + 0x284]
push eax
lea eax, [esp + 0x60]
push eax
push 0
push 0
push 0
push esi
call sub.ntdll.dll_NtQueryDirectoryFile
test eax, eax
jne 0x40ecd0
mov edx, dword [esp + 0x10]
xor esi, esi
cmp esi, 0x7ff
ja 0x40ec19
mov ecx, dword [esp + esi + 0x270]
mov eax, esi
add esi, ecx
test ecx, ecx
cmove esi, ebx
test byte [esp + eax + 0x2a8], 0x10
jne 0x40ec64
lea ecx, [esp + eax + 0x270]
mov eax, dword [ecx + 0x3c]
shr eax, 1
sub eax, edx
je 0x40ecc8
mov edx, dword [esp + 0x10]
lea edx, [ecx + edx*2 + 0x40]
lea ecx, [esp + 0x24]
push eax
call fcn.0040f5be
mov edx, dword [esp + 0x14]
add esp, 4
cmp byte [esp + 0x25], 0
je 0x40ec64
movzx eax, byte [esp + 0x24]
mov byte [esp + eax + 0x34], 1
mov al, 1
mov dword [esp + 0x30], eax
jmp 0x40ec64
mov al, 1
mov dword [esp + 0x1c], eax
jmp 0x40ec64
cmp eax, 0x80000006
je 0x40ed0c
mov ebx, dword [ebp + 8]
cmp eax, 0xc000000f
je 0x40ed89
mov esi, dword [esp + 4]
mov edi, dword [esp + 0xc]
cmp eax, 0xc0000022
jne 0x40eda0
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov dword [esi], edi
mov dx, 9
jmp 0x40eb6e
test byte [esp + 0x1c], 1
mov si, 8
je 0x40ee67
mov ebx, dword [esp + 0xc]
test ebx, ebx
je 0x40ed50
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
movzx eax, word [eax + ecx*2 - 2]
cmp eax, 0x2f
je 0x40ed50
cmp eax, 0x5c
je 0x40ed50
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
push 0x5c
call fcn.0040ea66
pop ecx
test ax, ax
jne 0x40edc5
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov ecx, edi
mov edx, esi
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.0040ea16
pop ecx
pop edx
test ax, ax
mov dword [esp + 0x28], eax
je 0x40edb4
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov dword [eax], ebx
jmp 0x40eff8
push esi
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov dx, 8
jmp 0x40ebce
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov dword [esi], edi
mov dx, 0xe
jmp 0x40eb6e
mov ecx, edi
mov edx, esi
push 0
call fcn.0040ea66
pop ecx
test ax, ax
je 0x40ede0
mov esi, eax
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov dword [eax], ebx
mov ebx, dword [ebp + 8]
mov edx, esi
jmp 0x40eb6e
mov ecx, dword [edi]
mov edx, dword [ebp + 0x14]
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
call fcn.0040f6a9
add esp, 0x10
mov esi, eax
movzx eax, ax
lea ecx, [eax - 8]
cmp ecx, 2
jb 0x40ee67
cmp eax, 0x6d
je 0x40ee28
test eax, eax
je 0x40f028
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov dword [eax], ecx
jmp 0x40edd6
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
xor edx, edx
add eax, eax
add eax, dword [ecx]
cmp dword [esp + 0x10], edx
je 0x40ee63
inc edx
cmp word [eax - 2], 0x2e
lea ecx, [eax - 2]
mov eax, ecx
jne 0x40ee35
push 4
push str..EXE
call fcn.0040f728
pop ecx
pop edx
test al, 1
mov si, 0x6d
je 0x40ee67
jmp 0x40efba
mov si, 0x6d
mov dword [esp + 0x28], esi
test byte [esp + 0x30], 1
mov esi, dword [esp + 0xc]
je 0x40efd4
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
lea edi, [esp + 0x50]
lea ebx, [esp + 0x14]
mov dword [edi], eax
mov dword [edi + 4], ecx
and dword [edi + 8], 0
mov word [edi + 0xc], 0x3b
mov ecx, edi
call fcn.0040f1a7
test eax, eax
je 0x40efe5
mov esi, edx
mov ecx, ebx
mov dword [esp + 0x2c], eax
mov edx, eax
mov dword [esp + 0x1c], esi
push esi
call fcn.0040f5be
pop eax
cmp byte [esp + 0x15], 0
je 0x40ee97
movzx eax, byte [esp + 0x14]
cmp byte [esp + eax + 0x34], 1
jne 0x40ee97
mov ebx, dword [esp + 0xc]
mov eax, dword [esp + 4]
test ebx, ebx
mov dword [eax], ebx
je 0x40ef0a
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
movzx eax, word [eax + ebx*2 - 2]
cmp eax, 0x2f
je 0x40ef0a
cmp eax, 0x5c
je 0x40ef0a
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
push 0x5c
call fcn.0040ea66
pop ecx
test ax, ax
jne 0x40f00c
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov ecx, edi
mov edx, esi
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.0040ea16
pop ecx
pop edx
test ax, ax
jne 0x40f004
mov ecx, edi
mov edx, esi
push dword [esp + 0x1c]
push dword [esp + 0x30]
call fcn.0040ea16
pop ecx
pop edx
test ax, ax
jne 0x40f004
mov ecx, edi
mov edx, esi
push 0
call fcn.0040ea66
pop ecx
test ax, ax
jne 0x40f00c
mov eax, dword [ebp + 0x24]
mov ecx, dword [edi]
mov edx, dword [ebp + 0x14]
push eax
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
call fcn.0040f6a9
add esp, 0x10
mov esi, eax
movzx eax, ax
lea edi, [esp + 0x50]
lea ebx, [esp + 0x14]
lea ecx, [eax - 8]
cmp ecx, 2
jb 0x40ee97
cmp eax, 0x6d
jne 0x40f024
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
push 4
push str..EXE
call fcn.0040f728
pop ecx
pop edx
test al, 1
je 0x40ee97
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov dx, 0x76
jmp 0x40eb69
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov dword [eax], esi
jmp 0x40eff8
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov dword [eax], ecx
mov ebx, dword [ebp + 8]
mov edx, dword [esp + 0x28]
jmp 0x40eb6e
push dword [esp + 8]
mov esi, eax
jmp 0x40f012
mov esi, eax
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov dword [eax], ebx
mov edx, esi
jmp 0x40eb6b
test eax, eax
jne 0x40f040
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
xor edx, edx
jmp 0x40eb69
push dword [esp + 8]
call sub.ntdll.dll_NtClose
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov dword [eax], ecx
jmp 0x40f01d