joyce8/EMBER2024-capa huggingface dataset:
Function at 0x455f20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
lea ecx, [eax - 1]
mov ebx, ecx
mov dword [ebp - 4], ecx
push edi
mov edi, dword [ebp + 0xc]
mov edx, edi
sar ebx, 1
mov dword [ebp + 0xc], edi
cmp edi, ebx
jge 0x455f82
add edx, edx
xor ecx, ecx
lea eax, [edx + edx*2]
movsd xmm0, qword [esi + eax*8 + 0x40]
comisd xmm0, xmmword [esi + eax*8 + 0x28]
lea eax, [edi + edi*2]
seta cl
xor ecx, 1
inc ecx
add edx, ecx
mov edi, edx
lea ecx, [edx + edx*2]
movups xmm0, xmmword [esi + ecx*8]
movups xmmword [esi + eax*8], xmm0
movq xmm0, qword [esi + ecx*8 + 0x10]
movq qword [esi + eax*8 + 0x10], xmm0
cmp edx, ebx
jl 0x455f43
mov eax, dword [ebp + 0x10]
cmp edx, ebx
jne 0x455fa8
test al, 1
jne 0x455fa8
lea ecx, [eax + eax*2]
movups xmm0, xmmword [esi + ecx*8 - 0x18]
lea eax, [edi + edi*2]
mov edi, dword [ebp - 4]
movups xmmword [esi + eax*8], xmm0
movq xmm0, qword [esi + ecx*8 - 8]
movq qword [esi + eax*8 + 0x10], xmm0
mov ebx, dword [ebp + 0x14]
cmp dword [ebp + 0xc], edi
jge 0x455fe3
lea ecx, [edi - 1]
sar ecx, 1
lea edx, [ecx + ecx*2]
movsd xmm0, qword [esi + edx*8 + 0x10]
comisd xmm0, xmmword [ebx + 0x10]
jbe 0x455fe3
lea eax, [edi + edi*2]
mov edi, ecx
movups xmm0, xmmword [esi + edx*8]
movups xmmword [esi + eax*8], xmm0
movq xmm0, qword [esi + edx*8 + 0x10]
movq qword [esi + eax*8 + 0x10], xmm0
cmp dword [ebp + 0xc], ecx
jl 0x455fb0
movups xmm0, xmmword [ebx]
lea eax, [edi + edi*2]
pop edi
movups xmmword [esi + eax*8], xmm0
movq xmm0, qword [ebx + 0x10]
movq qword [esi + eax*8 + 0x10], xmm0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4758b0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x6ac0b4]
test eax, eax
je 0x4758c6
push eax
call fcn.004c98b4
add esp, 4
push ebx
push esi
push edi
push 0x100
call fcn.004c98cf
mov esi, eax
add esp, 4
mov dword [0x6ac0b4], esi
xor ecx, ecx
mov byte [ecx + esi], cl
inc ecx
cmp ecx, 0x100
jb 0x4758e0
xor edi, edi
mov dword [ebp - 4], edi
mov eax, edi
mov bl, byte [edi + esi]
xor edx, edx
movzx ecx, bl
div dword [ebp + 0xc]
mov eax, dword [ebp + 8]
movzx eax, byte [edx + eax]
add eax, dword [ebp - 4]
add ecx, eax
movzx ecx, cl
mov dword [ebp - 4], ecx
mov dword [0x6ac0bc], ecx
mov al, byte [ecx + esi]
mov byte [ecx + esi], bl
mov byte [edi + esi], al
inc edi
cmp edi, 0x100
jb 0x4758f1
pop edi
pop esi
pop ebx
mov dword [0x6ac0b8], 0
mov dword [0x6ac0bc], 0
mov esp, ebp
pop ebp
ret
Function at 0x4787e0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov eax, dword [0x52de04]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x6ac0d0], 0
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
push edi
je 0x478815
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b3f28
mov esp, ebp
pop ebp
ret
sub esp, 0x18
mov dword [0x6ac0d0], 1
mov edx, esp
mov ecx, esi
xorps xmm0, xmm0
movups xmmword [edx], xmm0
mov dword [edx + 0x10], 0
lea edi, [ecx + 1]
mov dword [edx + 0x14], 0
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x478840
sub ecx, edi
push ecx
push esi
mov ecx, edx
call fcn.004020f0
lea eax, [ebp - 0x1c]
push eax
call fcn.0041cf40
push 0x44
lea eax, [ebp - 0x74]
push 0
push eax
call fcn.004b90a0
add esp, 0x28
lea eax, [ebp - 0x74]
xorps xmm0, xmm0
movups xmmword [ebp - 0x2c], xmm0
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
cmp dword [ebp + 0x10], 0
je 0x47888b
mov eax, 6
mov word [ebp - 0x44], ax
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x74]
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
cmovae ecx, dword [ebp - 0x1c]
or eax, 8
push 0
push 0
push eax
push 0
push 0
push 0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
test edi, edi
je 0x4788e4
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x4788cf
push ecx
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x24]
push dword [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx], eax
call esi
push dword [ebp - 0x2c]
call esi
lea ecx, [ebp - 0x1c]
mov dword [0x6ac0d0], 0
call fcn.00402610
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b3f28
mov esp, ebp
pop ebp
ret
Function at 0x479f10
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
nop dword [eax + eax]
push ebx
call fcn.004cf9d3
mov esi, eax
add esp, 4
mov eax, dword [ebp + 8]
add eax, edi
cmp esi, 0x80
jl 0x479f56
sub esi, 0x7f
push esi
push ebx
call fcn.004cf9d3
add esp, 4
push eax
mov eax, dword [ebp + 8]
add eax, edi
push eax
call fcn.004b90a0
add esp, 0xc
jmp 0x479f64
push ebx
push 1
inc esi
push esi
push eax
call fcn.004c37de
add esp, 0x10
add edi, esi
cmp edi, dword [ebp + 0xc]
jl 0x479f20
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x47eed0
Capabilities:
Encode data using xor
Hash data using crc32b

