Function at 0x54d190
Capabilities:
Check for peb beingdebugged flag
Get common file path
Get file size
Get startup folder
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x59e0ba
mov eax, dword fs:[0]
push eax
sub esp, 0x274
mov eax, dword [0x5e173c]
xor eax, esp
mov dword [esp + 0x270], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e173c]
xor eax, esp
push eax
lea eax, [esp + 0x288]
mov dword fs:[0], eax
mov eax, dword [esp + 0x298]
mov esi, dword [esp + 0x29c]
mov dword [esp + 0x18], eax
xor eax, eax
push 0x206
push eax
mov word [esp + 0x84], ax
lea eax, [esp + 0x86]
push eax
call fcn.0056cbb0
add esp, 0xc
lea eax, [esp + 0x7c]
push eax
push 0
push 0
push 0x29
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ecx, 0x5b1e14
mov dword [esp + 0x2c], 0
xor eax, eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x54d240
sub ecx, edx
sar ecx, 1
push ecx
push 0x5b1e14
lea ecx, [esp + 0x24]
call fcn.00404a80
mov dword [esp + 0x290], 0
xor eax, eax
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], 0
mov word [esp + 0x34], ax
cmp word [esp + 0x7c], ax
jne 0x54d29b
xor ecx, ecx
jmp 0x54d2b1
lea ecx, [esp + 0x7c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x54d2a2
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x3c]
call fcn.00404a80
mov byte [esp + 0x290], 1
lea eax, [esp + 0x1c]
push eax
lea edx, [esp + 0x38]
lea ecx, [esp + 0x68]
call fcn.004b2290
add esp, 4
mov byte [esp + 0x290], 3
cmp dword [esp + 0x48], 8
jb 0x54d2fb
push dword [esp + 0x34]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], 0
mov word [esp + 0x34], ax
mov byte [esp + 0x290], 4
cmp dword [esp + 0x30], 8
jb 0x54d32d
push dword [esp + 0x1c]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x30], 7
lea ecx, [esp + 0x64]
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
call fcn.004b2f30
mov byte [esi], al
test al, al
jne 0x54d35a
xor bl, bl
jmp 0x54d518
push 4
call fcn.0056590a
add esp, 4
mov dword [esp + 0x54], eax
mov byte [esp + 0x290], 5
test eax, eax
je 0x54d382
mov dword [eax], 0
mov dword [eax], 0xffffffff
jmp 0x54d384
xor eax, eax
mov byte [esp + 0x290], 4
mov dword [esp + 0x50], eax
mov byte [esp + 0x290], 6
lea eax, [esp + 0x64]
push 0x80
push 3
push ecx
push SysReAllocString
push eax
lea ecx, [esp + 0x64]
call fcn.004b47d0
mov esi, dword [esp + 0x50]
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test al, al
jne 0x54d3c8
xor bl, bl
jmp 0x54d4e7
xor bl, bl
test esi, esi
je 0x54d4e1
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x54d4cd
lea ecx, [esp + 0x54]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x54d400
call edi
test eax, eax
jne 0x54d4c7
mov ecx, dword [esp + 0x54]
xor eax, eax
add eax, ebp
adc ecx, 0
jne 0x54d416
cmp eax, 8
jb 0x54d4c7
sub eax, 8
sbb ecx, 0
cmp dword [esi], 0xffffffff
je 0x54d4c7
mov dword [esp + 0x58], ecx
lea ecx, [esp + 0x58]
push 0
push ecx
push eax
mov dword [esp + 0x60], eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x54], eax
cmp eax, 0xffffffff
jne 0x54d44c
call edi
test eax, eax
jne 0x54d4c7
mov dword [esp + 0x60], 0
mov dword [esp + 0x4c], 0
cmp dword [esi], 0xffffffff
je 0x54d4c7
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x4c]
push 0
push eax
push 4
lea eax, [esp + 0x6c]
mov dword [esp + 0x58], 0
push eax
push dword [esi]
call edi
test eax, eax
je 0x54d4c7
cmp dword [esp + 0x60], 0xff2144
jne 0x54d4c7
mov eax, dword [esp + 0x18]
mov dword [esp + 0x4c], 0
test eax, eax
je 0x54d4c7
cmp dword [esi], 0xffffffff
je 0x54d4c7
push 0
lea ecx, [esp + 0x50]
mov dword [esp + 0x50], 0
push ecx
push 4
push eax
push dword [esi]
call edi
test eax, eax
movzx ebx, bl
mov ecx, 1
cmovne ebx, ecx
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x54d4e1
push eax
call ecx
test eax, eax
je 0x54d4e1
mov dword [esi], 0xffffffff
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x290], 4
test esi, esi
je 0x54d518
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x54d507
test eax, eax
je 0x54d507
push eax
call ecx
mov dword [esi], 0
push esi
call fcn.00564de3
add esp, 4
mov dword [esp + 0x50], 0
mov dword [esp + 0x290], 0xffffffff
cmp dword [esp + 0x78], 8
jb 0x54d536
push dword [esp + 0x64]
call fcn.00564de3
add esp, 4
xor eax, eax
mov dword [esp + 0x78], 7
mov word [esp + 0x64], ax
mov al, bl
mov dword [esp + 0x74], 0
mov ecx, dword [esp + 0x288]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x270]
xor ecx, esp
call fcn.00564de8
add esp, 0x280
ret 8