joyce8/EMBER2024-capa huggingface dataset:
Function at 0x835770
Capabilities:
Encrypt data using rc4 ksa
Encrypt data using rc4 prga

Disassembly:
iretd
jg 0x835741
in al, dx
stosd dword es:[edi], eax
lcall 0xf550, 0x2a5677ab
pop ebp
outsd dx, dword [esi]
mov ebp, 0x2e8afedf
jae 0x8356af
add ecx, dword [ecx]
xchg bl, al
sbb eax, 0x9545707
inc byte [eax]
cmp byte [ecx - 1], al
xchg ebp, eax
mov ch, 0x14
js 0x83578d
adc al, 0x78
idiv ebx
idiv ebx
mov esi, 0x7f3330ad
fild qword [ebp + 0x48932a94]
pop ds
out dx, eax
dec ebx
jno 0x835701
dec ebp
aaa
mov edx, ebp
mov bl, 0x99
inc ebx
or byte [ebx + 0x4cff2478], 0x6b
sub cl, ch
cmp ebp, dword [esi]
popfd
dec edx
sub ch, al
inc ecx
add al, 0x30
sysexit
test byte [ebx], dl
add al, cl
pop ebp
out dx, al
mov bh, 0x3c
sub al, 0x30
nop
test al, 0x22
and al, 0xb
cmc
cmc
invalid
fnstcw word [edx - 0x21]
shr dword ss:[ebx], 1
cmp ebp, dword [ecx]
jo 0x8357e4
add cl, 0x75
push es
jle 0x835725
mov ch, 0x18
pop esi
jge 0x8357cc
aaa
div dword [edx]
div cl
xor dh, dh
int1
popfd
push edi
js 0x83578e
outsb dx, byte [esi]
sub dword [esi - 0x5c], esi
sub bl, ch
jmp 0x8357ba
sub ebp, dword [ebx + 0x5ec7cee5]
cmpsb byte [esi], byte es:[edi]
cmc
cmp dword [esi + 0xf], 0x6d
inc ebp
movsb byte es:[edi], byte [esi]
push ebx
stosd dword es:[edi], eax
add dh, byte [ebx + 0x4f7d3bb3]
push ecx
and eax, 0x2ad7694b
cmpsb byte [esi], byte es:[edi]
invalid
sbb al, 6
js 0x835781
xor ch, 0xbb
shr dword [eax - 0xb1b1720], 1
int 0x79
mov dl, byte [ecx - 0x19162ef8]
stosd dword es:[edi], eax
shr ecx, 1
out 0xab, al
jmp 0x7ed303b8
dec edi
jle 0x83576a
push edx
cmp dword [esi + 0x692f653c], ecx
xchg ecx, eax
cli
mov ebp, dword [edi]
xor esi, dword [ecx - 0x547cb86b]
jb 0x835824
dec esi
out 0xc7, al
sub eax, 0x724099ee
jnp 0x8357cd
iretd
push 0xa80a1cbc
or eax, 0xcee6987c
into
enter 0xffffffffffff970d, 0xffffffffffffffc0
xchg esi, eax
push cs
pushal
cmp al, 0x74
xchg edi, eax
rcl byte [esi + 0x3c67600e], 0x74
add dword [ebx - 0x6b], ebp
rcr cl, 0xd0
and al, 0x73
js 0x835835
inc edi
in eax, dx
push es
arpl word [ebx*2 - 0x26430e3e], cx
cli
cmpsb byte ds:[esi], byte es:[edi]
int1
mov esp, 0xa63efad9
jge 0x835848
pushal
je 0x835807
sbb ch, ah
inc edi
mov dword [0xc770bdc6], eax
jo 0x8357fe
or ah, byte [ecx + 0x1ffa582f]
dec ecx
cmpsb byte [esi], byte es:[edi]
mov eax, dword [0xf3407dc4]
jge 0x83580a
dec ecx
push edi
sahf
imul esi, dword [ebx + 0x4e3e65dd], 0x1c
enter 0xffffffffffffef2d, 0x6a
test bl, dl
cmp al, 0x27
outsd dx, dword [esi]
mov al, byte [0xcf67b8fc]
enter 0xffffffffffffe334, 0x7f
mov edi, 0x721a075a
jns 0x835875
fld qword [edx]
mov edi, 0x75b52906
pop esp
inc ebx
sar eax, cl
enter 0xffffffffffff9912, 0x1e
std
invalid
Function at 0x401b00
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x407044
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [0x40703c]
sub esp, 4
test ebx, ebx
je 0x401b4b
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
sub esp, 4
mov esi, eax
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x401b44
test esi, esi
je 0x401b44
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401b20
mov dword [esp], 0x407044
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x401d30
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
lea esi, [esp + 0x24]
mov dword [esp], str.Mingw_runtime_failure:_n
lea ebx, [eax + 0x40]
mov dword [esp + 0xc], ebx
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x401d80
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x4c
lea eax, [esp + 0x24]
mov dword [esp + 8], 0x1c
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x401e58
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x401dbe
cmp eax, 4
jne 0x401de0
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.msvcrt.dll_memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0x1c]
cmp edx, 0x40
je 0x401dce
cmp edx, 4
je 0x401dce
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.00401d30
Function at 0x4068fb
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
lea eax, [ebp - 0x23c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x40691f
xor eax, eax
test eax, eax
je 0x406932
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x406932
xor ecx, ecx
jmp 0x406935
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x40a014]
lea eax, [ebp + eax*2 - 0x23c]
push ecx
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x23c]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

Function at 0x406a58
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x43110c], 0
push esi
jne 0x406a8f
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406a69
mov dword [ecx*4 + 0x431108], eax
inc ecx
cmp ecx, 0x100
jl 0x406a64
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406ac0
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x431108]
xor eax, esi
inc ecx
dec edx
jne 0x406aa2
pop edi
not eax
pop esi
ret 0xc

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

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
mov ebx, 0x40c7d0
nop
nop
mov ecx, 0x6cbf7e92
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x43204e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x432024
nop
nop
mov eax, section..data
nop
mov ebx, 0x42f314
nop
nop
mov ecx, 0x26f376e0
nop
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x432084
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x43206c
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x402594
Capabilities:
Terminate process

Disassembly:
test eax, eax
je 0x4025a2
call dword [0x40b004]
or eax, eax
je 0x4025a3
ret
mov al, 1
jmp fcn.00402614

Function at 0x4025ac
Capabilities:
Terminate process

Disassembly:
test eax, eax
je 0x4025ba
call dword [0x40b008]
or eax, eax
jne 0x4025bb
ret
mov al, 2
jmp fcn.00402614

Function at 0x4025c4
Capabilities:
Terminate process

Disassembly:
mov ecx, dword [eax]
test ecx, ecx
je 0x4025fc
test edx, edx
je 0x4025e6
push eax
mov eax, ecx
call dword [0x40b00c]
pop ecx
or eax, eax
je 0x4025f5
mov dword [ecx], eax
ret
mov al, 2
jmp fcn.00402614
mov dword [eax], edx
mov eax, ecx
call dword [0x40b008]
or eax, eax
jne 0x4025df
ret
mov al, 1
jmp fcn.00402614
test edx, edx
je 0x402610
push eax
mov eax, edx
call dword [0x40b004]
pop ecx
or eax, eax
je 0x4025f5
mov dword [ecx], eax
ret

Function at 0x403780
Capabilities:
Terminate process

Disassembly:
mov al, 0x10
jmp fcn.00402614
cmp eax, edx
je 0x4037f0
cmp word [eax], 8
jb 0x4037a5
push eax
push edx
cmp word [eax], 0x100
je 0x40379b
push eax
call sub.oleaut32.dll_VariantClear
jmp 0x4037a3
add eax, 8
call fcn.00403198
pop edx
pop eax
cmp word [edx], 8
jae 0x4037bc
mov ecx, dword [edx]
mov dword [eax], ecx
mov ecx, dword [edx + 8]
mov dword [eax + 8], ecx
mov ecx, dword [edx + 0xc]
mov dword [eax + 0xc], ecx
ret
cmp word [edx], 0x100
jne 0x4037dc
mov edx, dword [edx + 8]
or edx, edx
je 0x4037d3
mov ecx, dword [edx - 8]
inc ecx
jle 0x4037d3
mov dword [edx - 8], ecx
mov word [eax], pe_nt_image_headers32
mov dword [eax + 8], edx
ret
mov word [eax], 0
push edx
push eax
call sub.oleaut32.dll_VariantCopyInd
or eax, eax
jne 0x403744
ret

Function at 0x40515c
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
test eax, eax
jle 0x405195
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403278
jmp 0x40519e
mov eax, ebx
mov edx, esi
call fcn.0040322c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4051a8
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
test eax, eax
jle 0x4051c9
mov al, byte [esp]
jmp 0x4051cb
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x406850
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x406898
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 4]
mov eax, ebx
call fcn.004067ec
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
call sub.kernel32.dll_GetFileAttributesA
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40689f
lea eax, [ebp - 4]
call fcn.00403198
ret
Function at 0x406aa0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x406b2e
push dword fs:[eax]
mov dword fs:[eax], esp
test ebx, ebx
jne 0x406aeb
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [ebp - 0x108]
mov eax, esi
call fcn.00403278
jmp 0x406b18
call sub.kernel32.dll_GetCommandLineA_1
cmp byte [eax], 0
jne 0x406aff
lea eax, [ebp - 4]
call fcn.00403198
jmp 0x406b0e
lea edx, [ebp - 4]
call fcn.00406964
test ebx, ebx
je 0x406b0e
dec ebx
jmp 0x406af0
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.0040322c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406b35
lea eax, [ebp - 4]
call fcn.00403198
ret