Disassembly:
push esi
push edi
xor edi, edi
push 8
push edi
call fcn.0047ef80
shl eax, 0x18
mov ecx, eax
add eax, eax
sar ecx, 0x1f
and ecx, 0x4c11db7
xor ecx, eax
mov edx, ecx
sar edx, 0x1f
and edx, 0x4c11db7
lea eax, [ecx + ecx]
xor edx, eax
mov ecx, edx
sar ecx, 0x1f
and ecx, 0x4c11db7
lea eax, [edx + edx]
xor ecx, eax
mov edx, ecx
sar edx, 0x1f
and edx, 0x4c11db7
lea eax, [ecx + ecx]
xor edx, eax
mov ecx, edx
sar ecx, 0x1f
and ecx, 0x4c11db7
lea eax, [edx + edx]
xor ecx, eax
mov edx, ecx
sar edx, 0x1f
and edx, 0x4c11db7
lea eax, [ecx + ecx]
xor edx, eax
mov esi, edx
sar esi, 0x1f
and esi, 0x4c11db7
lea eax, [edx + edx]
xor esi, eax
mov ecx, esi
sar ecx, 0x1f
and ecx, 0x4c11db7
lea eax, [esi + esi]
xor ecx, eax
push 0x20
push ecx
call fcn.0047ef80
mov dword [edi*4 + 0x6ac2c8], eax
add esp, 0x10
inc edi
cmp edi, 0xff
jle 0x47eed4
pop edi
pop esi
ret
Function at 0x47f140
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1014
call fcn.004b3f40
mov eax, dword [0x52de04]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x6ac2c0], 0
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x1008], eax
jne 0x47f178
call fcn.0047eed0
mov dword [0x6ac2c0], 1
push ebx
push esi
mov esi, dword [ebp + 8]
or ebx, 0xffffffff
cmp dword [ebp + 0x1c], 0x10
push edi
lea edi, [ebp + 8]
cmovae edi, esi
xor edx, edx
cmp dword [ebp + 0x18], edx
jle 0x47f1ab
movzx ecx, byte [edi + edx]
inc edx
movzx eax, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [ecx*4 + 0x6ac2c8]
cmp edx, dword [ebp + 0x18]
jl 0x47f192
mov eax, dword [ebp - 0x1008]
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [ebp - 0x1014], ecx
test ecx, ecx
jle 0x47f29f
xor edi, edi
mov dword [ebp - 0x1010], edi
nop dword [eax]
mov eax, dword [ebp - 0x1008]
mov eax, dword [eax]
add eax, edi
cmp dword [eax + 0x14], 0x10
jb 0x47f1f2
mov eax, dword [eax]
push 0x4fda68
push eax
call fcn.0041d3a0
add esp, 8
mov dword [ebp - 0x100c], eax
test eax, eax
je 0x47f286
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push 1
push eax
call fcn.004c37de
mov esi, eax
add esp, 0x10
test esi, esi
jle 0x47f278
nop dword [eax + eax]
xor edx, edx
movzx ecx, byte [ebp + edx - 0x1004]
inc edx
movzx eax, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [ecx*4 + 0x6ac2c8]
mov edi, ebx
cmp edx, esi
jl 0x47f232
push dword [ebp - 0x100c]
lea eax, [ebp - 0x1004]
push 0x1000
push 1
push eax
call fcn.004c37de
mov esi, eax
add esp, 0x10
test esi, esi
jg 0x47f230
mov edi, dword [ebp - 0x1010]
push dword [ebp - 0x100c]
call fcn.004c35d5
add esp, 4
add edi, 0x18
sub dword [ebp - 0x1014], 1
mov dword [ebp - 0x1010], edi
jne 0x47f1e0
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x1c]
not ebx
cmp eax, 0x10
jb 0x47f2d0
lea ecx, [eax + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x47f2c6
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x47f2e3
push ecx
push esi
call fcn.004b3acc
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b3f28
mov esp, ebp
pop ebp
ret
call fcn.004c342f
int3
Function at 0x48d8b0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 8]
mov eax, edi
nop dword [eax]
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [eax - 1], cl
test cl, cl
jne 0x48d8c0
mov eax, dword [0x9b9f30]
test eax, eax
jne 0x48d8fb
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x9b9f30], eax
test eax, eax
jne 0x48d8fb
push edi
push str.Failure_to_load__s_n_nCheck_your_installation.
push str.Error
call fcn.00415480
add esp, 0xc
pop edi
pop ebp
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.writeDeviceHeader
push eax
call esi
push str.writeLine
push dword [0x9b9f30]
mov dword [0x9ba010], eax
call esi
push str.writeDeviceLine
push dword [0x9b9f30]
mov dword [0x9ba028], eax
call esi
push str.writeDeviceClose
push dword [0x9b9f30]
mov dword [0x9ba024], eax
call esi
push str.writeDeviceFrameHeader
push dword [0x9b9f30]
mov dword [0x9ba02c], eax
call esi
push str.writeDeviceFrameTail
push dword [0x9b9f30]
mov dword [0x9ba01c], eax
call esi
push str.passCount
push dword [0x9b9f30]
mov dword [0x9ba020], eax
call esi
push str.copyCount
push dword [0x9b9f30]
mov dword [0x9ba014], eax
call esi
push 0x5064cc
push dword [0x9b9f30]
mov dword [0x9ba018], eax
call esi
cmp dword [0x9ba010], 0
mov dword [0x9ba030], eax
pop esi
je 0x48d9c4
cmp dword [0x9ba024], 0
jne 0x48d9bb
cmp dword [0x9ba028], 0
je 0x48d9c4
cmp dword [0x9ba02c], 0
jne 0x48d9d7
push edi
push str.Failure_to_load_one_or_more_I_O_routines_from__s
push str.Error
call fcn.00415480
add esp, 0xc
pop edi
pop ebp
ret

