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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
push esi
mov dword [ebp - 8], 0x598575cb
push 0
mov eax, dword [ebp - 8]
push dword [eax + 0x40]
call fcn.5980357c
pop ecx
pop ecx
mov dword [ebp - 0x58], eax
mov eax, dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [ebp - 0x20], eax
and dword [ebp - 0x38], 0
mov eax, dword [ebp - 8]
push dword [eax + 0x44]
push 0
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
push dword [eax + 0x44]
push dword [ebp - 0x10]
call fcn.59803487
pop ecx
pop ecx
push 0x104
push dword [ebp - 0x10]
push 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x38], eax
and dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x38]
movzx eax, word [ecx + eax*2]
test eax, eax
je 0x5980378a
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x38]
mov dx, word [esi + edx*2]
mov word [ecx + eax*2], dx
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
jmp 0x5980375f
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x50], eax
and dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
movzx eax, word [ecx + eax*2]
test eax, eax
je 0x598037ae
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
jmp 0x59803797
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
movzx eax, word [ecx + eax*2 - 2]
cmp eax, 0x5c
je 0x598037d9
xor eax, eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov word [edx + ecx*2], ax
mov eax, dword [ebp - 0x14]
dec eax
mov dword [ebp - 0x14], eax
jmp 0x598037b4
and dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x50]
add eax, dword [ebp - 0x28]
movsx eax, byte [eax]
test eax, eax
je 0x5980380e
mov eax, dword [ebp - 0x50]
add eax, dword [ebp - 0x28]
movsx ax, byte [eax]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov word [edx + ecx*2], ax
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x28], eax
jmp 0x598037dd
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [ebp - 0x10]
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x59803837
push 0
call dword [ebp - 0x20]
push 0
push dword [ebp - 0x3c]
call dword [sym.imp.kernel32.dll_GetFileSize]
mov dword [ebp - 0x68], eax
push 4
push 0x1000
mov eax, dword [ebp - 8]
push dword [eax + 0x24]
push 0
call dword [sym.imp.kernel32.dll_VirtualAlloc]
mov dword [ebp - 4], eax
and dword [ebp - 0x54], 0
add byte [edx], ch
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x68]
push dword [ebp - 4]
push dword [ebp - 0x3c]
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x5980387f
push 0
call dword [ebp - 0x20]
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x54]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x20]
add eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
and dword [ebp - 0x40], 0
jmp 0x598038d2
mov eax, dword [ebp - 0x40]
inc eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x6c]
jae 0x598038e9
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
add eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
jmp 0x598038c2
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x2c]
add eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
inc eax
push eax
push dword [ebp - 0x58]
call fcn.59803647
pop ecx
pop ecx
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x59803912
push 0
call dword [ebp - 0x20]
mov eax, dword [ebp - 4]
movsx eax, byte [eax]
add eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
inc eax
push eax
push dword [ebp - 0x58]
call fcn.59803647
pop ecx
pop ecx
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
jne 0x5980393b
push 0
call dword [ebp - 0x20]
mov eax, dword [ebp - 4]
movsx eax, byte [eax]
add eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
inc eax
push eax
call dword [ebp - 0x5c]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x5980395d
push 0
call dword [ebp - 0x20]
mov eax, dword [ebp - 4]
movsx eax, byte [eax]
add eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
add eax, dword [ebp - 4]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 4]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 8]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x64]
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x2c]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x74], ecx
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x2c]
add ecx, dword [eax + 0x2c]
mov dword [ebp - 0x34], ecx
and dword [ebp - 0x44], 0
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 8]
push dword [eax + 0x10]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
call dword [ebp - 0x48]
push dword [ebp - 0x30]
push dword [ebp - 0x64]
push dword [ebp - 0x34]
call fcn.598034b9
add esp, 0xc
les ecx, [ecx*4 - 0xaf43bb]
jne 0x59803999
push dword [ebp - 0x30]
push dword [ebp - 0x34]
call dword [ebp - 0x48]
mov eax, dword [ebp - 0x34]
add eax, dword [ebp - 0x78]
mov dword [ebp - 0x80], eax
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x38]
mov ecx, dword [ebp - 0x18]
movsx eax, byte [eax + ecx]
test eax, eax
je 0x59803a25
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x38]
mov ecx, dword [ebp - 0x18]
movsx ax, byte [eax + ecx]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x4c]
mov word [edx + ecx*2], ax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
jmp 0x598039f3
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x4c]
mov word [edx + ecx*2], ax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x90], eax
mov byte [ebp - 0x88], 1
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x84], eax
lea eax, [ebp - 0x90]
push eax
call dword [ebp - 0x84]
pop ecx
pop esi
leave
ret