Function at 0x416e50
Capabilities:
Create thread
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
push esi
call fcn.00420e00
add esp, 4
mov ecx, ebx
push eax
push esi
call fcn.00403040
mov esi, dword [ebp + 0xc]
push esi
call fcn.00420e00
add esp, 4
lea ecx, [ebx + 0x10]
push eax
push esi
call fcn.00403040
mov esi, dword [ebp + 0x10]
push esi
call fcn.00420e00
add esp, 4
lea ecx, [ebx + 0x20]
push eax
push esi
call fcn.00403040
mov ecx, dword [ebx + 0x20]
test ecx, ecx
je 0x416eae
mov eax, dword [ebx + 0x28]
cmp word [eax + ecx*2 - 2], 0x2f
je 0x416ee4
lea eax, [ecx + 1]
mov dword [ebp + 0x10], 0x2f
cmp eax, dword [ebx + 0x24]
jb 0x416ec6
push eax
lea ecx, [ebx + 0x20]
call fcn.00403220
mov edx, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x28]
mov ax, word [ebp + 0x10]
mov word [ecx + edx*2], ax
xor edx, edx
mov ecx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x28]
mov word [eax + ecx*2 + 2], dx
inc dword [ebx + 0x20]
mov esi, dword [ebp + 8]
push 0x5c
push esi
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
push 0x54b914
mov dword [ebp - 4], eax
call fcn.00420e00
mov ecx, dword [ebx + 0x20]
add esp, 0xc
add ecx, eax
mov dword [ebp + 0xc], eax
cmp ecx, dword [ebx + 0x24]
jb 0x416f19
push ecx
lea ecx, [ebx + 0x20]
call fcn.00403220
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebx + 0x20]
add eax, eax
push eax
mov eax, dword [ebx + 0x28]
push 0x54b914
lea eax, [eax + ecx*2]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebx + 0x20]
xor edx, edx
add ecx, dword [ebp + 0xc]
add esp, 0xc
mov eax, dword [ebx + 0x28]
mov word [eax + ecx*2], dx
mov edx, dword [ebp + 0xc]
add dword [ebx + 0x20], edx
mov eax, dword [ebp - 4]
test eax, eax
je 0x416f52
lea esi, [eax + 2]
push esi
call fcn.00420e00
mov ecx, dword [ebx + 0x20]
add esp, 4
add ecx, eax
mov dword [ebp + 0xc], eax
cmp ecx, dword [ebx + 0x24]
jb 0x416f74
push ecx
lea ecx, [ebx + 0x20]
call fcn.00403220
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebx + 0x20]
add eax, eax
push eax
mov eax, dword [ebx + 0x28]
push esi
lea eax, [eax + ecx*2]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebx + 0x20]
xor esi, esi
mov edx, dword [ebp + 0xc]
add esp, 0xc
mov eax, dword [ebx + 0x28]
add ecx, edx
mov word [eax + ecx*2], si
add dword [ebx + 0x20], edx
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x416fb8
push esi
call fcn.00420e00
add esp, 4
lea ecx, [ebx + 0x40]
push eax
push esi
call fcn.00403040
mov esi, dword [ebp + 0x1c]
test esi, esi
je 0x416fd2
push esi
call fcn.00420e00
add esp, 4
lea ecx, [ebx + 0x50]
push eax
push esi
call fcn.00403040
push 0
push 0
push 3
push 0
push 5
push connect
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xffffffff
setne al
mov byte [ebp + 0xb], al
test al, al
je 0x41703d
push 0
push esi
mov dword [ebx + 0x6c], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebx + 0x68], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebx + 0x64], eax
lea ecx, [ebp + 0xc]
push 0
push ecx
push dword [ebx + 0x68]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
sete al
mov byte [ebp + 0xb], al
test al, al
jne 0x417045
call edi
mov dword [ebx + 0x80], eax
cmp esi, 0xffffffff
je 0x417051
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp + 0xb]
test al, al
je 0x41716a
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
test eax, eax
mov dword [ebx + 0x88], eax
setne cl
mov byte [ebp + 0xb], cl
test eax, eax
jne 0x417087
call edi
mov cl, byte [ebp + 0xb]
mov dword [ebx + 0x80], eax
test cl, cl
je 0x417168
cmp byte [ebp + 0x14], 0
je 0x4170b5
push ebx
push 0
push 0x417470
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthread]
add esp, 0xc
cmp eax, 0xffffffff
setne al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
push 0x5499a0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
call fcn.00420e00
add esp, 4
lea ecx, [ebp - 0x24]
push eax
push 0x5499a0
call fcn.00403040
push 0x5499a0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
call fcn.00420e00
add esp, 4
lea ecx, [ebp - 0x14]
push eax
push 0x5499a0
call fcn.00403040
lea eax, [ebp - 0x24]
mov ecx, ebx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00417180
mov ecx, dword [ebp - 0x10]
mov bl, al
add ecx, ecx
push ecx
push dword [ebp - 0xc]
lea ecx, [ebp - 8]
call fcn.00420bb0
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x18]
add eax, eax
mov dword [ebp - 0xc], 0
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
call fcn.00420bb0
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov al, cl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18