Function at 0x402960
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x102c
call fcn.00405160
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x1000
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x1024], ecx
mov edi, edx
push 0
push eax
mov dword [ebp - 0x1020], edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x1018], 0
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x1014], 0
push 0x1004
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1018]
push 0x406190
push str.flashback_names.txt
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
add esp, 0xc
test eax, eax
jne 0x4029ee
cmp dword [ebp - 0x1018], eax
jne 0x402a0d
push str.flashback_names.txt
push str.FileHelper_couldnt_open__s_n
call fcn.00401010
add esp, 8
cmp dword [ebp - 0x1018], 0
je 0x402c04
mov ecx, dword [ebp - 0x1010]
xor bl, bl
mov eax, dword [ebp - 0x1014]
xor edx, edx
mov dword [ebp - 0x101c], edx
jmp 0x402a36
mov edi, dword [ebp - 0x1020]
cmp edx, dword [edi + 0x30]
jae 0x402c00
mov edi, dword [edi + 0x38]
xor esi, esi
test edi, edi
je 0x402ab0
cmp eax, ecx
jne 0x402a81
push dword [ebp - 0x1018]
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x1014], esi
push 0x1000
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, eax
add esp, 0x10
mov dword [ebp - 0x1010], ecx
test ecx, ecx
je 0x402aa1
mov eax, dword [ebp - 0x1014]
mov bl, byte [ebp + eax - 0x100c]
inc eax
mov edx, dword [ebp - 0x101c]
mov dword [ebp - 0x1014], eax
cmp bl, 0xa
je 0x402a30
sub edi, 1
jne 0x402a48
jmp 0x402ab0
cmp bl, 0xa
je 0x402c00
mov eax, dword [ebp - 0x1014]
mov edi, dword [ebp - 0x1020]
cmp eax, ecx
jne 0x402af3
push dword [ebp - 0x1018]
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x1014], 0
push 0x1000
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, eax
add esp, 0x10
mov eax, dword [ebp - 0x1014]
mov dword [ebp - 0x1010], ecx
test ecx, ecx
je 0x402b47
mov bl, byte [ebp + eax - 0x100c]
mov bh, 1
inc eax
mov byte [ebp - 0x1028], bl
mov dword [ebp - 0x1014], eax
cmp bl, 0xa
je 0x402ba6
cmp esi, dword [edi + 0x34]
jae 0x402b50
cmp bl, 0xd
je 0x402ab6
push dword [ebp - 0x1028]
mov ecx, dword [ebp - 0x1024]
call fcn.004014a0
test al, al
je 0x402c04
mov ecx, dword [ebp - 0x1010]
inc esi
mov eax, dword [ebp - 0x1014]
jmp 0x402ab6
xor bh, bh
nop dword [eax]
cmp bl, 0xa
je 0x402ba6
cmp eax, ecx
jne 0x402b92
push dword [ebp - 0x1018]
lea eax, [ebp - 0x100c]
mov dword [ebp - 0x1014], 0
push 0x1000
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, eax
add esp, 0x10
mov eax, dword [ebp - 0x1014]
mov dword [ebp - 0x1010], ecx
test ecx, ecx
je 0x402ba4
mov bl, byte [ebp + eax - 0x100c]
mov bh, 1
inc eax
mov dword [ebp - 0x1014], eax
jmp 0x402b50
xor bh, bh
test esi, esi
jne 0x402baf
cmp dword [edi + 0x38], esi
je 0x402bf2
cmp esi, dword [edi + 0x4c]
jae 0x402be3
nop dword [eax]
nop dword [eax + eax]
mov ecx, dword [ebp - 0x1024]
push 0
call fcn.004014a0
test al, al
je 0x402c04
inc esi
cmp esi, dword [edi + 0x4c]
jb 0x402bc0
mov ecx, dword [ebp - 0x1010]
mov eax, dword [ebp - 0x1014]
mov edx, dword [ebp - 0x101c]
inc edx
mov dword [ebp - 0x101c], edx
jmp 0x402bf8
mov edx, dword [ebp - 0x101c]
test bh, bh
jne 0x402a36
mov bl, 1
jmp 0x402c06
xor bl, bl
mov eax, dword [ebp - 0x1018]
test eax, eax
je 0x402c1a
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004044d2
mov esp, ebp
pop ebp
ret