Function at 0x401bf0
Capabilities:
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov ebx, edx
mov esi, ecx
push 0x406510
push ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x401e4a
push 2
push 0
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
je 0x401e40
push 0
push 0
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov eax, dword [ebp - 8]
xor ecx, ecx
add esp, 0xc
add eax, ecx
setb cl
neg ecx
or ecx, eax
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x401e3d
push edi
push dword [ebp - 8]
push 1
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push edi
mov dword [ebp - 8], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov edx, dword [ebp + 8]
add esp, 0x14
mov ecx, edx
mov byte [ebp - 0xd], dl
shr ecx, 0x18
mov eax, edx
mov byte [ebp - 0x10], cl
mov ecx, edx
shr eax, 8
mov edx, 1
mov byte [ebp - 0xe], al
shr ecx, 0x10
mov byte [ebp - 0xf], cl
mov ecx, dword [ebp - 8]
mov eax, ecx
shr eax, 0x18
mov byte [ebp - 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0xb], al
mov eax, ecx
shr eax, 8
mov byte [ebp - 0xa], al
lea eax, [ebp - 0x10]
mov byte [ebp - 9], cl
mov ecx, esi
push 8
push eax
call fcn.00401550
add esp, 8
mov ecx, esi
call fcn.00401680
mov ecx, esi
call fcn.00401790
test eax, eax
jne 0x401d0a
push str.timeout_reached_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
cmp dword [esi + 0x20], 6
jge 0x401d15
or ecx, 0xffffffff
jmp 0x401d2b
mov eax, dword [esi]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
shl ecx, 8
or ecx, eax
cmp ecx, 0x80
je 0x401d4d
push ecx
push str.unexpected_response__0x_04x__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
mov ecx, dword [ebp - 8]
xor edi, edi
test ecx, ecx
je 0x401dc0
mov edx, dword [ebp + 0x10]
mov eax, ecx
sub eax, edi
mov dword [ebp - 8], ecx
cmp eax, edx
mov ecx, esi
cmova eax, edx
mov edx, 2
push eax
mov dword [ebp - 0xc], eax
lea eax, [ebx + edi]
push eax
call fcn.00401550
add esp, 8
mov ecx, esi
call fcn.00401680
mov ecx, esi
call fcn.00401790
test eax, eax
je 0x401ce9
cmp dword [esi + 0x20], 6
jl 0x401d10
mov eax, dword [esi]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
shl ecx, 8
or ecx, eax
cmp ecx, 0x80
jne 0x401d2b
add edi, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
cmp edi, ecx
jb 0x401d56
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
cmp dword [ebp + 0xc], 0
je 0x401e69
push 0
push 0
mov edx, 3
mov ecx, esi
call fcn.00401550
add esp, 8
mov ecx, esi
call fcn.00401680
mov ecx, esi
call fcn.00401790
test eax, eax
je 0x401ce9
cmp dword [esi + 0x20], 6
jge 0x401e08
or ecx, 0xffffffff
jmp 0x401e1e
mov eax, dword [esi]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
shl ecx, 8
or ecx, eax
cmp ecx, 0x80
je 0x401e69
push ecx
push str.unexpected_response__0x_04x__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
jmp 0x401d02
mov ebx, dword [ebp - 0xc]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
push ebx
push str.loadfile___s___failed_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401050
add esp, 0xc
jmp 0x401d02
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret