Function at 0x598089e4
Capabilities:
Get file size
Read file on windows

Disassembly:
inc esi
or byte [eax - 1], dl
adc eax, sym.imp.kernel32.dll_LoadLibraryA
mov edi, eax
mov eax, dword [esi + 0x14]
push eax
push 0x40
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov ebx, eax
mov ecx, ebx
mov edx, dword [esi + 0x14]
call fcn.59808be7
push 0x104
push ebx
push 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
movzx ebp, word [ebx]
xor eax, eax
mov edx, dword [esi + 0x18]
test ebp, ebp
je 0x59808a2e
inc eax
lea ecx, [ebx + eax*2]
movzx ebp, word [ecx]
test ebp, ebp
jne 0x59808a21
jmp 0x59808a30
mov ecx, ebx
movzx ebp, word [ecx - 2]
jmp 0x59808a42
xor ebp, ebp
mov word [ebx + eax*2], bp
dec eax
movzx ebp, word [ebx + eax*2 - 2]
cmp ebp, 0x5c
jne 0x59808a36
cmp byte [edx], 0
je 0x59808a60
xor ebp, ebp
movsx ecx, byte [ebp + edx]
inc ebp
mov word [ebx + eax*2], cx
inc eax
cmp byte [ebp + edx], 0
jne 0x59808a4e
xor eax, eax
xor edx, edx
inc edx
push eax
push 0x80
push 3
push eax
push edx
push edx
push ebx
call dword [sym.imp.kernel32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x59808bdc
push 0
push ebp
call dword [sym.imp.kernel32.dll_GetFileSize]
mov dword [esp], eax
push 4
push 0x1000
mov eax, dword [esi + 0x30]
push eax
push 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
mov ebx, eax
xor eax, eax
lea edx, [esp + 0x18]
mov dword [edx], eax
push eax
push edx
push dword [esp + 8]
push ebx
push ebp
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x59808bdc
mov edx, dword [esi + 0x48]
mov eax, dword [esp + 0x18]
add eax, ebx
mov dword [esp + 0x14], eax
lea eax, [ebx + edx]
mov ecx, dword [eax]
lea edx, [eax + 8]
mov ebp, dword [eax + 4]
test ecx, ecx
jbe 0x59808ae9
xor ebx, ebx
inc ebx
add dword [edx], ebp
add edx, 4
cmp ebx, ecx
jb 0x59808adf
mov edx, dword [esi + 0x24]
lea ebp, [eax + edx]
lea eax, [edx + eax + 1]
push eax
push edi
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x59808bdc
movsx edx, byte [ebp]
lea ecx, [ebp + edx + 1]
lea eax, [ecx - 1]
mov dword [esp], eax
push ecx
push edi
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov ebp, eax
test ebp, ebp
je 0x59808bdc
mov edx, dword [esp]
movsx ecx, byte [edx]
lea edi, [edx + ecx + 1]
lea eax, [edx + ecx]
mov dword [esp + 8], eax
push edi
call ebx
test eax, eax
je 0x59808bdc
mov edi, dword [esp + 8]
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x3c]
movsx ebx, byte [edi]
add edi, ebx
add ecx, edi
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax + 0x3c]
mov ebx, dword [edi + 4]
mov edi, dword [edi + 8]
mov ecx, dword [ecx + eax + 0x2c]
add ecx, eax
lea eax, [esp]
mov dword [eax + 4], ecx
mov dword [eax], 0
push eax
push edx
push edi
push ecx
call ebp
push edi
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x20]
call fcn.59808c33
lea eax, [esp]
push eax
push dword [esp + 4]
push edi
push dword [esp + 0x10]
call ebp
mov edx, dword [esi + 0x38]
xor eax, eax
cmp byte [edx], 0
je 0x59808bb8
mov edx, dword [esi + 0x38]
mov ebp, dword [esp + 0x14]
movsx ecx, byte [edx + eax]
mov word [ebp + eax*2], cx
inc eax
mov edx, dword [esi + 0x38]
cmp byte [edx + eax], 0
jne 0x59808b9e
mov ecx, dword [esp + 0x14]
lea ebp, [esp + 8]
add ebx, dword [ebp - 4]
xor edx, edx
mov word [ecx + eax*2], dx
mov eax, dword [ebp + 0x14]
add eax, edi
mov dword [ebp + 4], ecx
mov dword [ebp], eax
mov byte [ebp + 8], 1
push ebp
call ebx
pop eax
add esp, 0x20
pop ebp
pop ebx
pop edi
pop esi
ret