Function at 0x5a2fe0
Capabilities:
Get common file path
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x470
push ebx
push ebp
push esi
mov esi, dword [esp + 0x480]
push edi
xor ebx, ebx
mov ecx, 0x88
xor eax, eax
lea edi, [esp + 0x260]
mov dword [esp + 0x25c], ebx
rep stosd dword es:[edi], eax
push esi
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [esp + 0x488]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [esp + 0x48c]
push 0x224
mov dword [edx], eax
lea eax, [esp + 0x260]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.005a2f50
add esp, 0x10
test eax, eax
je 0x5a322f
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ebp, eax
cmp ebp, ebx
je 0x5a322f
mov edx, dword [esp + 0x270]
mov esi, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push ebx
lea ecx, [esp + 0x24]
push 0x40
push ecx
push edx
push ebp
call esi
test eax, eax
je 0x5a322f
cmp word [esp + 0x20], 0x5a4d
jne 0x5a322f
mov ecx, dword [esp + 0x270]
mov edx, dword [esp + 0x5c]
push ebx
lea eax, [esp + 0x64]
push 0xf8
add edx, ecx
push eax
push edx
push ebp
call esi
test eax, eax
je 0x5a322f
cmp dword [esp + 0x60], 0x4550
jne 0x5a322f
mov edi, dword [esp + 0x66]
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x5c]
and edi, 0xffff
and eax, 0xffff
lea esi, [edi + edi*4]
shl esi, 3
lea edx, [eax + ecx + 0x18]
push esi
mov dword [esp + 0x20], edx
call fcn.00612db9
mov ecx, dword [esp + 0x20]
add esp, 4
mov dword [esp + 0x14], eax
mov ebx, eax
push 0
push esi
push eax
mov eax, dword [esp + 0x27c]
add ecx, eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x5a3213
xor eax, eax
test edi, edi
jbe 0x5a3213
mov edx, dword [ebx]
or edx, 0x20202020
cmp edx, 0x74786574
je 0x5a314f
mov ecx, dword [ebx + 1]
or ecx, 0x20202020
cmp ecx, 0x74786574
je 0x5a314f
add ebx, 0x28
inc eax
cmp eax, edi
jb 0x5a3121
jmp 0x5a3213
mov esi, dword [ebx + 0x14]
mov eax, dword [ebx + 0xc]
mov edx, dword [esp + 0x48c]
mov ebp, dword [esp + 0x270]
sub esi, eax
lea eax, [esp + 0x158]
mov ebx, dword [edx]
sub esi, ebp
push 0x104
push eax
add esi, ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x5a3213
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x158]
push 0x6757e0
push ecx
call edi
mov edx, dword [esp + 0x484]
lea eax, [esp + 0x158]
push edx
push eax
call edi
push 0
push 0x80
push 3
push 0
push 1
lea ecx, [esp + 0x16c]
push connect
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x5a3213
push 0
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [esp + 0x494]
mov eax, dword [esp + 0x490]
lea edx, [esp + 0x18]
push 0
push edx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x18], esi
jne 0x5a3213
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x14]
push ecx
call fcn.00612e45
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x470
ret
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x470
ret