joyce8/EMBER2024-capa huggingface dataset:
Function at 0x519c20
Capabilities:
Write clipboard data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push edi
mov edi, ecx
call fcn.00517380
push eax
call fcn.0051e080
add esp, 4
test al, al
je 0x519e04
push ebx
push esi
call dword [sym.imp.USER32.dll_EmptyClipboard]
lea ecx, [ebp - 8]
call fcn.0051d650
mov ecx, edi
call fcn.0046e7b0
mov esi, dword [ebp + 8]
test al, al
je 0x519cbe
mov ecx, esi
call fcn.00476c80
push eax
mov ecx, esi
call fcn.00476a00
push eax
call fcn.00520dc0
mov ebx, eax
add esp, 8
lea ecx, [ebx + ebx]
push ecx
lea ecx, [ebp - 8]
call fcn.0051d8b0
lea ecx, [ebp - 8]
call fcn.0051d7d0
test al, al
je 0x519d31
push ebx
push dword [ebp - 4]
mov ecx, esi
call fcn.00476c80
push eax
mov ecx, esi
call fcn.00476a00
push eax
call fcn.00520e10
add esp, 0x10
lea ecx, [ebp - 8]
push 0xd
call fcn.0051e350
jmp 0x519d82
push dword [esi + 0x1c]
push dword [esi + 0x20]
call fcn.0051c070
add esp, 8
mov ecx, esi
mov ebx, eax
push 0
push 0
call fcn.00476c80
push eax
mov ecx, esi
call fcn.00476a00
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp + 8], eax
lea ecx, [eax + eax]
push ecx
lea ecx, [ebp - 8]
call fcn.0051d8b0
lea ecx, [ebp - 8]
call fcn.0051d7d0
test al, al
je 0x519d31
push dword [ebp + 8]
mov ecx, esi
push dword [ebp - 4]
call fcn.00476c80
push eax
mov ecx, esi
call fcn.00476a00
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0xd
lea ecx, [ebp - 8]
call fcn.0051e350
jmp 0x519d82
lea ecx, [ebp - 0x10]
call fcn.0051d650
mov ecx, esi
call fcn.00476c80
push eax
lea ecx, [ebp - 0x10]
call fcn.0051d8b0
lea ecx, [ebp - 0x10]
call fcn.0051d7d0
test al, al
je 0x519d7a
mov ecx, esi
call fcn.00476c80
push eax
mov ecx, esi
call fcn.00476a00
push eax
push dword [ebp - 0xc]
call fcn.00546560
add esp, 0xc
lea ecx, [ebp - 0x10]
push 1
call fcn.0051e350
lea ecx, [ebp - 0x10]
call fcn.0051d730
cmp byte [esi + 0x18], 0
mov ebx, dword [sym.imp.USER32.dll_SetClipboardData]
je 0x519dd6
movzx eax, word [edi + 0x79a]
push 0
push eax
call ebx
lea ecx, [ebp - 0x10]
call fcn.0051d650
push 1
lea ecx, [ebp - 0x10]
call fcn.0051d8b0
lea ecx, [ebp - 0x10]
call fcn.0051d7d0
test al, al
je 0x519dce
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 0x10]
mov byte [eax], 2
movzx eax, word [edi + 0x79c]
push eax
call fcn.0051e350
lea ecx, [ebp - 0x10]
call fcn.0051d730
cmp byte [esi + 0x19], 0
je 0x519df4
movzx eax, word [edi + 0x79e]
push 0
push eax
call ebx
movzx eax, word [edi + 0x7a0]
push 0
push eax
call ebx
call dword [sym.imp.USER32.dll_CloseClipboard]
lea ecx, [ebp - 8]
call fcn.0051d730
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 4
Function at 0x51dd20
Capabilities:
Get geographical location
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x633754]
xor eax, ebp
mov dword [ebp - 4], eax
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push 0xa
lea ecx, [ebp - 0x10]
movzx eax, ax
push ecx
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x51dd5f
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052a352
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x10]
push eax
call fcn.00580a67
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
call fcn.0052a352
mov esp, ebp
pop ebp
ret

