Function at 0x5f58b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
mov eax, dword [0x766480]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push edi
mov edi, ecx
push 0x7062c4
push eax
mov dword [ebp - 0x248], edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov ebx, eax
add esp, 8
mov dword [ebp - 0x214], ebx
test ebx, ebx
jne 0x5f590f
push eax
push 0x711b68
push 0x711ba0
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006dfb52
mov esp, ebp
pop ebp
ret 4
push esi
mov ecx, edi
call fcn.005f5640
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
lea eax, [ebp - 0x244]
push ebx
push 1
push 4
push eax
call esi
add esp, 0x10
mov dword [ebp - 0x240], 0
cmp dword [ebp - 0x244], 0
jle 0x5f5cab
add edi, 0xb8
mov dword [ebp - 0x220], edi
push ebx
push 1
lea eax, [ebp - 0x230]
push 4
push eax
call esi
push ebx
push 1
lea eax, [ebp - 0x234]
push 4
push eax
call esi
mov ecx, dword [ebp - 0x248]
add esp, 0x20
mov eax, dword [edi]
mov ecx, dword [ecx + 0xbc]
cmp eax, ecx
je 0x5f59b2
mov edx, dword [ebp - 0x230]
mov esi, dword [ebp - 0x234]
nop
mov edi, dword [eax]
mov dword [ebp - 0x210], edi
cmp dword [edi], edx
jne 0x5f59a5
cmp dword [edi + 4], esi
je 0x5f5a46
add eax, 4
cmp eax, ecx
jne 0x5f5990
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push 0x10140
call fcn.006df8c3
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x5f5cc8
mov dword [ebx + 0x110], 0
mov dword [ebx + 0x114], 0
mov dword [ebx + 0x118], 0
mov dword [ebx + 0x11c], 0
mov dword [ebx + 0x120], 0
mov dword [ebx + 0x124], 0
mov dword [ebx + 0x128], 0
mov dword [ebx + 0x12c], 0
mov dword [ebx + 0x130], 0
mov dword [ebx + 0x134], 0
mov dword [ebx + 0x138], 0
mov dword [ebx + 0x13c], 0
jmp 0x5f5cca
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
test edi, edi
je 0x5f59b2
push ebx
push 0x104
lea eax, [edi + 8]
push 1
push eax
call esi
push ebx
push 1
lea eax, [ebp - 0x218]
push 4
push eax
call esi
mov eax, dword [ebp - 0x218]
add dword [edi + 0x10c], eax
lea eax, [edi + 0x140]
push ebx
push 0x4000
push 4
push eax
call esi
mov eax, dword [ebp - 0x218]
add esp, 0x30
xor ebx, ebx
test eax, eax
jle 0x5f5afb
lea esi, [edi + 0x110]
mov edi, dword [ebp - 0x214]
nop dword [eax + eax]
push edi
push 1
lea eax, [ebp - 0x228]
push 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, dword [esi + 4]
add esp, 0x10
cmp ecx, dword [esi + 8]
je 0x5f5adb
mov eax, dword [ebp - 0x228]
mov dword [ecx], eax
add dword [esi + 4], 4
jmp 0x5f5aea
lea eax, [ebp - 0x228]
push eax
push ecx
mov ecx, esi
call fcn.004832c0
mov eax, dword [ebp - 0x218]
inc ebx
cmp ebx, eax
jl 0x5f5ab0
mov edi, dword [ebp - 0x210]
xor ebx, ebx
test eax, eax
jle 0x5f5b5b
lea esi, [edi + 0x11c]
mov edi, dword [ebp - 0x214]
nop dword [eax]
push edi
push 1
lea eax, [ebp - 0x22c]
push 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, dword [esi + 4]
add esp, 0x10
cmp ecx, dword [esi + 8]
je 0x5f5b3b
mov eax, dword [ebp - 0x22c]
mov dword [ecx], eax
add dword [esi + 4], 4
jmp 0x5f5b4a
lea eax, [ebp - 0x22c]
push eax
push ecx
mov ecx, esi
call fcn.00462fd0
mov eax, dword [ebp - 0x218]
inc ebx
cmp ebx, eax
jl 0x5f5b10
mov edi, dword [ebp - 0x210]
mov dword [ebp - 0x21c], 0
test eax, eax
jle 0x5f5c80
lea ebx, [edi + 0x128]
add edi, 0x134
mov dword [ebp - 0x224], edi
nop
push 0x104
call fcn.006dff04
push dword [ebp - 0x214]
mov esi, eax
lea eax, [ebp - 0x108]
push 0x104
push 1
push eax
mov dword [ebp - 0x210], esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
lea eax, [ebp - 0x108]
push eax
push str.c:MP_ProjectSOUNDBgm_
push 0x701a8c
push esi
call fcn.0044f6e0
mov eax, dword [ebx + 4]
add esp, 0x24
cmp eax, dword [ebx + 8]
je 0x5f5bd6
mov dword [eax], esi
add dword [ebx + 4], 4
jmp 0x5f5be5
lea ecx, [ebp - 0x210]
push ecx
push eax
mov ecx, ebx
call fcn.00462fd0
push 0x104
call fcn.006dff04
push 0x104
mov esi, eax
push 0
push esi
mov dword [ebp - 0x210], esi
call sub.VCRUNTIME140.dll_memset
lea ecx, [ebp - 0x108]
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5f5c10
sub ecx, edx
lea eax, [ecx - 3]
push eax
lea eax, [ebp - 0x108]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
lea edi, [esi - 1]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x5f5c31
mov eax, dword [0x711b9c]
mov dword [edi], eax
mov edi, dword [ebp - 0x224]
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
je 0x5f5c58
mov dword [eax], esi
add dword [edi + 4], 4
jmp 0x5f5c67
lea ecx, [ebp - 0x210]
push ecx
push eax
mov ecx, edi
call fcn.00462fd0
mov eax, dword [ebp - 0x21c]
inc eax
mov dword [ebp - 0x21c], eax
cmp eax, dword [ebp - 0x218]
jl 0x5f5b80
mov edi, dword [ebp - 0x220]
mov eax, dword [ebp - 0x240]
mov ebx, dword [ebp - 0x214]
inc eax
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov dword [ebp - 0x240], eax
cmp eax, dword [ebp - 0x244]
jl 0x5f5951
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop esi
pop edi
pop ebx
call fcn.006dfb52
mov esp, ebp
pop ebp
ret 4
xor ebx, ebx
mov eax, dword [ebp - 0x230]
mov edi, dword [ebp - 0x214]
mov dword [ebx], eax
mov eax, dword [ebp - 0x234]
push edi
push 0x104
mov dword [ebx + 4], eax
lea eax, [ebx + 8]
push 1
push eax
mov dword [ebp - 0x224], ebx
call esi
push edi
push 1
lea esi, [ebx + 0x10c]
push 4
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push edi
push 0x4000
lea eax, [ebx + 0x140]
push 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov eax, dword [esi]
add esp, 0x30
xor edi, edi
test eax, eax
jle 0x5f5d87
nop word [eax + eax]
push dword [ebp - 0x214]
lea eax, [ebp - 0x238]
push 1
push 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, dword [ebx + 0x114]
add esp, 0x10
cmp ecx, dword [ebx + 0x118]
je 0x5f5d69
mov eax, dword [ebp - 0x238]
mov dword [ecx], eax
add dword [ebx + 0x114], 4
jmp 0x5f5d7c
lea eax, [ebp - 0x238]
push eax
push ecx
lea ecx, [ebx + 0x110]
call fcn.004832c0
mov eax, dword [ebx + 0x10c]
inc edi
cmp edi, eax
jl 0x5f5d30
xor edi, edi
test eax, eax
jle 0x5f5de7
nop dword [eax]
push dword [ebp - 0x214]
lea eax, [ebp - 0x23c]
push 1
push 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, dword [ebx + 0x120]
add esp, 0x10
cmp ecx, dword [ebx + 0x124]
je 0x5f5dc9
mov eax, dword [ebp - 0x23c]
mov dword [ecx], eax
add dword [ebx + 0x120], 4
jmp 0x5f5ddc
lea eax, [ebp - 0x23c]
push eax
push ecx
lea ecx, [ebx + 0x11c]
call fcn.00462fd0
mov eax, dword [ebx + 0x10c]
inc edi
cmp edi, eax
jl 0x5f5d90
mov dword [ebp - 0x21c], 0
test eax, eax
jle 0x5f5f0f
lea edi, [ebx + 0x134]
nop
push 0x104
call fcn.006dff04
push dword [ebp - 0x214]
mov esi, eax
lea eax, [ebp - 0x20c]
push 0x104
push 1
push eax
mov dword [ebp - 0x210], esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
lea eax, [ebp - 0x20c]
push eax
push str.c:MP_ProjectSOUNDBgm_
push 0x701a8c
push esi
call fcn.0044f6e0
mov eax, dword [ebx + 0x12c]
lea ecx, [ebx + 0x128]
add esp, 0x24
cmp eax, dword [ecx + 8]
je 0x5f5e5f
mov dword [eax], esi
add dword [ecx + 4], 4
jmp 0x5f5e6c
lea edx, [ebp - 0x210]
push edx
push eax
call fcn.00462fd0
push 0x104
call fcn.006dff04
push 0x104
mov esi, eax
push 0
push esi
mov dword [ebp - 0x210], esi
call sub.VCRUNTIME140.dll_memset
lea ecx, [ebp - 0x20c]
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5f5e97
sub ecx, edx
cmp ecx, 3
jbe 0x5f5ed7
lea eax, [ecx - 3]
push eax
lea eax, [ebp - 0x20c]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
lea edi, [esi - 1]
nop dword [eax]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x5f5ec0
mov eax, dword [0x711b9c]
mov dword [edi], eax
lea edi, [ebx + 0x134]
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
je 0x5f5ee7
mov dword [eax], esi
add dword [edi + 4], 4
jmp 0x5f5ef6
lea ecx, [ebp - 0x210]
push ecx
push eax
mov ecx, edi
call fcn.00462fd0
mov eax, dword [ebp - 0x21c]
inc eax
mov dword [ebp - 0x21c], eax
cmp eax, dword [ebx + 0x10c]
jl 0x5f5e00
mov edi, dword [ebp - 0x220]
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
je 0x5f5f28
mov dword [eax], ebx
add dword [edi + 4], 4
jmp 0x5f5c86
lea ecx, [ebp - 0x224]
push ecx
push eax
mov ecx, edi
call fcn.00462fd0
jmp 0x5f5c86