Function at 0x4946a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
push 0
push 0x9c1138
movsx eax, word [ecx]
push eax
lea eax, [ecx + 2]
push eax
push dword [0x9c113c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4946d7
push eax
push eax
push str.Error_executing_print_line
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop ebp
ret
mov eax, 1
pop ebp
ret

Function at 0x4949f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
push 0
push 0x9c114c
movsx eax, word [ecx]
push eax
lea eax, [ecx + 2]
push eax
push dword [0x9c1148]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x494a27
push eax
push eax
push str.Error_executing_print_line
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop ebp
ret
mov eax, 1
pop ebp
ret

Function at 0x496490
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0
push 0x9c1170
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4964af
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d_executing_sendData_n
call fcn.004153c0
add esp, 8
push 1
call fcn.004cf3c2
int3
Function at 0x496860
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
jne 0x4968b3
push 0x4fd8ac
call fcn.0041c8c0
push eax
push str.SUPPRESSMINPRINTWARNING
call fcn.00412960
add esp, 0xc
test eax, eax
jne 0x49688c
call fcn.00497950
push 0x148
call fcn.0049c406
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
je 0x4968ab
mov ecx, eax
call fcn.00496610
mov esi, eax
jmp 0x4968ad
xor esi, esi
mov dword [0x9c1180], esi
cmp byte [esi + 0x130], 0
je 0x4968d1
mov eax, dword [ebp + 0xc]
cdq
add dword [esi + 0x140], eax
adc dword [esi + 0x144], edx
xor eax, eax
pop esi
pop ebp
ret
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
jle 0x49696e
mov eax, dword [esi + 4]
test eax, eax
je 0x496915
cmp dword [esi + 0x120], 0
je 0x496900
push str.Windows_95_Vxd_legacy_code_should_never_execute.
call fcn.004153c0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
ret
push 0
lea ecx, [ebp + 8]
push ecx
push edi
push dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
ret
cmp dword [esi + 0x10], 0
je 0x496936
mov eax, dword [esi + 0x14]
test eax, eax
je 0x49696e
push edi
push dword [ebp + 0x10]
push eax
push esi
call fcn.00497820
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
ret
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x496958
call fcn.00498ef0
test eax, eax
je 0x49696e
mov ecx, dword [esi + 0x18]
push edi
push dword [ebp + 0x10]
call fcn.00498f90
pop edi
xor eax, eax
pop esi
pop ebp
ret
mov eax, dword [esi + 8]
test eax, eax
je 0x49696e
push eax
push edi
push 1
push dword [ebp + 0x10]
call fcn.004c3f01
add esp, 0x10
pop edi
xor eax, eax
pop esi
pop ebp
ret
Function at 0x497820
Capabilities:
Send data
Send data on socket
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x497874
push 0x4fd8ac
call fcn.0041c8c0
push eax
push str.SUPPRESSMINPRINTWARNING
call fcn.00412960
add esp, 0xc
test eax, eax
jne 0x49784d
call fcn.00497950
push 0x148
call fcn.0049c406
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
je 0x49786c
mov ecx, eax
call fcn.00496610
mov edi, eax
jmp 0x49786e
xor edi, edi
mov dword [0x9c1180], edi
mov eax, dword [ebp + 0x10]
mov ecx, eax
mov ebx, dword [ebp + 0x14]
mov dword [ebp + 8], ecx
test ebx, ebx
jle 0x49791c
push esi
push 0
push ebx
push ecx
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x497906
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2736
je 0x497941
cmp esi, 0x2744
je 0x4978c0
cmp esi, 0x2746
jne 0x497924
nop
push esi
push str.Lost_communication_with_printer_nConnection_reset_by_peer_nWindows_Winsock_Error_Code___d_nDo_you_want_to_attempt_reconnect_
push 0x30
push str.Warning
call fcn.00415920
add esp, 0x10
test eax, eax
je 0x497939
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [edi + 0x124]
call fcn.00496cf0
add esp, 4
push 0
push ebx
push dword [ebp + 8]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4978c0
mov ecx, dword [ebp + 8]
sub ebx, eax
add ecx, eax
mov dword [ebp + 8], ecx
test ebx, ebx
jg 0x497888
mov eax, dword [ebp + 0x10]
pop esi
sub ecx, eax
pop edi
mov eax, ecx
pop ebx
pop ebp
ret
push esi
push str.Windows_Winsock_Error_Code___d_n
push 0x10
push str.Error
call fcn.004154f0
add esp, 0x10
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x2736
push str.Winsock_Error__Lost_communication_with_printer_nCheck_physical_connection__cable_and_printer_status_nWindows_Winsock_Error_Code___d
jmp 0x49792a
Function at 0x4981c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ecx, esi
lea edx, [eax - 1]
mov dword [ebp - 4], esi
mov ebx, edx
mov dword [ebp + 0xc], edx
sar ebx, 1
push edi
mov edi, dword [ebp + 8]
cmp esi, ebx
jge 0x49822b
lea edx, [ecx + ecx]
xor eax, eax
mov ecx, edx
add ecx, ecx
movsd xmm0, qword [edi + ecx*8 + 0x10]
comisd xmm0, xmmword [edi + ecx*8 + 0x20]
seta al
add esi, esi
xor eax, 1
lea ecx, [eax + 1]
add ecx, edx
mov eax, ecx
add eax, eax
movsd xmm0, qword [edi + eax*8]
movsd qword [edi + esi*8], xmm0
movsd xmm0, qword [edi + eax*8 + 8]
movsd qword [edi + esi*8 + 8], xmm0
mov esi, ecx
cmp ecx, ebx
jl 0x4981e3
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
cmp ecx, ebx
jne 0x498250
test al, 1
jne 0x498250
add eax, eax
add esi, esi
movsd xmm0, qword [edi + eax*8 - 0x10]
movsd qword [edi + esi*8], xmm0
movsd xmm0, qword [edi + eax*8 - 8]
movsd qword [edi + esi*8 + 8], xmm0
mov esi, edx
mov ebx, dword [ebp - 4]
mov edx, dword [ebp + 0x14]
cmp ebx, esi
jge 0x498291
nop word [eax + eax]
movsd xmm0, qword [edx]
lea eax, [esi - 1]
sar eax, 1
mov ecx, eax
add ecx, ecx
movsd xmm1, qword [edi + ecx*8]
comisd xmm0, xmm1
jbe 0x498291
add esi, esi
movsd qword [edi + esi*8], xmm1
movsd xmm0, qword [edi + ecx*8 + 8]
movsd qword [edi + esi*8 + 8], xmm0
mov esi, eax
cmp ebx, eax
jl 0x498260
movsd xmm0, qword [edx]
add esi, esi
movsd qword [edi + esi*8], xmm0
movsd xmm0, qword [edx + 8]
movsd qword [edi + esi*8 + 8], xmm0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x498990
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x52de04]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [ebp - 0x98], esi
cmp esi, 0xffffffff
jne 0x4989d8
mov dword [0x9c12e4], 1
or eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b3f28
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x1c]
test eax, eax
jle 0x4989f5
push eax
lea eax, [ebp - 0x98]
push eax
call fcn.00498b10
mov esi, dword [ebp - 0x98]
add esp, 8
mov eax, dword [ebp + 0x20]
test eax, eax
jle 0x498a12
push eax
lea eax, [ebp - 0x98]
push eax
call fcn.00498ab0
mov esi, dword [ebp - 0x98]
add esp, 8
push dword [ebp + 0x14]
lea eax, [ebp - 0x84]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push str._d._d._d._d
push eax
call fcn.00404ce0
add esp, 0x18
mov eax, 2
mov word [ebp - 0x94], ax
push dword [ebp + 0x18]
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x92], ax
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x94]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x498a99
push esi
mov dword [0x9c12e4], 3
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b3f28
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004b3f28
mov esp, ebp
pop ebp
ret

Function at 0x498ab0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x52de04]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push dword [ebp + 0xc]
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x1c]
push 0x4fe110
push 0x15
push eax
call fcn.004426a0
add esp, 0x10
lea eax, [ebp - 0x1c]
push 0x15
push eax
push 0x1006
push 0xffff
push dword [esi]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004b3f28
mov esp, ebp
pop ebp
ret

Function at 0x498b10
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x52de04]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push dword [ebp + 0xc]
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x1c]
push 0x4fe110
push 0x15
push eax
call fcn.004426a0
add esp, 0x10
lea eax, [ebp - 0x1c]
push 0x15
push eax
push 0x1005
push 0xffff
push dword [esi]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004b3f28
mov esp, ebp
pop ebp
ret
Function at 0x498b70
Capabilities:
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f9ca1
mov eax, dword fs:[0]
push eax
sub esp, 0x19c
mov eax, dword [0x52de04]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1a8], edi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1a4], edi
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 1
push eax
lea ecx, [edi + 4]
mov dword [edi], 0
call fcn.00402330
lea eax, [ebp + 0x24]
mov byte [ebp - 4], 2
push eax
lea ecx, [edi + 0x1c]
call fcn.00402330
lea eax, [ebp - 0x1a0]
mov byte [ebp - 4], 3
push eax
push 0x101
mov dword [edi + 0x34], 0
call dword [sym.imp.WS2_32.dll_WSAStartup]
push dword [esi + 0x10]
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
push dword [esi]
call fcn.00498970
add esp, 0x14
mov dword [edi], eax
test eax, eax
jne 0x498c30
push dword [esi + 0x10]
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
push dword [esi]
push str.Failed_to_open_socket_to_IP___d._d._d._d:_d_n
call fcn.004153c0
add esp, 0x18
jmp 0x498cb6
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [ebp - 0x1a4]
push 4
push ecx
push 0x80
push 0xffff
push eax
mov dword [ebp - 0x1a4], 0x1e0001
call esi
push 4
lea eax, [ebp - 0x1a8]
mov dword [ebp - 0x1a8], 0xffff
push eax
push 0x1001
push 0xffff
push dword [edi]
call esi
push 4
lea eax, [ebp - 0x1a8]
push eax
push 0x1002
push 0xffff
push dword [edi]
call esi
mov ecx, edi
call fcn.00498f00
test eax, eax
jne 0x498cb6
mov ecx, edi
call fcn.00499040
test eax, eax
jne 0x498cb6
mov ecx, edi
call fcn.00498fc0
test eax, eax
jne 0x498cb6
mov dword [edi + 0x34], 1
mov ecx, dword [ebp + 0x20]
cmp ecx, 0x10
jb 0x498ce6
mov edx, dword [ebp + 0xc]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x498cdc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x498d47
push ecx
push edx
call fcn.004b3acc
add esp, 8
mov ecx, dword [ebp + 0x38]
mov dword [ebp + 0x1c], 0
mov dword [ebp + 0x20], 0xf
mov byte [ebp + 0xc], 0
cmp ecx, 0x10
jb 0x498d28
mov edx, dword [ebp + 0x24]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x498d1e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x498d47
push ecx
push edx
call fcn.004b3acc
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b3f28
mov esp, ebp
pop ebp
ret 0x34
call fcn.004c342f
int3