Function at 0x51e080
Capabilities:
Open clipboard

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [sym.imp.USER32.dll_OpenClipboard]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
test esi, esi
jle 0x51e0a6
lea ecx, [esi - 1]
mov eax, 1
shl eax, cl
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call ebx
test eax, eax
jne 0x51e0ba
inc esi
cmp esi, 8
jl 0x51e091
pop edi
pop esi
xor al, al
pop ebx
pop ebp
ret
pop edi
pop esi
mov al, 1
pop ebx
pop ebp
ret

Function at 0x58d3f4
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5c807c
push 0x5c8074
push str.FlsAlloc
push 0x1e
call fcn.0058d0c4
mov esi, eax
add esp, 0x10
test esi, esi
je 0x58d428
push dword [ebp + 8]
mov ecx, esi
call dword [0x5aa7b8]
call esi
jmp 0x58d42e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x58d472
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x5c808c
push 0x5c8084
push str.FlsGetValue
push 0x20
call fcn.0058d0c4
mov esi, eax
add esp, 0x10
test esi, esi
je 0x58d4a9
push dword [ebp + 8]
mov ecx, esi
call dword [0x5aa7b8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x590016
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0058feea
Function at 0x593242
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x633754]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x59328d
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.005935e6
test al, al
jne 0x593287
sub edx, 2
cmp edx, edi
jne 0x59326d
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x5932af
lea eax, [edi + 2]
cmp edx, eax
je 0x5932af
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00592f09
add esp, 0x10
jmp 0x5933a9
push esi
lea ecx, [ebp - 0x255]
call fcn.005935e6
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x5932f2
push dword [ebp - 0x25c]
jmp 0x59329f
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x59332f
cmp word [ebp - 0x226], 0
je 0x593350
cmp word [ebp - 0x226], ax
jne 0x59332f
cmp word [ebp - 0x224], 0
je 0x593350
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00592f09
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x59339c
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x593309
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x593384
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x5933a9
push 0x592a28
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00552810
add esp, 0x10
jmp 0x593379
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0052a352
leave
ret
Function at 0x5948bf
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x59495c
push ebx
push esi
call fcn.0059487b
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0059476d
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x594909
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x59495b
push edi
push eax
call fcn.0058c7f1
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x594929
call fcn.0058aa56
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x59495a
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0059476d
add esp, 0x20
test eax, eax
jne 0x594948
push edi
call fcn.0058aa56
jmp 0x594950
push ebx
call fcn.0058aa56
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x59495f
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x594970
pop esi
ret
push ebx
push edi
push esi
call fcn.0059487b
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0058c7f1
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x594998
push ebx
push esi
push edi
call fcn.00546560
add esp, 0xc
push 0
call fcn.0058aa56
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x595238
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00594c0b

Function at 0x59be6e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0059ba36

