Function at 0x46e5e0
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Get file size
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4d9c71
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x224
mov eax, dword [0x507fec]
mov edx, dword [eax + 0xc]
push ebx
push ebp
push esi
push edi
mov ecx, 0x507fec
call edx
add eax, 0x10
mov dword [esp + 0x10], eax
xor esi, esi
push 0x206
lea eax, [esp + 0x2a]
push esi
mov dword [esp + 0x244], esi
push eax
mov word [esp + 0x30], si
call fcn.004a4620
add esp, 0xc
push 0x104
lea ecx, [esp + 0x28]
push ecx
push 0x400000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x24]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x46e652
sub eax, edx
sar eax, 1
lea edx, [esp + 0x24]
mov ebx, eax
push edx
lea eax, [esp + 0x14]
call fcn.00403b90
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test eax, eax
jne 0x46e684
xor ecx, ecx
jmp 0x46e69f
mov ecx, eax
lea esi, [ecx + 2]
lea esp, [esp]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x46e690
sub ecx, esi
sar ecx, 1
push eax
mov ebx, ecx
lea eax, [esp + 0x14]
call fcn.00403b90
mov edi, dword [esp + 0x10]
push 0x2e
push edi
call fcn.004a1519
xor ebx, ebx
add esp, 8
cmp eax, ebx
je 0x46e712
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x46e712
lea ecx, [esp + 0x18]
lea edx, [esp + 0x10]
call fcn.00403650
lea edi, [esp + 0x10]
mov byte [esp + 0x23c], 1
call fcn.00403880
mov byte [esp + 0x23c], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46e70e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x10]
mov edx, dword [0x507fec]
mov eax, dword [edx + 0xc]
mov ecx, 0x507fec
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x244]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x18]
push edx
mov byte [esp + 0x244], 2
fld1
push eax
fstp qword [esp + 0x28]
lea ecx, [esp + 0x1c]
push ecx
call fcn.0046e920
test eax, eax
jne 0x46e7ac
mov byte [esp + 0x23c], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46e77e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x23c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46e7a5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x46e8f1
mov esi, dword [esp + 0x14]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x46e7e6
lea eax, [esi - 0x10]
mov byte [esp + 0x23c], bl
lea ecx, [eax + 0xc]
or edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x46e772
push ebx
push ebp
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, ebx
je 0x46e896
mov esi, dword [esp + 0x248]
mov eax, dword [esi]
sub eax, 0x10
mov dword [esp + 0x18], ebx
mov edx, 1
sub edx, dword [eax + 0xc]
mov eax, dword [eax + 8]
lea ecx, [edi + 0xa]
sub eax, ecx
or eax, edx
jge 0x46e825
mov eax, esi
call fcn.00404050
mov eax, dword [esi]
push ebx
lea ecx, [esp + 0x1c]
push ecx
push edi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
cmp esi, ebx
je 0x46e881
cmp dword [esp + 0x18], edi
jne 0x46e881
mov eax, dword [esp + 0x24c]
cmp eax, ebx
je 0x46e853
fld qword [esp + 0x1c]
fstp qword [eax]
mov esi, dword [esp + 0x248]
mov eax, edi
call fcn.00411150
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
call fcn.00403580
lea ecx, [esp + 0x10]
call fcn.00403580
mov eax, 1
jmp 0x46e8f1
mov ecx, dword [esp + 0x248]
mov eax, dword [ecx]
cmp dword [eax - 8], ebx
jl 0x46e90c
mov dword [eax - 0xc], ebx
mov edx, dword [ecx]
mov byte [edx], bl
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x23c], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46e8c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x23c], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46e8ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x234]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x230
ret 0xc
push 0x80070057
call fcn.00401020
int3