Function at 0x45ac70
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create thread
Create udp socket
Set socket configuration
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x42b60]
mov eax, 0x42b60
call fcn.004ea520
push 0xffffffffffffffff
push 0x518fe9
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x5566e0]
xor eax, ebp
mov dword [ebp + 0x42b5c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov eax, edi
mov dword [ebp - 0x18], edi
mov dword [edi + 0xb0], 1
call fcn.0045c3e0
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x44], ebx
call fcn.0046cd40
mov ecx, eax
push edi
lea eax, [edi + 0x34]
push eax
push ebx
mov dword [ebp - 0x20], eax
push ebx
mov eax, ecx
mov dword [ebp - 0x28], ecx
call fcn.0046d8f0
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [edi + 0xc], eax
jne 0x45ad75
call fcn.004c2ca4
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x45ad2b
push 0x80004005
call fcn.00404150
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
push ebx
push ebx
push str.INVALID_SOCKET
mov dword [ebp - 4], ebx
call fcn.004c4087
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45b189
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x45b189
movzx ecx, word [edi + 0x18]
push ecx
mov word [ebp], 2
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [edi + 0xc]
mov edx, dword [edi + 0x1c]
push 4
mov word [ebp + 2], ax
lea eax, [ebp - 0x58]
push eax
push 0x1002
push 0xffff
push ecx
mov dword [ebp + 4], edx
mov dword [ebp - 0x58], 0x8000
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [edi + 0xc]
push 0x10
lea edx, [ebp]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x45ade8
mov ecx, dword [edi + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
push ebx
push ebx
push str.connect_failed
mov dword [edi + 0xc], 0xffffffff
call fcn.004c4087
jmp 0x45b035
mov edx, dword [edi + 0x14]
lea esi, [edi + 0x14]
mov byte [ebp + 0x42a50], 3
mov eax, dword [edx - 0xc]
add eax, 9
mov dword [ebp + 0x42a4c], eax
mov eax, edx
sub eax, 0x10
cmp dword [eax + 0xc], 1
jle 0x45ae17
mov eax, dword [eax + 4]
push eax
mov ecx, esi
call fcn.00405430
mov eax, dword [esi]
mov ecx, eax
mov ecx, dword [ecx - 0xc]
push ecx
push eax
lea edx, [ebp + 0x42a55]
push edx
call fcn.004ef8a0
mov eax, dword [edi + 0xc]
push eax
lea ebx, [ebp + 0x42a4c]
call fcn.00458980
add esp, 0x10
test eax, eax
je 0x45b033
mov ecx, dword [edi + 0xc]
push ecx
lea ebx, [ebp + 0x40a10]
call fcn.004589d0
add esp, 4
test eax, eax
je 0x45b033
cmp byte [ebp + 0x40a14], 3
jne 0x45b033
mov eax, dword [ebp + 0x40a25]
mov ecx, dword [ebp + 0x40a29]
lea edx, [ebp + 0x40a19]
mov dword [edi + 0x28], eax
mov eax, dword [ebp + 0x40a21]
test eax, eax
mov dword [ebp - 0x54], edx
mov edx, dword [ebp + 0x40a2d]
mov dword [edi + 0x2c], eax
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x5c], edx
je 0x45b033
movsx ax, byte [ebp + 0x40a15]
push 0x448
mov word [edi + 0x10], ax
call fcn.004c1f9b
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
test esi, esi
mov dword [ebp - 4], 1
je 0x45aee0
mov eax, dword [edi + 0x28]
mov ecx, dword [edi + 0x2c]
push eax
push ecx
call fcn.0047be90
mov dword [esi], vtable.CMpeg4Decoder.0
jmp 0x45aee2
xor esi, esi
test esi, esi
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x34], esi
je 0x45b033
cmp dword [edi + 0x2c], 0x160
jbe 0x45af09
mov dword [edi + 0xa8], 0x493e0
jmp 0x45af13
mov dword [edi + 0xa8], 0x249f0
lea esi, [edi + 0x44]
mov ebx, 0x19
jmp 0x45af20
mov ecx, dword [edi + 0xa8]
push ecx
call fcn.004c1fc6
mov dword [esi], eax
add esp, 4
add esi, 4
sub ebx, 1
jne 0x45af20
push 0x2c
lea edx, [ebp - 0xc8]
push 0
push edx
call fcn.004e9730
mov eax, dword [edi + 0x28]
add esp, 0xc
cmp eax, 0x120
ja 0x45af93
mov ecx, dword [edi + 0x2c]
cmp ecx, 0x160
jbe 0x45af93
add eax, eax
push eax
push ecx
push 1
lea ebx, [ebp - 0xc8]
call fcn.0047bb60
push 8
call fcn.004c1f9b
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x1c], esi
test esi, esi
mov dword [ebp - 4], 2
je 0x45afc7
mov ecx, dword [edi + 0x28]
add ecx, ecx
jmp 0x45afb0
push 8
call fcn.004c1f9b
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
test esi, esi
mov dword [ebp - 4], 3
je 0x45afc7
mov ecx, dword [edi + 0x28]
mov eax, dword [edi + 0x2c]
push 8
mov edi, ecx
call fcn.0047c350
mov edi, dword [ebp - 0x18]
mov dword [esi], vtable.CJpegEncoder.0
jmp 0x45afc9
xor esi, esi
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [edi + 0x28]
mov ecx, dword [ebp + 0x40a35]
mov edi, dword [edi + 0x2c]
push edx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x50], ecx
call fcn.0046dc30
mov edi, dword [ebp - 0x18]
xor esi, esi
push esi
push esi
push edi
push 0x45b8f0
push esi
push esi
mov dword [edi + 0x38], esi
mov dword [edi + 0x3c], esi
mov dword [edi + 0x40], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, esi
mov dword [ebp - 0x2c], eax
je 0x45b033
cmp dword [edi + 0xc], 0xffffffff
je 0x45b030
mov eax, dword [edi + 0xac]
test al, 2
je 0x45b1b0
and eax, 0xfffffffd
mov dword [edi + 0xac], eax
mov edi, dword [ebp - 0x18]
xor ebx, ebx
mov eax, dword [edi + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [ebp - 0x2c]
cmp esi, ebx
mov dword [edi + 0xc], 0xffffffff
je 0x45b05d
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x14], ebx
je 0x45b073
mov esi, dword [ebp - 0x14]
call fcn.0047cc10
push esi
call fcn.004c1fcb
add esp, 4
cmp dword [ebp - 0x34], ebx
je 0x45b094
mov ebx, dword [ebp - 0x34]
lea esi, [ebx + 8]
mov dword [ebx], vtable.CVideoDecoder.0
call fcn.0047d9a0
push ebx
call fcn.004c1fcb
add esp, 4
xor ebx, ebx
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x45b0a5
mov edi, eax
call fcn.00458610
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x28]
cmp eax, ebx
je 0x45b0b6
lea ecx, [edi + 0x34]
push ecx
push eax
call fcn.0046da00
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x45b0d2
mov edi, eax
call fcn.0047b100
mov edx, edi
push edx
call fcn.004c1fcb
mov edi, dword [ebp - 0x18]
add esp, 4
mov esi, dword [ebp - 0x3c]
cmp esi, ebx
je 0x45b0f1
mov eax, dword [esi + 0x24]
push eax
call fcn.004fdda0
push esi
call fcn.004fdfe0
push esi
call fcn.004c1fcb
add esp, 0xc
cmp dword [edi + 0xd4], ebx
mov dword [edi + 0xac], ebx
mov dword [edi + 0x28], ebx
mov dword [edi + 0x2c], ebx
mov dword [edi + 0x40], ebx
mov dword [edi + 0x38], ebx
mov dword [edi + 0x3c], ebx
mov dword [edi + 0xc8], ebx
mov dword [edi + 0xb8], ebx
mov dword [edi + 0xb0], ebx
mov word [edi + 0x10], 0xffff
mov dword [edi + 0xd0], ebx
je 0x45b154
call fcn.004c6f68
mov eax, dword [eax + 4]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
mov ecx, dword [eax + 0x20]
push ebx
push ebx
push 0x41b
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
mov dword [edi + 0xd4], ebx
mov dword [edi + 0xd8], ebx
lea esi, [edi + 0x44]
mov dword [ebp - 0x2c], 0x19
mov eax, dword [esi]
cmp eax, ebx
je 0x45b175
push eax
call fcn.004c1fcb
add esp, 4
mov dword [esi], ebx
add esi, 4
sub dword [ebp - 0x2c], 1
jne 0x45b164
mov eax, edi
mov byte [edi + 0x30], 0
call fcn.0045c3e0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x42b5c]
xor ecx, ebp
call fcn.004e0b83
add ebp, 0x42b60
mov esp, ebp
pop ebp
ret
test al, 8
je 0x45b273
mov edx, dword [ebp - 0x60]
and eax, 0xfffffff7
mov dword [edi + 0xac], eax
mov eax, dword [edi + 0x28]
cmp eax, 0x120
ja 0x45b1f6
mov ecx, dword [edi + 0x2c]
cmp ecx, 0x160
jbe 0x45b1f6
lea esi, [ebp - 0xc8]
push esi
mov ebx, edx
call fcn.0048b4f0
add esp, 4
mov dword [ebp - 0xa8], 1
mov edx, esi
mov esi, dword [edi + 0x2c]
imul esi, dword [edi + 0x28]
mov ecx, dword [ebp - 0x38]
mov eax, dword [ecx]
push 0
push esi
lea esi, [ebp + 0xa10]
push esi
push edx
mov edx, dword [eax + 4]
call edx
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push 0x529b37
mov ebx, eax
call fcn.0041aa20
lea eax, [ebp - 0x4c]
push eax
push edi
call fcn.0045c190
mov dword [ebp - 4], 4
mov eax, dword [eax]
push 0x53d840
push eax
call fcn.004e4a56
mov esi, eax
add esp, 8
test esi, esi
je 0x45b264
push esi
push ebx
lea ecx, [ebp + 0xa10]
push 1
push ecx
call fcn.004e4b83
push esi
call fcn.004e4c83
add esp, 0x14
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], 0xffffffff
call fcn.00404bc0
mov eax, dword [edi + 0xac]
test al, al
jns 0x45b2a2
and eax, 0xffffff7f
cmp dword [edi + 0xc8], 0
mov dword [edi + 0xac], eax
jne 0x45b29b
mov dword [edi + 0xc8], 1
mov eax, edi
call fcn.0045c3e0
mov eax, dword [edi + 0xac]
test al, 1
je 0x45b2c6
and eax, 0xfffffffe
mov dword [edi + 0xac], eax
mov eax, edi
mov dword [edi + 0xc8], 0
call fcn.0045c3e0
mov eax, dword [edi + 0xac]
test al, 0x40
je 0x45b301
mov edx, dword [edi + 0xc4]
movzx ecx, word [edi + 0x10]
mov esi, dword [edi + 0xcc]
and eax, 0xffffffbf
mov dword [edi + 0xac], eax
mov eax, dword [edi + 0xc0]
push edx
push eax
push ecx
mov dword [edi + 0xb8], 0
call fcn.00451c30
mov eax, dword [edi + 0xac]
test al, 0x20
je 0x45b343
and eax, 0xffffffdf
cmp dword [ebp - 0x14], 0
mov dword [edi + 0xac], eax
mov dword [edi + 0xb8], 0
je 0x45b33c
mov esi, dword [ebp - 0x14]
call fcn.0047cc10
push esi
call fcn.004c1fcb
add esp, 4
mov dword [ebp - 0x14], 0
mov eax, edi
call fcn.0045c3e0
mov eax, dword [edi + 0xac]
test al, 0x10
je 0x45b3fb
and eax, 0xffffffef
cmp dword [edi + 0xb8], 0
mov dword [edi + 0xac], eax
jne 0x45b37c
cmp dword [ebp - 0x14], 0
je 0x45b382
mov esi, dword [ebp - 0x14]
call fcn.0047cc10
push esi
call fcn.004c1fcb
add esp, 4
jmp 0x45b382
cmp dword [ebp - 0x14], 0
jne 0x45b3ea
push 0x2050
call fcn.004c1f9b
mov edx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x64]
add esp, 4
push edx
mov edx, dword [edi + 0x28]
mov esi, eax
mov eax, dword [ebp - 0x5c]
push eax
mov eax, dword [edi + 0x2c]
push ecx
push 0
push edx
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push 0x529b37
mov dword [ebp - 0x14], esi
call fcn.0041aa20
lea ecx, [ebp - 0x68]
push ecx
push edi
call fcn.0045ba10
mov ecx, eax
mov dword [ebp - 4], 5
call fcn.0041aec0
push eax
call fcn.0047cb40
add esp, 0x1c
lea ecx, [ebp - 0x68]
mov dword [ebp - 4], 0xffffffff
call fcn.00404bc0
mov eax, edi
mov dword [edi + 0xb8], 1
call fcn.0045c3e0
cmp dword [edi + 0x40], 0
lea eax, [edi + 0x40]
mov dword [ebp - 0x30], eax
jle 0x45b6f0
mov ebx, dword [edi + 0x3c]
mov esi, dword [edi + ebx*4 + 0x44]
mov eax, dword [esi]
mov ecx, dword [esi + 0xf]
sub eax, 0x17
mov dword [ebp - 0x40], eax
lea edx, [esi + 0x17]
mov dword [ebp - 0x20], edx
mov eax, 0x10624dd3
mul ecx
mov al, byte [esi + 9]
shr edx, 6
shr al, 3
and al, 3
mov dword [ebp - 0x1c], edx
jne 0x45b62c
mov eax, ecx
sub eax, dword [ebp - 0x44]
mov dword [ebp - 0x44], ecx
test eax, eax
jle 0x45b451
cmp eax, 0x190
jle 0x45b456
mov eax, 0x28
sub eax, 3
jns 0x45b45d
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [ebp - 0x20]
movzx eax, byte [ebx + 4]
and eax, 0xc0
xor edx, edx
cmp eax, 0xc0
sete dl
xor ecx, ecx
cmp dword [edi + 0xb8], ecx
je 0x45b4cb
cmp dword [ebp - 0x48], ecx
je 0x45b490
cmp edx, ecx
je 0x45b4cb
mov dword [ebp - 0x48], ecx
mov eax, dword [ebp - 0x14]
cmp eax, ecx
je 0x45b4cb
mov edi, dword [esi + 0xf]
mov dword [ebp - 0x6c], ecx
imul edi, edi, 0x2710
movzx ecx, byte [esi + 9]
shr ecx, 6
and ecx, 1
push ecx
mov ecx, dword [ebp - 0x40]
push ecx
lea ecx, [ebx - 0xe]
mov dword [ebp - 0x70], edi
push ecx
mov edi, eax
lea ecx, [ebp - 0x70]
call fcn.0047cc70
mov edi, dword [ebp - 0x18]
add esp, 0xc
xor ecx, ecx
cmp byte [esi + 8], 5
jne 0x45b4d7
mov dword [edi + 0xd8], ecx
cmp dword [edi + 0xc8], ecx
je 0x45b4ff
mov ebx, dword [ebp - 0x28]
lea edx, [edi + 0x34]
push edx
lea eax, [ebp - 0x9c]
push eax
call fcn.0046dcb0
push 0x50
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x45b013
cmp dword [edi + 0xd8], ecx
je 0x45b53a
mov ebx, dword [ebp - 0x28]
lea ecx, [edi + 0x34]
push ecx
lea edx, [ebp - 0x9c]
push edx
call fcn.0046dcb0
mov eax, dword [edi + 0x3c]
add eax, 1
cdq
mov ecx, 0x19
idiv ecx
mov dword [edi + 0x3c], edx
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
jmp 0x45b013
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 4], 6
mov eax, dword [ecx]
mov edx, dword [eax]
push ebx
call edx
test eax, eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 4], 0xffffffff
je 0x45b030
mov ecx, dword [eax]
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x9c], ecx
mov edx, dword [eax + 4]
mov ecx, dword [edi + 0x28]
mov dword [ebp - 0x98], edx
mov eax, dword [eax + 8]
mov dword [ebp - 0x94], eax
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x8c], eax
shr eax, 1
lea edx, [edi + 0x34]
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], eax
push edx
lea eax, [ebp - 0x9c]
push eax
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x7c], 1
call fcn.0046dcb0
mov eax, dword [edi + 0x3c]
add eax, 1
cdq
mov ecx, 0x19
idiv ecx
mov dword [edi + 0x3c], edx
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp dword [edi + 0xd4], 0
je 0x45b013
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax + 0x202c]
mov ecx, dword [eax + ecx*8 + 0x28]
mov eax, dword [eax + 0x18]
add ecx, 0x3e8
cmp ecx, eax
mov esi, ecx
ja 0x45b5f7
mov esi, eax
call fcn.004c6f68
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x1c]
push esi
push edx
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
push 0x41b
call eax
mov ecx, eax
call fcn.00405ea0
jmp 0x45b013
cmp al, 1
jne 0x45b6de
cmp dword [edi + 0xc8], 0
jne 0x45b013
cmp dword [edi + 0xb8], 0
je 0x45b668
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x45b668
cmp byte [esi + 0x204c], 0
je 0x45b668
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x40]
add eax, 0xfffffff2
call fcn.0047cdf0
cmp dword [ebp - 0x3c], 0
jne 0x45b682
push 0x2c
call fcn.004c1f9b
add esp, 4
mov esi, eax
mov dword [ebp - 0x3c], eax
call fcn.0047ca70
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x40]
push ecx
mov ecx, dword [ebp - 0x20]
push edx
lea edx, [ebp + 0x10]
call fcn.0047caa0
add esp, 8
cmp byte [0x5737d0], 0
je 0x45b51a
cmp byte [edi + 0x30], 0
je 0x45b51a
cmp dword [ebp - 0x24], 0
jne 0x45b6ca
push 0x6550
call fcn.004c1f9b
add esp, 4
mov dword [ebp - 0x24], eax
call fcn.0047b050
mov esi, dword [ebp - 0x24]
lea eax, [ebp + 0x10]
push eax
call fcn.0047b160
add esp, 4
jmp 0x45b51a
cmp byte [esi + 4], 0xa
jne 0x45b013
lea eax, [ebx + 1]
jmp 0x45b520
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x45b013