joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40e04d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x42e5c8
cmp edx, dword [eax]
je 0x40e06f
add eax, 8
inc ecx
cmp eax, 0x42e658
jl 0x40e060
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x42e5c8]
jne 0x40e19d
mov eax, dword [0x431414]
cmp eax, 1
je 0x40e177
test eax, eax
jne 0x40e0a0
cmp dword [0x42e1a4], 1
je 0x40e177
cmp edx, 0xfc
je 0x40e19d
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40e0d7
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0040f3d0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0040f4c0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40e11a
lea eax, [ebp - 0x1a4]
push eax
call fcn.0040f4c0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x426d40
push edi
call fcn.00410f50
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0040f3d0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040f3e0
lea eax, [ebp - 0xa0]
push 0x42d1c0
push eax
call fcn.0040f3e0
push dword [esi + 0x42e5cc]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040f3e0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00410eb9
add esp, 0x2c
pop edi
jmp 0x40e19d
lea eax, [ebp + 8]
lea esi, [esi + 0x42e5cc]
push 0
push eax
push dword [esi]
call fcn.0040f4c0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x416850
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.0040acd0
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x41691b
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x41691b
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x4168ce
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x4168d9
or bh, 8
and edi, 0x8000000
je 0x4168f4
mov eax, dword [0x432bbc]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x41691b
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x416cf0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x416d1b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x416d3f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x416d5a
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x41a8c5
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x41a907
call fcn.0042004c
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x41a907
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x41a8fe
xor eax, eax
jmp 0x41a90f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0041a915
pop edi
pop esi
pop ebx
ret 4

Function at 0x4207b0
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4207de
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4207fc
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00420716
jmp 0x4207fc
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4207fc
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00420716
test edi, edi
mov eax, edi
jne 0x4207e6
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4016f0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
push esi
push edi
lea eax, [ebp - 0x108]
push 0x406ef8
push eax
call sub.CRTDLL.dll_strcpy
xor ebx, ebx
pop ecx
cmp byte [0x40c94c], bl
pop ecx
je 0x40173e
lea eax, [ebp - 0x108]
push 0x406ef4
push eax
call sub.CRTDLL.dll_strcat
lea eax, [ebp - 0x108]
push 0x40c94c
push eax
call sub.CRTDLL.dll_strcat
add esp, 0x10
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push 0x20006
push ebx
push ebx
lea eax, [ebp - 0x108]
push ebx
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x40177f
cmp dword [0x40d08c], ebx
jne 0x401778
push 0x406ec8
call sub.CRTDLL.dll_printf
pop ecx
push 0xa
jmp 0x40184e
mov esi, 0x408a44
push esi
call sub.CRTDLL.dll_strlen
pop ecx
inc eax
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 1
push ebx
push 0x406ebc
push dword [ebp - 4]
call esi
test eax, eax
je 0x4017bb
cmp dword [0x40d08c], ebx
jne 0x40184c
push 0x406e88
jmp 0x401846
mov edi, 0x40ca64
push edi
call sub.CRTDLL.dll_strlen
pop ecx
inc eax
push eax
push edi
push 1
push ebx
push 0x406e80
push dword [ebp - 4]
call esi
test eax, eax
je 0x4017ea
cmp dword [0x40d08c], ebx
jne 0x40184c
push 0x406e48
jmp 0x401846
mov edi, 0x407e2c
push edi
call sub.CRTDLL.dll_strlen
pop ecx
inc eax
push eax
push edi
push 1
push ebx
push 0x406e3c
push dword [ebp - 4]
call esi
test eax, eax
je 0x401819
cmp dword [0x40d08c], ebx
jne 0x40184c
push 0x406e0c
jmp 0x401846
mov edi, 0x40cf6c
push edi
call sub.CRTDLL.dll_strlen
pop ecx
inc eax
push eax
push edi
push 1
push ebx
push 0x406e08
push dword [ebp - 4]
call esi
test eax, eax
je 0x401851
cmp dword [0x40d08c], ebx
jne 0x40184c
push 0x406dd0
call sub.CRTDLL.dll_printf
pop ecx
push 0xb
pop eax
jmp 0x401853
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x401858
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push esi
lea eax, [ebp - 0x104]
push 0x406ef8
push eax
call sub.CRTDLL.dll_strcpy
cmp byte [0x40c94c], 0
pop ecx
pop ecx
je 0x401910
lea eax, [ebp - 0x104]
push 0x406ef4
push eax
call sub.CRTDLL.dll_strcat
mov esi, 0x40c94c
lea eax, [ebp - 0x104]
push esi
push eax
call sub.CRTDLL.dll_strcat
add esp, 0x10
lea eax, [ebp - 4]
push eax
push 0xf003f
lea eax, [ebp - 0x104]
push 0
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x4018e3
cmp dword [0x40d08c], 0
jne 0x4018df
push esi
push 0x406f44
call sub.CRTDLL.dll_printf
pop ecx
pop ecx
push 0xa
jmp 0x40190d
push 0x407b30
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
je 0x401910
cmp dword [0x40d08c], 0
jne 0x40190b
push esi
push 0x406f14
call sub.CRTDLL.dll_printf
pop ecx
pop ecx
push 0xb
pop eax
jmp 0x401912
xor eax, eax
pop esi
leave
ret
Function at 0x401915
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
lea eax, [ebp - 0x10c]
push 0x406ef8
push eax
call sub.CRTDLL.dll_strcpy
cmp byte [0x40c94c], 0
pop ecx
pop ecx
je 0x40195f
lea eax, [ebp - 0x10c]
push 0x406ef4
push eax
call sub.CRTDLL.dll_strcat
lea eax, [ebp - 0x10c]
push 0x40c94c
push eax
call sub.CRTDLL.dll_strcat
add esp, 0x10
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 8]
push edi
mov ebx, 0x20019
push eax
push ebx
lea eax, [ebp - 0x10c]
push 0
mov edi, closesocket
push eax
push edi
call esi
test eax, eax
je 0x4019c9
cmp dword [0x40d08c], 0
jne 0x4019a1
push 0x40c94c
push 0x406f7c
call sub.CRTDLL.dll_printf
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push 0x406ef8
push eax
call sub.CRTDLL.dll_strcpy
pop ecx
lea eax, [ebp - 8]
pop ecx
push eax
push ebx
lea eax, [ebp - 0x10c]
push 0
push eax
push edi
call esi
test eax, eax
jne 0x401a14
lea eax, [ebp - 4]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
lea eax, [ebp - 0xc]
push 0x408a44
push eax
push 0
push 0x406ebc
push dword [ebp - 8]
mov edi, 0x100
mov dword [ebp - 4], edi
call esi
test eax, eax
jne 0x401a14
lea eax, [ebp - 4]
mov dword [ebp - 4], edi
push eax
lea eax, [ebp - 0xc]
push 0x40ca64
push eax
push 0
push 0x406e80
push dword [ebp - 8]
call esi
test eax, eax
je 0x401a19
push 0xc
pop eax
jmp 0x401a74
lea eax, [ebp - 4]
mov ebx, 0x40cf6c
push eax
lea eax, [ebp - 0xc]
push ebx
push eax
push 0
push 0x406e08
push dword [ebp - 8]
mov dword [ebp - 4], 0x14
call esi
test eax, eax
je 0x401a4b
push 0x406f78
push ebx
call sub.CRTDLL.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp - 4]
mov dword [ebp - 4], edi
push eax
lea eax, [ebp - 0xc]
push 0x407e2c
push eax
push 0
push 0x406e3c
push dword [ebp - 8]
call esi
test eax, eax
je 0x401a72
and byte [0x407e2c], 0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401a79
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x114
lea eax, [esp + 0x14]
push ebx
push ebp
push esi
push edi
push 0x406ef8
push eax
call sub.CRTDLL.dll_strcpy
pop ecx
lea eax, [esp + 0x1c]
pop ecx
xor esi, esi
push eax
push 0x20019
lea eax, [esp + 0x2c]
push esi
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x401ad9
cmp dword [0x40d08c], esi
jne 0x401ace
push 0x40c94c
push 0x406f7c
call sub.CRTDLL.dll_printf
pop ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
cmp dword [0x40d08c], esi
mov dword [esp + 0x14], 0x14
jne 0x401b24
push 0x4070b0
call sub.CRTDLL.dll_printf
mov dword [esp], 0x40706c
call sub.CRTDLL.dll_printf
mov dword [esp], 0x40703c
call sub.CRTDLL.dll_printf
mov dword [esp], 0x40700c
call sub.CRTDLL.dll_printf
mov dword [esp], 0x406fe4
call sub.CRTDLL.dll_printf
pop ecx
and byte [0x40c94c], 0
mov dword [0x40d08c], 1
call fcn.00401915
push 0x406fd8
push dword [esp + 0x12c]
call sub.CRTDLL.dll_strcmp
pop ecx
mov esi, 0x40c94c
test eax, eax
pop ecx
mov ebx, 0x40ca64
mov ebp, 0x408a44
mov edi, 0x406fc8
je 0x401b7c
push 0x406fc0
push dword [esp + 0x12c]
call sub.CRTDLL.dll_strcmp
pop ecx
test eax, eax
pop ecx
jne 0x401b92
push esi
push 0x407e2c
push 0x40cf6c
push ebx
push ebp
push edi
call sub.CRTDLL.dll_printf
add esp, 0x18
and dword [esp + 0x10], 0
lea ecx, [esp + 0x1c]
mov eax, dword [esp + 0x10]
push ecx
xor ecx, ecx
push ecx
push ecx
push ecx
inc dword [esp + 0x20]
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], 0x14
push ecx
push esi
push eax
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x401ace
call fcn.00401915
push esi
push dword [esp + 0x12c]
call sub.CRTDLL.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x401bf9
push 0x406fc0
push dword [esp + 0x12c]
call sub.CRTDLL.dll_strcmp
pop ecx
test eax, eax
pop ecx
jne 0x401b97
push esi
push 0x407e2c
push 0x40cf6c
push ebx
push ebp
push edi
call sub.CRTDLL.dll_printf
add esp, 0x18
jmp 0x401b97
Function at 0x402031
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
mov esi, dword [ebp + 0xc]
push esi
mov dword [ebp - 8], 1
call sub.CRTDLL.dll_strlen
test eax, eax
pop ecx
jl 0x402056
cmp byte [eax + esi], 0x2e
je 0x402056
dec eax
jns 0x40204d
add eax, esi
cmp byte [eax], 0x2e
jne 0x4020f5
push eax
lea eax, [ebp - 0x1c]
push eax
call sub.CRTDLL.dll_strcpy
pop ecx
lea eax, [ebp + 0xc]
pop ecx
push eax
push 0x20019
lea eax, [ebp - 0x1c]
push 0
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4020bf
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x4071e4
mov dword [ebp - 4], 0x28
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp + 0xc]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
pop edi
je 0x402105
lea eax, [ebp - 0x1c]
push 0x4071dc
push eax
call sub.CRTDLL.dll__stricmp
pop ecx
test eax, eax
pop ecx
jne 0x4020da
push 0x4071cc
jmp 0x4020fa
lea eax, [ebp - 0x1c]
push 0x4071c4
push eax
call sub.CRTDLL.dll__stricmp
pop ecx
test eax, eax
pop ecx
jne 0x4020f5
push 0x4071a8
jmp 0x4020fa
push 0x40718c
lea eax, [ebp - 0x44]
push eax
call sub.CRTDLL.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp - 0x44]
push esi
push eax
push 0x407170
push dword [ebp + 8]
call sub.CRTDLL.dll_sprintf
add esp, 0x10
pop esi
leave
ret
Function at 0x403cc6
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [ebp - 8], ebx
cmp dword [esi + 4], ebx
mov dword [ebp - 4], 1
je 0x403e50
cmp dword [esi + 8], ebx
je 0x403e50
mov edi, dword [ebp + 0xc]
push edi
call fcn.00403ca1
test eax, eax
pop ecx
je 0x403d23
lea eax, [ebp + 0xc]
push 0xa
push eax
push edi
call sub.CRTDLL.dll_strtol
add esp, 0xc
cmp dword [ebp + 0xc], edi
je 0x403e49
push eax
call sub.WSOCK32.dll_htons
movzx edi, ax
jmp 0x403d3a
push 0x407a44
push edi
call sub.WSOCK32.dll_getservbyname
cmp eax, ebx
je 0x403e2f
movsx edi, word [eax + 8]
push dword [ebp + 8]
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
jne 0x403d64
push dword [ebp + 8]
call sub.WSOCK32.dll_gethostbyname
cmp eax, ebx
jne 0x403d5d
mov eax, 0xfa7
jmp 0x403e55
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
push ebx
push 1
push 2
mov dword [ebp - 0x14], eax
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x403d82
mov eax, 0xfa8
jmp 0x403e55
lea ecx, [ebp - 8]
push 4
push ecx
push 0xffffff7f
push 0xffff
push eax
mov word [ebp - 0x18], 2
mov word [ebp - 0x16], di
call sub.WSOCK32.dll_setsockopt
lea eax, [ebp - 0x18]
push 0x10
push eax
push dword [esi]
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x403df8
call sub.WSOCK32.dll_WSAGetLastError
mov ecx, eax
sub ecx, 0x2733
je 0x403df8
sub ecx, 0x1a
je 0x403df1
push eax
lea eax, [ebp - 0x218]
push 0x407a20
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x218]
push eax
call fcn.00403c4c
add esp, 0x10
mov eax, 0xfaf
jmp 0x403e55
mov eax, 0xfb1
jmp 0x403e55
mov eax, dword [0x40d084]
mov dword [esi + 0x20], eax
lea eax, [ebp - 4]
push eax
push 0x8004667e
push dword [esi]
call sub.WSOCK32.dll_ioctlsocket
mov eax, dword [esi]
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], eax
inc dword [esi + 0x24]
mov dword [esi + 0x128], 0x1e
mov dword [esi + 0x12c], ebx
xor eax, eax
jmp 0x403e55
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2afc
je 0x403e49
cmp eax, 0x2afb
je 0x403e49
add eax, 0xffffec78
jmp 0x403e55
mov eax, 0xfae
jmp 0x403e55
mov eax, 0xfa1
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x403e5c
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push ebx
push esi
mov esi, ecx
push edi
xor edi, edi
mov ecx, dword [esi]
lea eax, [esi + 0x24]
mov dword [eax], edi
mov dword [esi + 0x28], ecx
inc dword [eax]
cmp dword [ebp + 8], edi
lea ecx, [esi + 0x128]
je 0x403e87
mov dword [ecx], edi
jmp 0x403e8d
mov dword [ecx], 0x1e
push ecx
push edi
push edi
push eax
push edi
call sub.WSOCK32.dll_select
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403ed5
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2734
jne 0x403eb3
cmp dword [ebp + 8], edi
jne 0x403f52
push eax
lea eax, [ebp - 0x100]
push 0x407a78
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x100]
push eax
call fcn.00403c4c
add esp, 0x10
cmp ebx, edi
jne 0x403ede
cmp dword [ebp + 8], edi
jne 0x403f52
push edi
push 0x200
push dword [esi + 4]
push dword [esi]
call sub.WSOCK32.dll_recv
mov ebx, eax
cmp ebx, edi
je 0x403f1a
cmp ebx, 0xffffffff
jne 0x403f43
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x403f52
cmp eax, 0x2741
jle 0x403f21
cmp eax, 0x2746
jle 0x403f1a
cmp eax, 0x2749
jne 0x403f21
mov eax, 0xfb0
jmp 0x403f4b
push eax
lea eax, [ebp - 0x100]
push 0x407a48
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x100]
push eax
call fcn.00403c4c
add esp, 0x10
mov dword [esi + 0x14], ebx
mov dword [esi + 0xc], edi
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
mov eax, 0xfad
jmp 0x403f4b

Function at 0x403f89
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x200
push ebx
push esi
mov esi, ecx
push edi
xor eax, eax
mov ecx, dword [esi]
lea edi, [esi + 0x24]
lea ebx, [esi + 0x128]
mov dword [edi], eax
mov dword [esi + 0x28], ecx
inc dword [edi]
cmp dword [ebp + 0xc], eax
mov dword [ebx], 0x1e
jbe 0x404030
jmp 0x403fba
xor eax, eax
push ebx
push eax
push edi
push eax
push eax
call sub.WSOCK32.dll_select
cmp eax, 0xffffffff
jne 0x403ff0
call sub.WSOCK32.dll_WSAGetLastError
push eax
lea eax, [ebp - 0x100]
push 0x407aec
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x100]
push eax
call fcn.00403c4c
add esp, 0x10
mov eax, 0x400
cmp dword [ebp + 0xc], eax
ja 0x403ffd
mov eax, dword [ebp + 0xc]
push 0
push eax
push dword [ebp + 8]
push dword [esi]
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x404024
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jl 0x404047
cmp eax, 0x2734
jg 0x404039
jmp 0x40402a
sub dword [ebp + 0xc], eax
add dword [ebp + 8], eax
cmp dword [ebp + 0xc], 0
ja 0x403fb8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8
cmp eax, 0x2749
jne 0x404047
mov eax, 0xfb0
jmp 0x404032
push eax
lea eax, [ebp - 0x200]
push 0x407ab4
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x200]
push eax
call fcn.00403c4c
add esp, 0x10
mov eax, 0xfa2
jmp 0x404032
Function at 0x417cd0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
push esi
xor esi, esi
call fcn.00417c10
lea eax, [esp + 4]
push eax
push 0x20019
push esi
push str.CLSIDED834ED6_4B5A_4bfe_8F11_26DCA6B6A921InProcServer32
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x417d03
xor eax, eax
pop esi
add esp, 8
ret 4
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 4]
lea ecx, [esp + 8]
mov dword [esp + 8], 0x104
push ecx
push edx
push 0
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x417d2f
mov esi, 1
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 8
ret 4

Function at 0x4ba695
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4c23b0
cmp edx, dword [eax]
je 0x4ba6b7
add eax, 8
inc ecx
cmp eax, 0x4c2440
jl 0x4ba6a8
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4c23b0]
jne 0x4ba7e5
mov eax, dword [0x4c6d3c]
cmp eax, 1
je 0x4ba7bf
test eax, eax
jne 0x4ba6e8
cmp dword [0x4c22dc], 1
je 0x4ba7bf
cmp edx, 0xfc
je 0x4ba7e5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4ba71f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004bb080
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004bb510
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4ba762
lea eax, [ebp - 0x1a4]
push eax
call fcn.004bb510
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4bfa0c
push edi
call fcn.004bd3e0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004bb080
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004bb090
lea eax, [ebp - 0xa0]
push 0x4bf9ec
push eax
call fcn.004bb090
push dword [esi + 0x4c23b4]
lea eax, [ebp - 0xa0]
push eax
call fcn.004bb090
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.004bd354
add esp, 0x2c
pop edi
jmp 0x4ba7e5
lea eax, [ebp + 8]
lea esi, [esi + 0x4c23b4]
push 0
push eax
push dword [esi]
call fcn.004bb510
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret