Function at 0x46b120
Capabilities:
Access peb ldr_data
Get ntdll base address
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d5cd0
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x513330]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
call fcn.00405c60
mov eax, dword [0x51856c]
mov edx, dword [eax + 0xc]
mov ecx, 0x51856c
call edx
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
xor esi, esi
push 0x1000
mov dword [esp + 0x3c], esi
call fcn.004a3368
mov edi, eax
add esp, 4
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], esi
mov ecx, dword [ebp + 8]
push esi
push 0x80
push 3
push esi
mov byte [esp + 0x48], 2
xor eax, eax
push 1
mov word [esp + 0x25], ax
mov eax, dword [ecx]
push Ordinal_1
push eax
mov dword [esp + 0x44], esi
mov byte [esp + 0x2c], 0
mov dword [esp + 0x3c], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x46b217
call fcn.00405b90
test eax, eax
jge 0x46b21d
push edi
call fcn.004a529a
add ebx, 0xfffffff0
add esp, 4
mov dword [esp + 0x38], 0xffffffff
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x46b1ff
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov eax, 2
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, eax
mov dword [esp + 0x1c], esi
push 0
lea ecx, [esp + 0x18]
push ecx
push 3
lea edx, [esp + 0x1c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46b28f
call fcn.00405b90
test eax, eax
jge 0x46b28f
test esi, esi
je 0x46b24a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.004a529a
add ebx, 0xfffffff0
add esp, 4
mov dword [esp + 0x38], 0xffffffff
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x46b277
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov eax, 3
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esp + 0x10], 0xef
jne 0x46b2ae
cmp byte [esp + 0x11], 0xbb
jne 0x46b2ae
cmp byte [esp + 0x12], 0xbf
jne 0x46b2ae
mov dword [esp + 0x20], 2
jmp 0x46b2be
push 0
push 0
lea ecx, [esp + 0x24]
push ecx
xor edx, edx
call fcn.004620d0
cmp dword [esp + 0x14], 0
je 0x46b312
push 0
lea edx, [esp + 0x18]
push edx
push 0x1000
push edi
push esi
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46b2ee
call fcn.00405b90
test eax, eax
jl 0x46b306
mov edx, dword [esp + 0x14]
push edi
lea eax, [esp + 0x1c]
push eax
call fcn.00461f80
cmp dword [esp + 0x14], 0
jne 0x46b2c5
jmp 0x46b30e
mov dword [esp + 0x28], 4
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
sub eax, 1
je 0x46b408
sub eax, 1
je 0x46b374
test esi, esi
je 0x46b32f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.004a529a
add ebx, 0xfffffff0
add esp, 4
mov dword [esp + 0x38], 0xffffffff
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46b35c
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, 5
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x20]
push eax
mov edi, ebx
call fcn.00477160
add esp, 4
mov edi, dword [ebp + 0xc]
mov byte [esp + 0x38], 3
call fcn.004082a0
mov byte [esp + 0x38], 2
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46b3b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x24]
test esi, esi
je 0x46b3c4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.004a529a
add ebx, 0xfffffff0
add esp, 4
mov dword [esp + 0x38], 0xffffffff
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46b3f1
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
call fcn.00440ea0
jmp 0x46b3b9