Function at 0x59be79
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0059bbc5
Function at 0x5a2837
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x63bc20]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x5a2877
cmp byte [ebx], 0xa
jne 0x5a2877
or byte [eax + edi + 0x28], 4
jmp 0x5a287c
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x5a297a
mov al, byte [edx]
cmp al, 0x1a
je 0x5a295c
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x5a28ab
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x5a28d0
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x5a28da
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x5a288d
jmp 0x5a297a
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5a2957
cmp dword [ebp - 0xc], 0
je 0x5a2957
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x63bc20]
test byte [eax + edi + 0x28], 0x48
je 0x5a2931
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x5a291c
mov byte [esi], dl
jmp 0x5a292d
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x63bc20]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x5a297a
cmp byte [ebp - 1], 0xa
jne 0x5a2940
cmp esi, ebx
jne 0x5a2940
mov byte [esi], 0xa
jmp 0x5a2979
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.005a3875
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x5a297a
mov byte [esi], 0xd
jmp 0x5a2979
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x63bc20]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x5a2976
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x5a297a
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x5a2983
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x63bc20]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x5a29c6
cmp word [esi], dx
jne 0x5a29c6
or byte [edi + eax + 0x28], 4
jmp 0x5a29cb
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x5a2b04
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x5a2ae4
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x5a2a0d
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x5a2a43
cmp eax, edx
jae 0x5a2a4f
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x5a29e5
jmp 0x5a2b04
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5a2ae0
cmp dword [ebp - 0x14], 0
je 0x5a2ae0
mov eax, dword [ebx*4 + 0x63bc20]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x5a2ab8
mov cx, word [ebp - 4]
pop eax
cmp cx, ax
je 0x5a2afe
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x63bc20]
push 0xa
mov byte [edi + eax + 0x2a], cl
mov eax, dword [ebx*4 + 0x63bc20]
shr cx, 8
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x63bc20]
pop ecx
mov byte [edi + eax + 0x2c], cl
jmp 0x5a2b01
pop ebx
cmp word [ebp - 4], bx
jne 0x5a2ac9
cmp esi, dword [ebp + 0xc]
jne 0x5a2ac9
mov word [esi], bx
jmp 0x5a2b01
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.005a3875
add esp, 0x10
cmp word [ebp - 4], bx
je 0x5a2b04
push 0xd
jmp 0x5a2afd
mov ecx, dword [ebx*4 + 0x63bc20]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x5a2afb
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x5a2b04
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10004ac0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, eax
mov eax, dword [ebp + 8]
xor edx, edx
push edi
mov edi, dword [eax + 0x10]
cmp esi, 2
jl 0x10004b0d
test edi, edi
je 0x10004ae2
movzx eax, byte [ecx + 1]
movzx ebx, byte [ecx]
jmp 0x10004ae9
movzx eax, byte [ecx]
movzx ebx, byte [ecx + 1]
shl eax, 8
add eax, ebx
add ecx, 2
sub esi, 2
add edx, 2
cmp eax, 0xfeff
je 0x10004b08
cmp eax, 0xfffe
jne 0x10004b1f
xor edi, 1
cmp esi, 2
jge 0x10004ad5
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], edi
pop edi
mov eax, 0xfffffffe
pop esi
sub eax, edx
pop ebx
pop ebp
ret
lea ecx, [eax - 0xd800]
cmp ecx, 0x7ff
ja 0x10004b35
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], edi
pop edi
pop esi
mov eax, edx
pop ebx
pop ebp
ret

Function at 0x10007210
Capabilities:
Encode data using xor

Disassembly:
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10007215
sub eax, edx
mov edx, eax
xor eax, eax
xor ecx, ecx
test edx, edx
jle 0x10007249
push edi
lea esp, [esp]
movsx edi, byte [ecx + esi]
add eax, edi
imul eax, eax, 0x401
mov edi, eax
shr edi, 6
inc ecx
xor eax, edi
cmp ecx, edx
jl 0x10007230
pop edi
lea ecx, [eax + eax*8]
mov eax, ecx
shr eax, 0xb
xor eax, ecx
imul eax, eax, 0x8001
ret

