Function at 0x419926
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x104c
call fcn.004299a0
push ebx
xor ebx, ebx
push ebx
push 0x8000080
push 2
push ebx
push 1
push 0x40000000
push dword [ebp + 0x14]
mov byte [ebp - 1], bl
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x419b25
push esi
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 8], esi
je 0x419b1b
push 0x21
push esi
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x419b12
push edi
push dword [ebp + 0x10]
call fcn.00426760
mov edi, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
pop ecx
push dword [ebp + 0x18]
mov dword [ebp - 0x10], eax
push ebx
lea eax, [ebp - 0x14]
push eax
push 2
add edi, 0xa
mov dword [ebp + 0x14], ebx
mov dword [ebp - 0x14], esi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, ebx
jne 0x419b11
jmp 0x4199c2
mov esi, dword [ebp - 8]
lea eax, [ebp - 0x44]
push eax
push esi
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
cmp eax, 0xffffffff
je 0x419b11
test byte [ebp - 0x44], 1
je 0x419adb
cmp dword [ebp - 0x40], ebx
jne 0x419b11
cmp dword [ebp + 0x14], ebx
jne 0x419a52
push ebx
push edi
lea eax, [ebp - 0x104c]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, edi
jne 0x419b11
cmp word [ebp - 0x1048], 0x1011
mov dword [ebp + 0x14], edi
jne 0x419b11
mov eax, dword [ebp - 0x1046]
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx + 4]
jne 0x419b11
push dword [ebp + 0x10]
call fcn.00426760
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x1042]
push eax
call fcn.00433768
add esp, 0x10
test eax, eax
jne 0x419b11
push ebx
push 0x1000
lea eax, [ebp - 0x1046]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
je 0x419acc
cmp esi, ebx
je 0x419afb
add dword [ebp + 0x14], esi
push dword [ebp + 0x14]
push str._d_received_n
call fcn.004101cb
pop ecx
pop ecx
push ebx
lea eax, [ebp - 0x18]
push eax
push esi
lea eax, [ebp - 0x1046]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x419b11
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
sub eax, edi
push eax
push dword [ebp + 0x1c]
push 0x13
call fcn.00417cfb
test byte [ebp - 0x44], 0x20
je 0x419ae1
push str.FD_CLOSE_and_FD_READ_set_at_the_same_time_n
call fcn.004101cb
pop ecx
jmp 0x4199ec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x419b11
jmp 0x419ae1
test byte [ebp - 0x44], 0x20
jne 0x419b02
push dword [ebp + 0x18]
lea eax, [ebp - 0x14]
push ebx
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, ebx
je 0x4199bf
jmp 0x419b11
push str.CAutoFetch::DownloadFromSocket_socket_gracefully_closed_n
jmp 0x419b07
push str.CAutoFetch::DownloadFromSocket_FD_CLOSE_notified_n
call fcn.004101cb
pop ecx
mov byte [ebp - 1], 1
pop edi
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov al, byte [ebp - 1]
pop ebx
leave
ret 0x18