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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov eax, edx
mov esi, ecx
push 0x40771c
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x401e2a
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]
mov ebx, eax
add esp, 4
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x401e20
push 0
push 0
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
xor ecx, ecx
add esp, 0xc
mov eax, ebx
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 0x401e20
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 - 0x11], dl
shr ecx, 0x18
mov eax, edx
mov byte [ebp - 0x14], cl
mov ecx, edx
shr eax, 8
mov edx, 1
mov byte [ebp - 0x12], al
shr ecx, 0x10
mov byte [ebp - 0x13], cl
mov ecx, dword [ebp - 8]
mov eax, ecx
shr eax, 0x18
mov byte [ebp - 0x10], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0xf], al
mov eax, ecx
shr eax, 8
mov byte [ebp - 0xe], al
lea eax, [ebp - 0x14]
mov byte [ebp - 0xd], cl
mov ecx, esi
push 8
push eax
call fcn.00401510
add esp, 8
mov ecx, esi
call fcn.00401640
mov ecx, esi
call fcn.00401750
test eax, eax
jne 0x401ccb
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 0x401cd6
or ecx, 0xffffffff
jmp 0x401cec
mov eax, dword [esi]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
shl ecx, 8
or ecx, eax
cmp ecx, 0x80
je 0x401d0e
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 0x401d81
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 - 0x10], eax
lea eax, [ebx + edi]
push eax
call fcn.00401510
add esp, 8
mov ecx, esi
call fcn.00401640
mov ecx, esi
call fcn.00401750
test eax, eax
je 0x401caa
cmp dword [esi + 0x20], 6
jl 0x401cd1
mov eax, dword [esi]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
shl ecx, 8
or ecx, eax
cmp ecx, 0x80
jne 0x401cec
add edi, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
cmp edi, ecx
jb 0x401d17
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 0x401dfa
push 0
push 0
mov edx, 3
mov ecx, esi
call fcn.00401510
add esp, 8
mov ecx, esi
call fcn.00401640
mov ecx, esi
call fcn.00401750
test eax, eax
je 0x401caa
cmp dword [esi + 0x20], 6
jge 0x401dc5
or ecx, 0xffffffff
jmp 0x401ddb
mov eax, dword [esi]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
shl ecx, 8
or ecx, eax
cmp ecx, 0x80
je 0x401dfa
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 0x401cc3
push dword [ebp + 8]
push dword [ebp - 0xc]
push str.SEND__s_to_0x_x_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, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
push dword [ebp - 0xc]
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 0x401cc3