Function at 0x4061c0
Capabilities:
Get file size
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x6412e8
push eax
mov eax, 0x421c
mov dword fs:[0], esp
call fcn.00612380
push ebx
push esi
push edi
push 0x1fff
xor esi, esi
lea eax, [ebp - 0x4227]
push esi
push eax
mov byte [ebp - 0x4228], 0
call fcn.006100a0
push 0x1fff
lea ecx, [ebp - 0x2227]
push esi
push ecx
mov byte [ebp - 0x2228], 0
call fcn.006100a0
mov edi, dword [ebp + 0xc]
mov eax, edi
add esp, 0x18
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x406224
sub eax, edx
sar eax, 1
cmp eax, esi
jle 0x406243
cmp word [edi + eax*2], 0x5c
je 0x406243
dec eax
cmp eax, esi
jg 0x406237
lea eax, [edi + eax*2 + 2]
lea edx, [ebp - 0x220]
sub edx, eax
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, si
jne 0x406250
push esi
push 0x80
push 3
push esi
push 1
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4062a4
lea eax, [ebp - 0x220]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x406286
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
mov dword [ebp - 0x228], edx
mov dword [ebp - 0x224], esi
lea eax, [ebp - 0x220]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x4062b0
sub eax, edx
sar eax, 1
push esi
lea edi, [eax + eax]
push ebx
mov dword [ebp - 0x228], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x224], eax
cmp eax, 0xffffffff
jne 0x4062e8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x224], esi
lea eax, [edi + 9]
push 1
push eax
call fcn.0061227d
mov esi, eax
add esp, 8
test esi, esi
je 0x40653e
mov ecx, dword [ebp - 0x224]
push edi
lea edx, [ebp - 0x220]
push edx
lea eax, [esi + 8]
push eax
mov dword [esi], edi
mov dword [esi + 4], ecx
call fcn.00610e50
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x16], ecx
lea edi, [edi + edi + 8]
mov word [ebp - 0x18], 0x124
mov edx, dword [ebp - 0x18]
push edi
mov dword [ebp - 0x4228], edx
mov dword [ebp - 0x12], edi
mov eax, dword [ebp - 0x14]
mov cx, word [ebp - 0x10]
lea edx, [ebp - 0x421e]
push esi
push edx
mov dword [ebp - 0x4224], eax
mov word [ebp - 0x4220], cx
call fcn.00610e50
add esp, 0x18
push 0
add edi, 0xa
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x4228]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x406535
push 0x2000
lea ecx, [ebp - 0x2228]
push 0
push ecx
call fcn.006100a0
add esp, 0xc
push 0
push 0x1000
lea edx, [ebp - 0x2228]
push edx
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x406535
cmp dword [ebp - 0x2226], 0x55aa0000
mov eax, dword [ebp - 0x2228]
mov ecx, dword [ebp - 0x2224]
mov dx, word [ebp - 0x2220]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
mov word [ebp - 0x10], dx
je 0x40644a
push esi
call fcn.0061056f
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x700724]
mov edx, dword [eax + 0xc]
mov ecx, 0x700724
call edx
add eax, 0x10
mov dword [ebp + 0xc], eax
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x16]
push eax
lea ecx, [ebp + 0xc]
push str.Bad_data_type._Received_type:__04Xh.
push ecx
call fcn.00405ab0
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406545
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x406545
cmp ebx, 0xffffffff
je 0x406535
cmp dword [ebp - 0x224], 0
je 0x406535
push 0
push 0
push 0
push 0
push 0
push ebx
push edi
call sub.MSWSOCK.dll_TransmitFile
test eax, eax
je 0x406535
push 0
push 0xa
lea ecx, [ebp - 0x2228]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x406535
cmp dword [ebp - 0x2226], 0x55aa0000
mov edx, dword [ebp - 0x2228]
mov eax, dword [ebp - 0x2224]
mov cx, word [ebp - 0x2220]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov word [ebp - 0x10], cx
je 0x40650d
mov edx, dword [0x700724]
mov eax, dword [edx + 0xc]
mov ecx, 0x700724
call eax
add eax, 0x10
mov dword [ebp + 0xc], eax
mov dword [ebp - 4], 4
mov ecx, dword [ebp - 0x16]
push ecx
lea edx, [ebp + 0xc]
push str.Bad_data_type._Received_type__04Xh
push edx
call fcn.00405ab0
push esi
call fcn.0061056f
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.004014a0
jmp 0x406545
push esi
call fcn.0061056f
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
push esi
call fcn.0061056f
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc