joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4047dc
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404a0c
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40485f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404a0c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40485f
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404a28
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4048e8
xor eax, eax
push ebp
push 0x4048e1
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00404624
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x4048c6
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x404a48
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x4048c6
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4048e8
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x404a02
cmp byte [ebp - 0xd], 0
jne 0x40492f
cmp byte [ebp - 0x12], 0
je 0x404a02
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x404948
dec ebx
cmp byte [ebx], 0x2e
je 0x404957
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x404947
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x404a02
inc ebx
cmp byte [ebp - 0x12], 0
je 0x404994
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x404a02
cmp byte [ebp - 0xd], 0
je 0x404a02
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x404a02
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406aa4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x406add
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403ca8
jmp 0x406ae6
mov eax, ebx
mov edx, esi
call fcn.00403c0c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x406af0
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x406b11
mov al, byte [esp]
jmp 0x406b13
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x407198
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x407010
mov eax, dword [0x40b3a8]
cmp byte [eax], 0
je 0x407205
mov eax, dword [0x40b308]
call fcn.004029bc
call fcn.00402628
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.00405ec4
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40724c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40723b
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x40b2ec]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x40c710]
call fcn.004045e8
push eax
call sub.user32.dll_LoadStringA_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
add esp, 0x444
ret

Function at 0x407bcc
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor edx, edx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x407c30
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 7]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.00403e08
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetACP
mov edx, eax
pop eax
call fcn.00405d98
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407c37
lea eax, [ebp - 0xc]
call fcn.00403bb8
ret
Function at 0x4089d8
Capabilities:
Get socket status
Set socket configuration

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffef8
mov edi, eax
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov edx, edi
mov eax, dword [0x40ca08]
call fcn.00408e50
test eax, eax
je 0x408b04
mov esi, dword [eax + 0xb]
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
mov ebp, 0x3e8
xor ebx, ebx
lea eax, [esp + 4]
call fcn.00408730
lea edx, [esp + 4]
mov eax, esi
call fcn.00408720
push 0
push 0
push 0
lea eax, [esp + 0x10]
push eax
push esi
call sub.wsock32.dll_select
test eax, eax
jle 0x408acf
lea edx, [esp + 4]
mov eax, esi
call fcn.00408708
test al, al
je 0x408ad1
push esp
push 0x4004667f
push esi
call sub.wsock32.dll_ioctlsocket
test eax, eax
jne 0x408acb
cmp dword [esp], 0
jle 0x408ab9
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov edx, edi
mov eax, dword [0x40ca08]
call fcn.00408e50
test eax, eax
je 0x408aab
or byte [eax + 0x23], 0x10
mov edx, dword [eax + 0x24]
test edx, edx
je 0x408a93
push edx
call sub.kernel32.dll_SetEvent
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
push 1
call sub.kernel32.dll_Sleep
mov ebp, 0x3e8
jmp 0x408ad1
mov bl, 1
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
jmp 0x408ad1
test ebp, ebp
jle 0x408ac7
push 1
call sub.kernel32.dll_Sleep
dec ebp
jmp 0x408ad1
mov bl, 1
jmp 0x408ad1
mov bl, 1
jmp 0x408ad1
mov bl, 1
test bl, bl
je 0x408a16
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov edx, edi
mov eax, dword [0x40ca08]
call fcn.00408e50
test eax, eax
je 0x408b04
or byte [eax + 0x23], 4
mov edx, dword [eax + 0x24]
test edx, edx
je 0x408b04
push edx
call sub.kernel32.dll_SetEvent
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
add esp, 0x108
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x408d38
Capabilities:
Initialize winsock library

Disassembly:
push ebx
push esi
test dl, dl
je 0x408d46
add esp, 0xfffffff0
call fcn.00403240
mov ebx, edx
mov esi, eax
xor edx, edx
mov eax, esi
call fcn.004030e8
push 0x40c860
call sub.kernel32.dll_InitializeCriticalSection_1
push 0x40c878
push 0x101
call sub.wsock32.dll_WSAStartup
xor eax, eax
mov dword [esi + 4], eax
mov eax, esi
test bl, bl
je 0x408d86
call fcn.00403298
pop dword fs:[0]
add esp, 0xc
mov eax, esi
pop esi
pop ebx
ret
Function at 0x408ec4
Capabilities:
Create tcp socket
Create udp socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.0040401c
mov eax, dword [ebp - 8]
call fcn.0040401c
xor eax, eax
push ebp
push 0x4090c8
push dword fs:[eax]
mov dword fs:[eax], esp
xor esi, esi
cmp dword [ebp - 4], 0
je 0x4090ad
cmp dword [ebp - 8], 0
je 0x4090ad
lea eax, [ebp - 0x24]
xor ecx, ecx
mov edx, 0x10
call fcn.00402a2c
mov word [ebp - 0x24], 2
push 0x4090dc
mov eax, dword [ebp - 4]
call fcn.0040402c
push eax
call sub.wsock32.dll_getservbyname
test eax, eax
jne 0x408f4b
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.00405d98
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x22], ax
jmp 0x408f53
mov ax, word [eax + 8]
mov word [ebp - 0x22], ax
mov eax, dword [ebp - 8]
call fcn.0040402c
push eax
call sub.wsock32.dll_inet_addr
mov edi, eax
mov dword [ebp - 0x20], edi
inc edi
jne 0x408fa1
mov eax, dword [ebp - 8]
call fcn.0040402c
push eax
call sub.wsock32.dll_gethostbyname
test eax, eax
je 0x408f99
mov edx, dword [eax + 0xc]
mov edx, dword [edx]
mov cl, byte [edx]
mov byte [ebp - 0x20], cl
mov cl, byte [edx + 1]
mov byte [ebp - 0x1f], cl
mov cl, byte [edx + 2]
mov byte [ebp - 0x1e], cl
mov al, byte [edx + 3]
mov byte [ebp - 0x1d], al
jmp 0x408fa1
lea eax, [ebp - 8]
call fcn.00403bb8
cmp dword [ebp - 8], 0
je 0x4090ad
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jl 0x4090ad
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov eax, ebx
call fcn.00408dec
movzx eax, ax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x40909a
mov edx, dword [0x408950]
mov eax, 0x30
call fcn.00404420
mov edi, eax
mov ax, word [ebp - 0x10]
mov word [edi], ax
mov eax, dword [ebp + 8]
mov dword [edi + 0x24], eax
lea eax, [edi + 2]
mov edx, dword [ebp - 4]
call fcn.00403c0c
lea eax, [edi + 6]
mov edx, dword [ebp - 8]
call fcn.00403c0c
mov byte [edi + 0xa], 0
mov eax, dword [ebp - 0xc]
mov dword [edi + 0xb], eax
mov byte [edi + 0x23], 0
lea edx, [edi + 0xf]
lea eax, [ebp - 0x24]
mov ecx, 0x10
call fcn.00402678
xor eax, eax
mov dword [edi + 0x28], eax
mov eax, dword [ebx + 4]
mov dword [edi + 0x2c], eax
mov dword [ebx + 4], edi
mov eax, dword [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0x14]
push eax
mov ecx, 0x408c38
xor edx, edx
xor eax, eax
call fcn.00403b6c
mov dword [edi + 0x1f], eax
cmp dword [edi + 0x1f], 0
je 0x409081
push 0
mov eax, dword [edi + 0x1f]
push eax
call sub.kernel32.dll_SetThreadPriority
mov si, word [ebp - 0x10]
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
jmp 0x4090ad
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
xor ecx, ecx
mov dx, word [ebp - 0x10]
mov eax, ebx
call fcn.0040934c
jmp 0x4090ad
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
mov eax, dword [ebp - 0xc]
push eax
call sub.wsock32.dll_closesocket
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4090cf
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403bdc
ret
Function at 0x40934c
Capabilities:
Set socket configuration

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov word [esp], cx
mov esi, edx
mov edi, eax
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov edx, esi
mov eax, edi
call fcn.00408e50
mov ebx, eax
test ebx, ebx
je 0x409456
cmp dword [ebx + 6], 0
je 0x409456
mov ebp, dword [ebx + 0xb]
mov ebx, dword [ebx + 0x1f]
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
cmp word [esp], 0
jbe 0x4093b5
mov word [esp + 2], 1
movzx eax, word [esp]
mov ecx, 0x3e8
xor edx, edx
div ecx
inc eax
mov word [esp + 4], ax
jmp 0x4093c3
mov word [esp + 2], 0
mov word [esp + 4], 0
push 4
lea eax, [esp + 6]
push eax
push 0x80
push 0xffff
push ebp
call sub.wsock32.dll_setsockopt
push 2
push ebp
call sub.wsock32.dll_shutdown
push ebp
call sub.wsock32.dll_closesocket
test ebx, ebx
je 0x409414
jmp 0x4093f5
push 0xa
call sub.kernel32.dll_Sleep
lea eax, [esp + 8]
push eax
push ebx
call sub.kernel32.dll_GetExitCodeThread
test eax, eax
je 0x40940e
cmp dword [esp + 8], 0x103
je 0x4093ee
push ebx
call sub.kernel32.dll_CloseHandle_1
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov ebx, dword [edi + 4]
xor eax, eax
jmp 0x40942a
mov eax, ebx
mov ebx, dword [ebx + 0x2c]
test ebx, ebx
je 0x409433
cmp si, word [ebx]
jne 0x409425
test ebx, ebx
je 0x409456
test eax, eax
jne 0x409443
mov eax, dword [ebx + 0x2c]
mov dword [edi + 4], eax
jmp 0x409449
mov edx, dword [ebx + 0x2c]
mov dword [eax + 0x2c], edx
mov edx, dword [0x408950]
mov eax, ebx
call fcn.00404434
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x409468
Capabilities:
Set socket configuration

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov word [esp], cx
mov edi, edx
mov esi, eax
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov edx, edi
mov eax, esi
call fcn.00408e50
mov ebx, eax
test ebx, ebx
je 0x409593
cmp dword [ebx + 6], 0
jne 0x409593
mov ebp, dword [ebx + 0xb]
mov ebx, dword [ebx + 0x1f]
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
cmp word [esp], 0
jbe 0x4094d1
mov word [esp + 2], 1
movzx eax, word [esp]
mov ecx, 0x3e8
xor edx, edx
div ecx
inc eax
mov word [esp + 4], ax
jmp 0x4094df
mov word [esp + 2], 0
mov word [esp + 4], 0
push 4
lea eax, [esp + 6]
push eax
push 0x80
push 0xffff
push ebp
call sub.wsock32.dll_setsockopt
push 2
push ebp
call sub.wsock32.dll_shutdown
push ebp
call sub.wsock32.dll_closesocket
test ebx, ebx
je 0x409530
jmp 0x409511
push 0xa
call sub.kernel32.dll_Sleep
lea eax, [esp + 8]
push eax
push ebx
call sub.kernel32.dll_GetExitCodeThread
test eax, eax
je 0x40952a
cmp dword [esp + 8], 0x103
je 0x40950a
push ebx
call sub.kernel32.dll_CloseHandle_1
mov edx, edi
mov eax, esi
call fcn.00408e80
movzx ebx, ax
test ebx, ebx
je 0x40954d
mov cx, word [esp]
mov edx, ebx
mov eax, esi
call fcn.0040934c
test ebx, ebx
jne 0x409530
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov ebx, dword [esi + 4]
xor eax, eax
jmp 0x409567
mov eax, ebx
mov ebx, dword [ebx + 0x2c]
test ebx, ebx
je 0x409570
cmp di, word [ebx]
jne 0x409562
test ebx, ebx
je 0x409593
test eax, eax
jne 0x409580
mov eax, dword [ebx + 0x2c]
mov dword [esi + 4], eax
jmp 0x409586
mov edx, dword [ebx + 0x2c]
mov dword [eax + 0x2c], edx
mov edx, dword [0x408950]
mov eax, ebx
call fcn.00404434
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4095a8
Capabilities:
Set socket configuration

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffd8
mov dword [esp], ecx
mov edi, edx
mov esi, eax
mov word [esp + 4], 0
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov edx, edi
mov eax, esi
call fcn.00408e50
mov ebx, eax
test ebx, ebx
je 0x40976c
cmp dword [ebx + 6], 0
jne 0x40976c
lea edx, [esp + 0x18]
lea eax, [ebx + 0xf]
mov ecx, 0x10
call fcn.00402678
mov dword [esp + 0x10], 0x10
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [ebx + 0xb]
push eax
call sub.wsock32.dll_accept
mov ebp, eax
test ebp, ebp
jl 0x409760
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov edx, edi
mov eax, esi
call fcn.00408e50
mov ebx, eax
mov eax, esi
call fcn.00408dec
movzx eax, ax
mov dword [esp + 8], eax
test ebx, ebx
je 0x409721
cmp dword [ebx + 6], 0
jne 0x409721
cmp dword [esp + 8], 0
jle 0x409721
mov edx, dword [0x408950]
mov eax, 0x30
call fcn.00404420
mov edi, eax
mov ax, word [esp + 8]
mov word [edi], ax
mov eax, dword [esp]
mov dword [edi + 0x24], eax
lea eax, [edi + 2]
mov edx, dword [ebx + 2]
call fcn.00403c0c
lea eax, [edi + 6]
mov edx, 0x40978c
call fcn.00403c0c
mov al, byte [ebx + 0xa]
mov byte [edi + 0xa], al
mov dword [edi + 0xb], ebp
mov byte [edi + 0x23], 0
lea edx, [edi + 0xf]
lea eax, [esp + 0x18]
mov ecx, 0x10
call fcn.00402678
mov dword [edi + 0x28], ebx
mov eax, dword [esi + 4]
mov dword [edi + 0x2c], eax
mov dword [esi + 4], edi
mov eax, dword [esp + 8]
push eax
push 0
lea eax, [esp + 0x1c]
push eax
mov ecx, 0x408d24
xor edx, edx
xor eax, eax
call fcn.00403b6c
mov ebx, eax
mov dword [edi + 0x1f], ebx
test ebx, ebx
je 0x409707
push 0
push ebx
call sub.kernel32.dll_SetThreadPriority
mov ax, word [esp + 8]
mov word [esp + 4], ax
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
jmp 0x409776
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
xor ecx, ecx
mov dx, word [esp + 8]
mov eax, esi
call fcn.0040934c
jmp 0x409776
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
mov word [esp + 0xc], 0
mov word [esp + 0xe], 0
push 4
lea eax, [esp + 0x10]
push eax
push 0x80
push 0xffff
push ebp
call sub.wsock32.dll_setsockopt
push 2
push ebp
call sub.wsock32.dll_shutdown
push ebp
call sub.wsock32.dll_closesocket
jmp 0x409776
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
jmp 0x409776
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
mov ax, word [esp + 4]
add esp, 0x28
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x409814
Capabilities:
Get socket status
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffedc
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov word [ebp - 2], dx
mov ebx, eax
mov eax, dword [ebp - 8]
call fcn.0040401c
mov eax, dword [ebp + 0x10]
call fcn.0040401c
xor eax, eax
push ebp
push 0x4099b8
push dword fs:[eax]
mov dword fs:[eax], esp
or esi, 0xffffffff
cmp dword [ebp - 8], 0
je 0x40999a
cmp dword [ebp + 0x10], 0
je 0x40999a
lea eax, [ebp - 0x20]
xor ecx, ecx
mov edx, 0x10
call fcn.00402a2c
mov word [ebp - 0x20], 2
push 0x4099cc
mov eax, dword [ebp - 8]
call fcn.0040402c
push eax
call sub.wsock32.dll_getservbyname
test eax, eax
jne 0x4098a0
xor edx, edx
mov eax, dword [ebp - 8]
call fcn.00405d98
push eax
call sub.wsock32.dll_htons
mov word [ebp - 0x1e], ax
jmp 0x4098a8
mov ax, word [eax + 8]
mov word [ebp - 0x1e], ax
mov eax, dword [ebp + 0x10]
call fcn.0040402c
push eax
call sub.wsock32.dll_inet_addr
mov edi, eax
mov dword [ebp - 0x1c], edi
inc edi
jne 0x4098f6
mov eax, dword [ebp + 0x10]
call fcn.0040402c
push eax
call sub.wsock32.dll_gethostbyname
test eax, eax
je 0x4098ee
mov edx, dword [eax + 0xc]
mov edx, dword [edx]
mov cl, byte [edx]
mov byte [ebp - 0x1c], cl
mov cl, byte [edx + 1]
mov byte [ebp - 0x1b], cl
mov cl, byte [edx + 2]
mov byte [ebp - 0x1a], cl
mov al, byte [edx + 3]
mov byte [ebp - 0x19], al
jmp 0x4098f6
lea eax, [ebp + 0x10]
call fcn.00403bb8
cmp dword [ebp + 0x10], 0
je 0x40999a
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov dx, word [ebp - 2]
mov eax, ebx
call fcn.00408e50
test eax, eax
je 0x409990
mov ebx, dword [eax + 0xb]
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
lea eax, [ebp - 0x124]
call fcn.00408730
lea edx, [ebp - 0x124]
mov eax, ebx
call fcn.00408720
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0x124]
push eax
push 0
push ebx
call sub.wsock32.dll_select
test eax, eax
jl 0x40999a
lea edx, [ebp - 0x124]
mov eax, ebx
call fcn.00408708
test al, al
je 0x40998c
push 0x10
lea eax, [ebp - 0x20]
push eax
push 0
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
call sub.wsock32.dll_sendto
mov esi, eax
jmp 0x40999a
xor esi, esi
jmp 0x40999a
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4099bf
lea eax, [ebp - 8]
call fcn.00403bb8
lea eax, [ebp + 0x10]
call fcn.00403bb8
ret
Function at 0x4099d0
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov edi, edx
mov ebx, eax
or esi, 0xffffffff
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov edx, edi
mov eax, ebx
call fcn.00408e50
test eax, eax
je 0x409a6e
mov ebx, dword [eax + 0xb]
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
lea eax, [ebp - 0x110]
call fcn.00408730
lea edx, [ebp - 0x110]
mov eax, ebx
call fcn.00408720
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x110]
push eax
push 0
push ebx
call sub.wsock32.dll_select
test eax, eax
jl 0x409a78
lea edx, [ebp - 0x110]
mov eax, ebx
call fcn.00408708
test al, al
je 0x409a6a
push 0
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 4]
push eax
push ebx
call sub.wsock32.dll_send
mov esi, eax
jmp 0x409a78
xor esi, esi
jmp 0x409a78
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x409a84
Capabilities:
Get socket status

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef4
mov edi, edx
mov ebx, eax
or esi, 0xffffffff
push 0x40c860
call sub.kernel32.dll_EnterCriticalSection_1
mov edx, edi
mov eax, ebx
call fcn.00408e50
test eax, eax
je 0x409b03
mov ebx, dword [eax + 0xb]
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
lea eax, [esp + 8]
call fcn.00408730
lea edx, [esp + 8]
mov eax, ebx
call fcn.00408720
xor eax, eax
mov dword [esp], eax
xor eax, eax
mov dword [esp + 4], eax
push esp
push 0
lea eax, [esp + 0x10]
push eax
push 0
push ebx
call sub.wsock32.dll_select
test eax, eax
jl 0x409b0d
xor esi, esi
lea edx, [esp + 8]
mov eax, ebx
call fcn.00408708
test al, al
je 0x409b0d
mov esi, 0x400
jmp 0x409b0d
push 0x40c860
call sub.kernel32.dll_LeaveCriticalSection_1
mov eax, esi
add esp, 0x10c
pop edi
pop esi
pop ebx
ret