Function at 0x406b3c
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
mov edx, ebx
mov eax, esp
call fcn.00404d30
add esp, 0x104
pop ebx
ret

Function at 0x406c84
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
xor eax, eax
push ebp
push 0x406da5
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 8]
push eax
push 0
push edi
push esi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x406d8f
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
je 0x406cdd
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jne 0x406d8f
cmp dword [ebp - 0xc], 0
jne 0x406cf2
mov eax, dword [ebp - 4]
call fcn.00403198
mov bl, 1
jmp 0x406d8f
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
xor edx, edx
call fcn.00403278
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
call fcn.00403420
push eax
lea eax, [ebp - 8]
push eax
push 0
push edi
push esi
call sub.advapi32.dll_RegQueryValueExA
cmp eax, 0xea
je 0x406ca9
test eax, eax
jne 0x406d8f
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
je 0x406d39
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jne 0x406d8f
jmp 0x406d39
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0
je 0x406d4c
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
cmp byte [eax + edx - 1], 0
je 0x406d36
cmp dword [ebp - 8], 7
jne 0x406d5b
cmp dword [ebp - 0xc], 0
je 0x406d5b
inc dword [ebp - 0xc]
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0xc]
call fcn.004034f0
cmp dword [ebp - 8], 7
jne 0x406d82
cmp dword [ebp - 0xc], 0
je 0x406d82
lea eax, [ebp - 0x10]
call fcn.00403420
mov edx, dword [ebp - 0xc]
mov byte [eax + edx - 1], 0
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
call fcn.004031e8
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406dac
lea eax, [ebp - 0x10]
call fcn.00403198
ret
Function at 0x4096f0
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4097c3
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4097dc
push ebx
push 0x4097e8
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.004033b4
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409770
mov al, 0x62
call int.004092cc
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.004096c4
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x409779
call fcn.004096c4
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4097ca
lea eax, [ebp - 4]
call fcn.00403198
ret
Function at 0x401500
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ecx
sub esp, 0x5c4
call sym._mcount
call dbg._monstartup
call dbg.__main
lea eax, [ebp - 0x1a0]
mov dword [esp + 4], eax
mov dword [esp], 0x202
mov eax, dword [sym.imp.WS2_32.dll_WSAStartup]
call eax
sub esp, 8
test eax, eax
je 0x401563
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], str.WSAStartup_failed:__d_n
call sym._printf
mov eax, 1
jmp 0x4016bc
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x4015b5
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], str.socket_failed:__d_n
call sym._printf
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, 1
jmp 0x4016bc
mov word [ebp - 0x1b0], 2
mov dword [esp], str.127.0.0.1
mov eax, dword [sym.imp.WS2_32.dll_inet_addr]
call eax
sub esp, 4
mov dword [ebp - 0x1ac], eax
mov dword [esp], 0x3039
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x1ae], ax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x1b0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_connect]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x401649
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], str.connect_failed:__d_n
call sym._printf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, 1
jmp 0x4016bc
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x400
lea eax, [ebp - 0x5b0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_recv]
call eax
sub esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jle 0x4016a0
lea edx, [ebp - 0x5b0]
mov eax, dword [ebp - 0x10]
add eax, edx
mov byte [eax], 0
lea eax, [ebp - 0x5b0]
mov dword [esp + 4], eax
mov dword [esp], str.Received_from_server:__s_n
call sym._printf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, 0
mov ecx, dword [ebp - 4]
leave
lea esp, [ecx - 4]
ret

Function at 0x401b30
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._vfprintf
call sym._abort
jmp dbg.mark_section_writable
Function at 0x401b90
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x406054]
test esi, esi
jle 0x401c7d
mov edi, dword [0x406058]
xor ebx, ebx
lea edx, [edi + 4]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x401bc4
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x401c76
add ebx, 1
add edx, 0xc
cmp ebx, esi
jne 0x401bb0
mov dword [esp], eax
mov ebx, eax
call dbg.__mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x401cba
lea ebx, [esi + esi*2]
mov esi, dword [0x406058]
shl ebx, 2
add esi, ebx
mov dword [esi + 8], eax
mov dword [esi], 0
call dbg._GetPEImageBase
add eax, dword [edi + 0xc]
mov dword [esi + 4], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x406058]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401c9a
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x401c6f
sub eax, 0x40
and eax, 0xffffffbf
je 0x401c6f
mov eax, dword [esp + 0x20]
add ebx, dword [0x406058]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x401c84
add dword [0x406054], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor esi, esi
jmp 0x401bce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
mov eax, dword [0x406058]
mov eax, dword [eax + ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]

Function at 0x402180
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x406408
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x406400]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x4021d5
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x4021ce
test esi, esi
je 0x4021ce
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4021b0
mov dword [esp], 0x406408
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4023f0
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x402428
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp edx, ebx
ja 0x40241e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40242a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402410
xor eax, eax
pop ebx
pop esi
ret
Function at 0x402bd0
Capabilities:
Resume thread
Suspend thread

Disassembly:
push esi
push ebx
mov esi, eax
sub esp, 0x2e4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
sub esp, 4
cmp eax, 0xffffffff
jne 0x402c00
add esp, 0x2e4
mov eax, 0xffffffff
pop ebx
pop esi
ret
lea eax, [esp + 0x14]
mov dword [esp], esi
mov dword [esp + 0x14], 0x10003
mov ebx, 0xffffffff
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
sub esp, 8
test eax, eax
cmovne ebx, dword [esp + 0xcc]
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
sub esp, 4
add esp, 0x2e4
mov eax, ebx
pop ebx
pop esi
ret
Function at 0x40c670
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov dword [0x580f30], eax
mov edx, 1
dec edx
nop
inc edx
mov eax, edx
dec eax
mov ecx, dword [eax*4 + 0x580f30]
shr ecx, 0x1e
mov eax, edx
dec eax
mov eax, dword [eax*4 + 0x580f30]
xor ecx, eax
imul ecx, ecx, 0x6c078965
add ecx, edx
mov dword [edx*4 + 0x580f30], ecx
cmp edx, 0x26f
jl 0x40c67c
mov dword [0x52ee10], 0x270
ret

Function at 0x40c6c0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
sub esp, 8
mov dword [esp], ebx
mov dword [esp + 4], esi
mov eax, dword [0x580010]
cmp eax, dword [0x52eda0]
je 0x40c6e1
mov dword [0x52ee10], 0x271
mov eax, dword [0x52ee10]
cmp eax, 0x270
jl 0x40c809
mov eax, dword [0x52ee10]
cmp eax, 0x271
jne 0x40c718
mov eax, dword [0x580010]
call fcn.0040c670
mov eax, dword [0x580010]
not eax
mov dword [0x580010], eax
mov dword [0x52eda0], eax
mov edx, 0
dec edx
mov esi, esi
inc edx
mov eax, edx
inc eax
mov eax, dword [eax*4 + 0x580f30]
and eax, 0x7fffffff
mov ebx, dword [edx*4 + 0x580f30]
and ebx, 0x80000000
or eax, ebx
mov ecx, eax
mov eax, edx
add eax, 0x18d
mov ebx, ecx
shr ebx, 1
mov esi, dword [eax*4 + 0x580f30]
xor esi, ebx
mov eax, ecx
and eax, 1
mov eax, dword [eax*4 + 0x52ee20]
xor esi, eax
mov dword [edx*4 + 0x580f30], esi
cmp edx, 0xe2
jl 0x40c720
mov edx, 0xe3
dec edx
inc edx
mov eax, edx
inc eax
mov eax, dword [eax*4 + 0x580f30]
and eax, 0x7fffffff
mov ebx, dword [edx*4 + 0x580f30]
and ebx, 0x80000000
or eax, ebx
mov ecx, eax
mov eax, edx
add eax, 0xffffff1d
mov ebx, ecx
shr ebx, 1
mov esi, dword [eax*4 + 0x580f30]
xor esi, ebx
mov eax, ecx
and eax, 1
mov eax, dword [eax*4 + 0x52ee20]
xor esi, eax
mov dword [edx*4 + 0x580f30], esi
cmp edx, 0x26e
jl 0x40c778
mov eax, dword [0x5818ec]
and eax, 0x80000000
mov edx, dword [0x580f30]
and edx, 0x7fffffff
or eax, edx
mov ecx, eax
shr eax, 1
mov edx, dword [0x581560]
xor eax, edx
and ecx, 1
mov edx, dword [ecx*4 + 0x52ee20]
xor eax, edx
mov dword [0x5818ec], eax
mov dword [0x52ee10], 0
mov eax, dword [0x52ee10]
mov edx, dword [eax*4 + 0x580f30]
inc dword [0x52ee10]
mov eax, edx
shr eax, 0xb
xor eax, edx
mov edx, eax
shl edx, 7
and edx, 0x9d2c5680
xor edx, eax
mov ecx, edx
shl ecx, 0xf
and ecx, 0xefc60000
xor ecx, edx
mov eax, ecx
shr eax, 0x12
xor eax, ecx
mov ebx, dword [esp]
mov esi, dword [esp + 4]
add esp, 8
ret