joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405ed6
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x4232fc], 0
push esi
jne 0x405f0d
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 0x405ee7
mov dword [ecx*4 + 0x4232f8], eax
inc ecx
cmp ecx, 0x100
jl 0x405ee2
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405f3e
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 + 0x4232f8]
xor eax, esi
inc ecx
dec edx
jne 0x405f20
pop edi
not eax
pop esi
ret 0xc

Function at 0x40206c
Capabilities:
Allocate or change rwx memory

Disassembly:
sub ebp, 0x82
mov esi, eax
mov edx, dword [0x404080]
or dl, 1
imul edx, eax
mov eax, dword [0x404080]
sub eax, edx
mov ebx, esi
mov edx, eax
mov eax, 0x404084
call fcn.00401fe6
xor eax, eax
mov dword [ebp + 0x7e], eax
lea eax, [ebp + 0x7e]
push eax
mov eax, esi
jmp 0x4020ea
push ebx
push ecx
push edx
push esi
push edi
enter 0x84, 0
jmp 0x402010
or al, 0x40
mov edi, 0x40389b
push eax
sub edi, fcn.00403045
push edi
push fcn.00403045
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
cmp dword [ebp + 0x7e], 0
je 0x402129
mov eax, fcn.00403045
mov ebx, esi
mov edx, edi
call fcn.00401fe6
mov edx, 0x1c000
mov eax, 0x404084
mov ebx, esi
call fcn.00402630
lea edx, [ebp - 2]
mov eax, esi
mov dword [ebp - 2], 1
call fcn.00402bb7
lea edx, [esi + 0x1c000]
add edx, esi
lea eax, [esi - 1]
lea ebx, [ebp - 2]
and eax, 0x404084
call fcn.00403045
lea esp, [ebp + 0x82]
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
ret
Function at 0x401ee2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x411280]
jne 0x401eec
repz ret
jmp fcn.00404399

Function at 0x409070
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
pushal
call 0x40907f
pop dword [ebp - 0x48]
mov eax, 0x64519207
sub eax, 0x64110188
sub dword [ebp - 0x48], eax
push 0x40
push 0x1000
push 0x37506
push 0
mov eax, 0x3a00649c
sub eax, 0x39bf83c4
add eax, dword [ebp - 0x48]
call dword [eax]
mov ecx, 0xe9e4a60b
sub ecx, 0xe9e4659a
mov ebx, eax
mov edx, 0x7366af48
sub edx, 0x73257384
add edx, dword [ebp - 0x48]
mov edi, 0x9752605d
sub edi, 0xa041739f
mov dword [ebp - 0x1c], 0xe3caff82
mov esi, dword [edx]
sub dword [ebp - 0x24], 0xd4394ea8
xor esi, edi
xor dword [ebp - 4], edx
mov dword [ebx], esi
xor dword [ebp - 4], eax
add ebx, 0x61e5c6ff
sub ebx, 0x61e5c6fb
add edx, 0x6fbcb875
sub edx, 0x6fbcb871
loop 0x4090de
add eax, 0xb8c28f53
sub eax, 0xb8c19abc
mov ebx, eax
add eax, 0xdc62445b
sub eax, 0xdc624456
mov ecx, 0xd1b80219
add ecx, 0x2e87fde7
add ecx, dword [ebp - 0x48]
call ebx
leave
ret
Function at 0x404041
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x408910
cmp edx, dword [eax]
je 0x404063
add eax, 8
inc ecx
cmp eax, 0x4089a0
jl 0x404054
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x408910]
jne 0x404191
mov eax, dword [0x408e94]
cmp eax, 1
je 0x40416b
test eax, eax
jne 0x404094
cmp dword [0x408524], 1
je 0x40416b
cmp edx, 0xfc
je 0x404191
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4040cb
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00404a10
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004021e0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40410e
lea eax, [ebp - 0x1a4]
push eax
call fcn.004021e0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x407744
push edi
call fcn.004057c0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00404a10
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00404a20
lea eax, [ebp - 0xa0]
push 0x407724
push eax
call fcn.00404a20
push dword [esi + 0x408914]
lea eax, [ebp - 0xa0]
push eax
call fcn.00404a20
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00405729
add esp, 0x2c
pop edi
jmp 0x404191
lea eax, [ebp + 8]
lea esi, [esi + 0x408914]
push 0
push eax
push dword [esi]
call fcn.004021e0
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 0x4014c6
Capabilities:
Enumerate files on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x278
mov eax, dword [ebp + 8]
mov byte [ebp - 9], al
call fcn.00409626
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x418035
lea eax, [ebp - 0x118]
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
lea eax, [ebp - 0x258]
mov dword [esp + 4], eax
lea eax, [ebp - 0x118]
mov dword [esp], eax
call sub.KERNEL32.dll_FindFirstFileA
sub esp, 8
mov dword [ebp - 0x25c], eax
cmp dword [ebp - 0x25c], 0
je 0x4015c0
cmp byte [ebp - 0x22c], 0x2e
jne 0x401533
jmp 0x40159c
lea eax, [ebp - 0x258]
add eax, 0x2c
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41803a
lea eax, [ebp - 0x118]
mov dword [esp], eax
call sub.msvcrt.dll_sprintf
lea eax, [ebp - 0x118]
mov dword [esp], eax
call sub.KERNEL32.dll_GetFileAttributesA
sub esp, 4
shr eax, 4
and eax, 1
test al, al
je 0x40159c
cmp byte [ebp - 9], 0
je 0x40158e
lea eax, [ebp - 0x118]
mov dword [esp], eax
call fcn.00409772
jmp 0x40159c
lea eax, [ebp - 0x118]
mov dword [esp], eax
call fcn.004012f2
lea eax, [ebp - 0x258]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x25c]
mov dword [esp], eax
call sub.KERNEL32.dll_FindNextFileA
sub esp, 8
test eax, eax
je 0x4015c0
jmp 0x401528
leave
ret

Function at 0x401702
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00413094
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x401771
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sub.USER32.dll_GetWindowTextLengthA
sub esp, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [esp], eax
call fcn.0041338c
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 4]
mov dword [esp], eax
call sub.USER32.dll_GetWindowTextA
sub esp, 0xc
mov edx, eax
mov eax, dword [ebp - 0xc]
mov byte [edx + eax], 0
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
jmp 0x401778
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
leave
ret
Function at 0x402974
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [ebp + 0x10]
mov byte [ebp - 9], al
mov dword [esp + 4], 0x4182ed
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x402ad6
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 4
lea eax, [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp dword [ebp - 0x14], 0xbec0100f
jne 0x402ad6
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004133bc
test eax, eax
jne 0x402ac2
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004133cc
test eax, eax
jne 0x402ac2
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.004131ec
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00406208
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x402a32
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00405c8e
jmp 0x402ac2
mov dword [esp + 0xc], 0x10
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], str.type
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00405f16
test al, al
je 0x402ab2
lea eax, [ebp - 0x48]
mov dword [esp + 4], str.addr
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402a83
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004024de
jmp 0x402ab2
cmp byte [ebp - 9], 0
jne 0x402ab2
lea eax, [ebp - 0x48]
mov dword [esp + 4], str.window
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402ab2
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004026a4
lea eax, [ebp - 0x28]
mov dword [esp], eax
call fcn.00405c8e
jmp 0x4029d6
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00402d3e
mov dword [ebp - 0x4c], 1
jmp 0x402add
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x4c]
leave
ret

Function at 0x404554
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
add eax, 0x20
mov dword [esp], eax
call sub.KERNEL32.dll_GetFileAttributesA
sub esp, 4
cmp eax, 0xffffffff
jne 0x404579
mov dword [ebp - 4], 0
jmp 0x40458a
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004043d2
movzx eax, al
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
leave
ret
Function at 0x404590
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
mov eax, dword [ebp + 8]
cmp byte [eax + 0x58], 0
jne 0x404755
mov dword [esp + 8], 0x30
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004042e8
lea eax, [ebp - 0x38]
mov dword [esp], eax
call sub.KERNEL32.dll_DeleteFileA
sub esp, 4
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], str.loading__s_n
call sub.msvcrt.dll_printf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.00406cb0
movzx eax, byte [0x418374]
mov byte [ebp - 0x198], al
lea edx, [ebp - 0x197]
mov eax, 0x103
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], edx
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x198]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.00406afe
mov dword [ebp - 0x19c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x50]
cmp eax, dword [ebp - 0x19c]
je 0x40471b
cmp dword [ebp - 0x19c], 0xffffffff
je 0x4046c0
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.pluging__s_is_damaged
mov dword [esp + 4], pe_nt_image_headers32
lea eax, [ebp - 0x228]
mov dword [esp], eax
call fcn.00412230
cmp dword [ebp + 0x10], 0
je 0x4046c0
mov eax, dword [ebp + 0x10]
mov edx, dword [eax]
add edx, 0xc
lea eax, [ebp - 0x228]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
mov eax, dword [edx]
call eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x50]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x19c]
mov dword [esp + 4], eax
mov dword [esp], str.file_truncated__d__expected_d_n
call sub.msvcrt.dll_printf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll_fflush
lea eax, [ebp - 0x198]
mov dword [esp], eax
call sub.KERNEL32.dll_DeleteFileA
sub esp, 4
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.00406d28
mov dword [ebp - 0x22c], 0
jmp 0x40476a
mov eax, dword [ebp + 8]
add eax, 0x20
mov dword [esp], eax
call sub.KERNEL32.dll_DeleteFileA
sub esp, 4
mov eax, dword [ebp + 8]
add eax, 0x20
mov dword [esp + 4], eax
lea eax, [ebp - 0x198]
mov dword [esp], eax
call sub.KERNEL32.dll_MoveFileA
sub esp, 8
lea eax, [ebp - 0x88]
mov dword [esp], eax
call fcn.00406d28
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040436c
mov dword [ebp - 0x22c], 1
mov eax, dword [ebp - 0x22c]
leave
ret
Function at 0x404af0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2014], 0
je 0x404b32
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x2014]
mov eax, dword [eax + 0x54]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x2014]
add eax, 0x40
mov dword [esp], eax
call fcn.004096f4
mov dword [esp], eax
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x200c]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x404b60
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov dword [esp], eax
call fcn.00404554
mov byte [ebx + 0x58], al
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x5c]
mov dword [ebp - 8], eax
jmp 0x404b3e
mov ebx, dword [ebp - 4]
leave
ret

Function at 0x404b66
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2014], 0
je 0x404ba7
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x2014]
mov eax, dword [eax + 0x54]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x2014]
add eax, 0x40
mov dword [esp], eax
call fcn.004096f4
mov dword [esp], eax
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x200c]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x404bf2
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004131e0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 4]
mov dword [esp], eax
call fcn.00404590
test al, al
jne 0x404be7
mov dword [ebp - 8], 0
jmp 0x404bf9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov dword [ebp - 4], eax
jmp 0x404bb3
mov dword [ebp - 8], 1
mov eax, dword [ebp - 8]
leave
ret
Function at 0x404bfe
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2014], 0
je 0x404c42
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x2014]
mov eax, dword [eax + 0x54]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x2014]
add eax, 0x40
mov dword [esp], eax
call fcn.004096f4
mov dword [esp], eax
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x200c]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x404d40
mov eax, dword [ebp - 0xc]
add eax, 0x20
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.._s
mov dword [esp + 4], 0x50
lea eax, [ebp - 0x68]
mov dword [esp], eax
call sub.msvcrt.dll__snprintf
lea eax, [ebp - 0x68]
mov dword [esp + 4], eax
mov dword [esp], str.linking__s_n
call sub.msvcrt.dll_printf
mov dword [esp + 8], 8
mov dword [esp + 4], 0
lea eax, [ebp - 0x68]
mov dword [esp], eax
call sub.KERNEL32.dll_LoadLibraryExA
sub esp, 0xc
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
je 0x404d16
lea eax, [ebp - 0x68]
mov dword [esp + 4], eax
mov dword [esp], str.lib__s_loaded_n
call sub.msvcrt.dll_printf
mov dword [esp + 4], str.runEx
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sub.KERNEL32.dll_GetProcAddress
sub esp, 8
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x404d02
mov dword [esp + 4], 0x418514
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sub.KERNEL32.dll_GetProcAddress
sub esp, 8
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
je 0x404d32
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x70]
mov dword [edx + 0x2018], eax
jmp 0x404d32
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 8], eax
lea eax, [ebp - 0x68]
mov dword [esp + 4], eax
mov dword [esp], str.lib__s_not_loaded_error_ld_n
call sub.msvcrt.dll_printf
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5c]
mov dword [ebp - 0xc], eax
jmp 0x404c4e
leave
ret
Function at 0x4065ce
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WS2_32.DLL_socket
sub esp, 0xc
mov edx, eax
mov eax, dword [ebp + 0xc]
mov dword [eax], edx
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0xc]
mov dword [esp + 8], eax
mov eax, 0x8004667e
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp], eax
call sub.WS2_32.DLL_ioctlsocket
sub esp, 0xc
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], 0x8001
mov eax, dword [0x41a740]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp], eax
call sub.WS2_32.DLL_WSAAsyncSelect
sub esp, 0x10
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp], eax
call sub.WS2_32.DLL_connect
sub esp, 0xc
test eax, eax
je 0x4066ee
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x8001
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.00409482
cmp dword [ebp - 0x34], 0x8001
jne 0x4066ee
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [0x41a740]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp], eax
call sub.WS2_32.DLL_WSAAsyncSelect
sub esp, 0x10
mov eax, dword [ebp - 0x2c]
shr eax, 0x10
test ax, ax
je 0x4066ee
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp], eax
call sub.WS2_32.DLL_closesocket
sub esp, 4
mov eax, dword [ebp - 0x2c]
shr eax, 0x10
movzx eax, ax
mov dword [ebp - 0x3c], eax
jmp 0x40671c
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0xc]
mov dword [esp + 8], eax
mov eax, 0x8004667e
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp], eax
call sub.WS2_32.DLL_ioctlsocket
sub esp, 0xc
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x3c]
leave
ret

Function at 0x4069ce
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x14], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x18]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4068fe
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateThread
sub esp, 0x18
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x401
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.00409482
mov eax, dword [ebp - 0x10]
leave
ret
Function at 0x406afe
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x34
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], 0
mov eax, dword [ebp + 0x14]
cmp byte [eax], 0
jne 0x406b4d
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4187f7
mov dword [esp], 0x4187fb
call sub.KERNEL32.dll_GetTempFileNameA
sub esp, 0x10
test eax, eax
jne 0x406b4d
mov dword [ebp - 0xc], 0
jmp 0x406bee
mov ebx, dword [ebp + 8]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
mov dword [ebx + 8], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0xffffffff
jne 0x406ba3
mov dword [ebp - 0xc], 0
jmp 0x406bee
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00406a36
mov byte [ebp - 5], al
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
cmp byte [ebp - 5], 0
je 0x406be1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x10], eax
jmp 0x406be8
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
leave
ret

Function at 0x4078ba
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x10]
jae 0x407910
mov dword [esp + 0xc], 0
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0x10]
sub eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WS2_32.DLL_send
sub esp, 0x10
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jg 0x407906
jmp 0x407910
mov edx, dword [ebp - 8]
lea eax, [ebp - 4]
add dword [eax], edx
jmp 0x4078c7
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x10]
sete al
movzx eax, al
leave
ret
Function at 0x40791e
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x168
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x12c], 0x64
mov dword [ebp - 0x134], 0
mov eax, dword [ebp - 0x128]
cmp eax, dword [ebp - 0x134]
jbe 0x407985
mov eax, dword [ebp - 0x134]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + eax*4 - 0x124]
cmp eax, dword [edx + 4]
jne 0x40797b
jmp 0x407985
lea eax, [ebp - 0x134]
inc dword [eax]
jmp 0x407956
mov eax, dword [ebp - 0x128]
cmp eax, dword [ebp - 0x134]
jne 0x4079b7
cmp dword [ebp - 0x128], 0x3f
ja 0x4079b7
mov edx, dword [ebp - 0x134]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [ebp + edx*4 - 0x124], eax
lea eax, [ebp - 0x128]
inc dword [eax]
call fcn.004093fe
lea eax, [ebp - 0x130]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [ebp - 0x128]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
inc eax
mov dword [esp], eax
call sub.WS2_32.DLL_select
sub esp, 0x14
test eax, eax
je 0x407938
mov dword [esp + 0xc], 0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 0x10]
sub eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WS2_32.DLL_recv
sub esp, 0x10
mov dword [ebp - 0x134], eax
cmp dword [ebp - 0x134], 0
jg 0x407a44
mov dword [ebp - 0x13c], 0
jmp 0x407aa5
mov edx, dword [ebp - 0x134]
lea eax, [ebp - 0xc]
add dword [eax], edx
cmp dword [ebp - 0xc], 1
jbe 0x40792e
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax]
add eax, 2
mov dword [ebp - 0x138], eax
mov eax, dword [ebp - 0x138]
cmp eax, dword [ebp - 0xc]
jne 0x40792e
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 1]
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x140]
cmp eax, dword [ebp + 0x14]
sete al
movzx eax, al
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x140]
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x13c]
leave
ret

Function at 0x40817e
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov word [ebp - 0x18], 2
mov dword [ebp - 0x14], 0xffffffff
mov dword [esp], 0x5051
call sub.WS2_32.DLL_htons
sub esp, 4
mov word [ebp - 0x16], ax
mov dword [esp + 0x14], 0x10
lea eax, [ebp - 0x18]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WS2_32.DLL_sendto
sub esp, 0x18
test eax, eax
jg 0x408202
mov dword [ebp - 0x1c], 0
jmp 0x408209
mov dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x1c]
leave
ret