Function at 0x10007660
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push esi
push 0x10038d9c
push eax
mov dword [ebp - 4], 0
call fcn.1000ac60
mov esi, eax
add esp, 8
test esi, esi
jne 0x1000768d
mov eax, 0xfa2
pop esi
mov esp, ebp
pop ebp
ret
push ebx
push edi
push 2
push 0
push esi
call fcn.100116da
push esi
call fcn.10010ddf
mov edi, dword [ebp + 0xc]
push eax
mov dword [edi], eax
call fcn.1000d268
mov ebx, dword [ebp + 8]
add esp, 0x14
mov dword [ebx], eax
test eax, eax
jne 0x100076cd
push esi
mov edi, 0xfa4
call fcn.100117c3
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push esi
call fcn.1000fd90
mov ecx, dword [edi]
mov edx, dword [ebx]
push esi
push 1
push ecx
push edx
call fcn.1000dba4
mov edi, dword [ebp - 4]
add esp, 0x14
push esi
call fcn.100117c3
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10007f40
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x1003e500]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x220], eax
lea edi, [eax + 1]
cmp dword [ebp + 0xc], eax
je 0x10007f86
lea eax, [ebp - 0x220]
push eax
push 0x8004667e
push ebx
mov dword [ebp - 0x220], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [ebp + 8]
push ecx
push esi
push ebx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x21c], eax
test eax, eax
je 0x100080c5
cmp dword [ebp + 0xc], 0
jne 0x10007fbb
mov eax, 0x839
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000d15f
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x2733
je 0x10007fd1
call esi
jmp 0x100080bf
mov dword [ebp - 0x218], edi
mov dword [ebp - 0x110], edi
mov edi, dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x214], ebx
mov dword [ebp - 0x10c], ebx
lea esi, [ebx + 1]
mov edx, dword [ebp + 0xc]
xor eax, eax
mov dword [ebp - 0x228], eax
lea ecx, [ebp - 0x228]
push ecx
mov dword [ebp - 0x228], edx
lea edx, [ebp - 0x218]
push edx
lea ecx, [ebp - 0x110]
push ecx
push eax
mov dword [ebp - 0x224], eax
push esi
mov dword [ebp - 0x224], eax
call edi
mov dword [ebp - 0x21c], eax
cmp eax, 0xffffffff
jne 0x10008051
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
mov eax, dword [ebp - 0x21c]
jne 0x100080c5
cmp eax, 0xffffffff
je 0x10007ff2
jmp 0x100080c5
test eax, eax
je 0x100080ba
mov esi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
lea edx, [ebp - 0x218]
push edx
push ebx
call esi
test eax, eax
jne 0x10008077
lea eax, [ebp - 0x110]
push eax
push ebx
call esi
test eax, eax
je 0x100080b5
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0x21c]
push edx
push 0x1007
push 0xffff
push ebx
mov dword [ebp + 8], 4
mov dword [ebp - 0x21c], 0
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
js 0x100080b5
cmp dword [ebp - 0x21c], 0
jne 0x100080b5
xor eax, eax
jmp 0x100080bf
or eax, 0xffffffff
jmp 0x100080bf
mov eax, 0x83b
mov dword [ebp - 0x21c], eax
cmp dword [ebp + 0xc], 0
je 0x100080ee
lea eax, [ebp - 0x220]
push eax
push 0x8004667e
push ebx
mov dword [ebp - 0x220], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp - 0x21c]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.1000d15f
mov esp, ebp
pop ebp
ret
Function at 0x10008960
Capabilities:
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
push ebx
push esi
push edi
xor edi, edi
or ebx, 0xffffffff
mov dword [esp + 0x10], edi
cmp word [0x10055bbc], di
jne 0x10008995
mov eax, 0x101
push 0x100410c0
push eax
mov word [0x10055bbc], ax
call dword [sym.imp.WS2_32.dll_WSAStartup]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2728
jne 0x100089ac
mov esi, 0x846
jmp 0x10008a83
xor eax, eax
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
lea edx, [esp + 0x1c]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0xc]
push edx
push eax
push ecx
mov dword [esp + 0x28], 8
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], 1
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x10008a05
mov esi, 0x843
jmp 0x10008a83
mov eax, dword [esp + 0x10]
mov esi, eax
cmp eax, edi
je 0x10008a20
mov ecx, 2
cmp dword [esi + 4], ecx
je 0x10008a22
mov esi, dword [esi + 0x1c]
cmp esi, edi
jne 0x10008a14
mov esi, eax
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov edi, dword [ebp + 0x10]
mov edx, edi
push 4
imul edx, edx, 0x3e8
mov ebx, eax
lea eax, [esp + 0x18]
push eax
push 0x1006
push 0xffff
push ebx
mov dword [esp + 0x28], edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x10008a68
mov esi, 0x842
jmp 0x10008a83
mov ecx, dword [esi + 0x10]
push edi
push ecx
mov ecx, dword [esi + 0x18]
call fcn.10007f40
mov esi, eax
add esp, 8
test esi, esi
je 0x10008a83
mov esi, 0x840
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10008a92
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x10008ab1
mov dword [0x1004032c], esi
test ebx, ebx
je 0x10008aa7
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10008fb0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0xc
push ebx
push esi
push edi
test eax, eax
jne 0x10008fcc
mov eax, 0x835
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], eax
test eax, eax
jle 0x100090a2
lea ecx, [ecx]
mov dword [ebp - 8], eax
cmp eax, 0x800
jle 0x10008ff1
mov dword [ebp - 8], 0x800
mov eax, dword [ebp + 0x14]
mov edi, dword [ebp + 8]
push eax
push edi
xor ebx, ebx
call fcn.100081d0
mov esi, eax
add esp, 8
mov dword [ebp - 0xc], esi
cmp esi, 0xffffffff
je 0x1000906e
cmp esi, 0x83b
je 0x1000906e
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
push ebx
push ecx
push edx
push edi
call dword [sym.imp.WS2_32.dll_send]
mov ebx, eax
test ebx, ebx
jns 0x10009082
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x274c
neg eax
sbb eax, eax
and eax, 9
add eax, 0x83b
mov ecx, 0x20
mov esi, str.internal
mov edi, 0x10055b2c
mov dword [0x10055b28], eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0xc]
mov byte [0x10055bac], 0
mov dword [0x10055bb0], 0
jmp 0x1000907c
push esi
push str.SGSocket_Send:_d_n
call fcn.1000ddd2
add esp, 8
test esi, esi
jne 0x10009098
test ebx, ebx
jle 0x10009098
mov eax, dword [ebp - 4]
add dword [ebp + 0xc], ebx
sub eax, ebx
mov dword [ebp - 4], eax
test eax, eax
jle 0x100090a2
jmp 0x10008fe0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x100090b0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 8
test eax, eax
jne 0x100090c6
mov eax, 0x835
mov esp, ebp
pop ebp
ret
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp + 0xc], eax
mov dword [ebp - 4], edi
test edi, edi
jle 0x1000919e
lea ebx, [ebx]
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
push eax
push esi
xor ebx, ebx
call fcn.10008100
add esp, 8
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x1000915d
cmp eax, 0x83b
je 0x1000915d
mov ecx, dword [ebp + 0xc]
push ebx
push edi
push ecx
push esi
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
test ebx, ebx
je 0x100091a7
jns 0x10009188
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x274c
neg eax
sbb eax, eax
and eax, 9
add eax, 0x83b
mov dword [0x10055b28], eax
mov eax, dword [ebp - 8]
mov ecx, 0x20
mov esi, str.internal
mov edi, 0x10055b2c
rep movsd dword es:[edi], dword [esi]
mov byte [0x10055bac], 0
mov dword [0x10055bb0], 0
jmp 0x1000917f
mov ecx, 0x20
mov esi, str.internal
mov edi, 0x10055b2c
mov dword [0x10055b28], eax
rep movsd dword es:[edi], dword [esi]
mov byte [0x10055bac], bl
mov dword [0x10055bb0], ebx
test eax, eax
jne 0x100091b3
mov edi, dword [ebp - 4]
test ebx, ebx
je 0x100091a7
test ebx, ebx
js 0x100091b3
add dword [ebp + 0xc], ebx
sub edi, ebx
mov dword [ebp - 4], edi
test edi, edi
jg 0x100090e0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x838
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret