joyce8/EMBER2024-capa huggingface dataset:
Function at 0x472828
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x47295b
push dword fs:[eax]
mov dword fs:[eax], esp
cmp bl, 0x5c
je 0x472940
mov eax, dword [ebp + 8]
cmp dword [eax - 8], 0
je 0x47289b
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x2c]
mov edx, ebx
call fcn.00404380
lea eax, [ebp - 0x2c]
mov edx, 0x472970
call fcn.0040447c
mov eax, dword [ebp - 0x2c]
call fcn.00404674
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 8]
call eax
jmp 0x4728f7
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x30]
mov edx, ebx
call fcn.00404380
lea eax, [ebp - 0x30]
mov edx, 0x472970
call fcn.0040447c
mov eax, dword [ebp - 0x30]
call fcn.00404674
push eax
call sub.kernel32.dll_GetDiskFreeSpaceA
test eax, eax
je 0x4728f7
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x20]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x1c]
xor edx, edx
call fcn.0040519c
call fcn.0040519c
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
push 0x47297c
lea eax, [ebp - 0x38]
mov edx, ebx
call fcn.00404380
mov edx, dword [ebp - 0x38]
lea ecx, [ebp - 0x34]
mov eax, dword [0x471084]
call fcn.00473690
push dword [ebp - 0x34]
push 0x472988
push dword [ebp - 4]
push dword [ebp - 8]
lea edx, [ebp - 0x3c]
mov eax, dword [0x471084]
call fcn.0047370c
push dword [ebp - 0x3c]
mov eax, esi
mov edx, 4
call fcn.00404534
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x472962
lea eax, [ebp - 0x3c]
mov edx, 5
call fcn.004041bc
ret

Function at 0x4731a8
Capabilities:
Get geographical location

Disassembly:
push ebx
add esp, 0xfffffef8
mov ebx, edx
push 0x104
lea eax, [esp + 4]
push eax
push 0x1001
push 0x800
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x4731de
mov eax, ebx
mov edx, esp
mov ecx, 0x105
call fcn.00404408
jmp 0x4731e5
mov eax, ebx
call fcn.00404198
add esp, 0x108
pop ebx
ret
Function at 0x473344
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff98
push ebx
xor ecx, ecx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x68], ecx
mov ebx, edx
xor eax, eax
push ebp
push 0x473430
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x47343c
push 0x473454
call sub.kernel32.dll_GetModuleHandleA_2
push eax
call sub.kernel32.dll_GetProcAddress_1
test eax, eax
je 0x47338b
mov dword [ebp - 0x60], 0x40
lea edx, [ebp - 0x60]
push edx
call eax
jmp 0x4733b1
mov dword [ebp - 0x20], 0x20
lea eax, [ebp - 0x20]
push eax
call sub.kernel32.dll_GlobalMemoryStatus
mov eax, dword [ebp - 0x14]
xor edx, edx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x18]
xor edx, edx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edx
push 0
push 0x100000
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
add eax, 0x80000
adc edx, 0
call fcn.004051c0
push edx
push eax
lea eax, [ebp - 0x64]
call fcn.004089ac
push dword [ebp - 0x64]
push 0x47346c
push 0
push 0x100000
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x54]
add eax, 0x80000
adc edx, 0
call fcn.004051c0
push edx
push eax
lea eax, [ebp - 0x68]
call fcn.004089ac
push dword [ebp - 0x68]
push 0x473478
mov eax, ebx
mov edx, 4
call fcn.00404534
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x473437
lea eax, [ebp - 0x68]
mov edx, 2
call fcn.004041bc
ret

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

Disassembly:
push ebx
mov ebx, edx
mov eax, ebx
call fcn.00404674
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
setne al
pop ebx
ret

Function at 0x47c558
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffe00
mov ebx, edx
push 1
push 0x23
lea eax, [esp + 8]
push eax
push 0
call sub.Shell32.dll_SHGetSpecialFolderPathW
test eax, eax
je 0x47c585
mov eax, ebx
mov edx, esp
mov ecx, pe_nt_image_headers32
call fcn.00404420
jmp 0x47c58c
mov eax, ebx
call fcn.00404198
add esp, 0x200
pop ebx
ret
Function at 0x401550
Capabilities:
Terminate process

Disassembly:
push 0x5c
push 0x401c18
call fcn.004018fb
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
cmp dword [0x403390], ebx
jne 0x4012eb
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_HeapSetInformation]
mov dword [ebp - 4], ebx
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov dword [ebp - 0x24], ebx
mov edi, 0x403384
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, ebx
je 0x401325
cmp eax, esi
jne 0x401318
xor esi, esi
inc esi
mov dword [ebp - 0x24], esi
jmp 0x401328
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4012ff
xor esi, esi
inc esi
mov eax, dword [0x403380]
cmp eax, esi
jne 0x40133b
push 0x1f
call sub.MSVCR100.dll__amsg_exit
pop ecx
jmp 0x401376
mov eax, dword [0x403380]
test eax, eax
jne 0x401370
mov dword [0x403380], esi
push 0x4010e8
push 0x4010dc
call sub.MSVCR100.dll__initterm_e
pop ecx
pop ecx
test eax, eax
je 0x401376
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
jmp 0x401490
mov dword [0x403038], esi
mov eax, dword [0x403380]
cmp eax, esi
jne 0x40139a
push 0x4010d8
push 0x4010d0
call sub.MSVCR100.dll__initterm
pop ecx
pop ecx
mov dword [0x403380], 2
cmp dword [ebp - 0x24], ebx
jne 0x4013a7
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x403394], ebx
je 0x4013c8
push 0x403394
call fcn.00401833
pop ecx
test eax, eax
je 0x4013c8
push ebx
push 2
push ebx
call dword [0x403394]
mov eax, dword [sym.imp.MSVCR100.dll__acmdln]
mov esi, dword [eax]
mov dword [ebp - 0x20], esi
mov al, byte [esi]
cmp al, 0x20
ja 0x401421
cmp al, bl
je 0x4013e1
cmp dword [ebp - 0x1c], ebx
jne 0x401421
mov al, byte [esi]
cmp al, bl
je 0x4013f1
cmp al, 0x20
ja 0x4013f1
inc esi
mov dword [ebp - 0x20], esi
jmp 0x4013e1
test byte [ebp - 0x40], 1
je 0x4013fd
movzx eax, word [ebp - 0x3c]
jmp 0x401400
push 0xa
pop eax
push eax
push esi
push ebx
push 0x400000
call main
mov dword [0x403034], eax
cmp dword [0x403028], ebx
jne 0x401476
push eax
call dword [sym.imp.MSVCR100.dll_exit]
cmp al, 0x22
jne 0x401430
xor ecx, ecx
cmp dword [ebp - 0x1c], ebx
sete cl
mov dword [ebp - 0x1c], ecx
movzx eax, al
push eax
call dword [sym.imp.MSVCR100.dll__ismbblead]
pop ecx
test eax, eax
je 0x401443
inc esi
mov dword [ebp - 0x20], esi
inc esi
jmp 0x4013cf
cmp dword [0x403038], ebx
jne 0x401484
call dword [sym.imp.MSVCR100.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x403034]
call fcn.00401940
ret
call 0x492000
jmp 0x4012bd
Function at 0x4014fb
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
push edi
cmp dword [ebx + 4], 0xffffffff
je 0x40154c
mov edi, dword [ebp + 8]
test edi, edi
je 0x40154c
cmp dword [ebp + 0xc], 1
jb 0x40154c
push esi
xor esi, esi
and dword [ebp + 8], 0
lea eax, [ebp + 8]
push 0
push eax
mov eax, dword [ebp + 0xc]
sub eax, esi
push eax
lea eax, [esi + edi]
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401547
cmp dword [ebp + 8], 0
je 0x401547
add esi, dword [ebp + 8]
cmp esi, dword [ebp + 0xc]
jb 0x401518
mov eax, esi
pop esi
jmp 0x40154e
xor eax, eax
pop edi
pop ebx
pop ebp
ret 8
Function at 0x403b43
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push esi
mov esi, ecx
cmp dword [esi + 4], 0
je 0x403b7b
lea eax, [ebp - 4]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 4], 0x103
jne 0x403b6e
xor al, al
jmp 0x403b9f
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi + 4], 0
lea eax, [ebp - 4]
push eax
push 0x10000
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp + 0x10]
push 0
call fcn.0042a9dc
add esp, 0x18
mov dword [esi + 4], eax
test eax, eax
setne al
pop esi
leave
ret 0xc

Function at 0x403ca3
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
test ecx, ecx
je 0x403d0c
test edx, edx
je 0x403d0c
cmp dword [ebp + 8], 0
je 0x403d0c
cmp dword [ebp + 0x10], 0
je 0x403d0c
cmp dword [ebp + 0x14], 0
je 0x403d0c
push ebx
lea eax, [ebp - 4]
xor ebx, ebx
push eax
push 0x20106
push ebx
push edx
push ecx
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403d07
push esi
push dword [ebp + 0x14]
xor esi, esi
push dword [ebp + 0x10]
inc esi
push esi
push ebx
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
test eax, eax
movzx ebx, bl
cmove ebx, esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov al, bl
pop ebx
leave
ret
xor al, al
leave
ret

Function at 0x403dd1
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x403e43
cmp dword [ebp + 0x10], 4
jb 0x403e43
xor ebx, ebx
mov dword [esi], ebx
test ecx, ecx
je 0x403e43
test edx, edx
je 0x403e43
cmp dword [ebp + 8], ebx
je 0x403e43
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], ebx
push eax
mov eax, dword [ebp + 0x14]
or eax, 0x20019
mov dword [ebp - 4], ebx
push eax
push ebx
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403e3f
lea eax, [ebp + 0x10]
push eax
push esi
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp + 0xc]
xor edx, edx
movzx ebx, bl
inc edx
test eax, eax
cmove ebx, edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
jmp 0x403e45
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x404607
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, ecx
push esi
push edi
mov dword [ebp - 0x10], eax
cmp dword [eax + 4], 0xffffffff
je 0x4046a9
cmp dword [ebp + 8], 0
je 0x4046a9
cmp dword [ebp + 0x10], 0
ja 0x404634
cmp dword [ebp + 0xc], 1
jb 0x4046a9
xorps xmm0, xmm0
movlpd qword [ebp - 0xc], xmm0
mov edi, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
and dword [ebp - 8], 0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
sub ecx, esi
sbb eax, edi
test eax, eax
jb 0x404667
ja 0x40465e
cmp ecx, 0xfffffff
jbe 0x404667
mov eax, 0xfffffff
mov ecx, esi
jmp 0x40466e
mov eax, dword [ebp + 0xc]
mov ecx, esi
sub eax, ecx
push 0
lea edx, [ebp - 8]
push edx
push eax
mov eax, dword [ebp + 8]
add eax, ecx
push eax
mov eax, dword [ebp - 0x10]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4046a3
cmp dword [ebp - 8], 0
je 0x4046a3
add esi, dword [ebp - 8]
adc edi, 0
cmp edi, dword [ebp + 0x10]
jb 0x404642
ja 0x4046a3
cmp esi, dword [ebp + 0xc]
jb 0x404642
mov eax, esi
mov edx, edi
jmp 0x4046ad
xor eax, eax
xor edx, edx
pop edi
pop esi
leave
ret 0xc

Function at 0x4047de
Capabilities:
Encode data using base64

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
xor esi, esi
mov ebp, ecx
and dword [esp + 0x10], esi
mov ebx, edx
push edi
xor edi, edi
test ebp, ebp
je 0x40490e
mov edx, dword [esp + 0x20]
test edx, edx
je 0x40490e
mov eax, dword [esp + 0x24]
cmp eax, 9
jb 0x40490e
mov byte [edx], 0
test ebx, ebx
je 0x404905
add eax, 0xfffffff8
mov dword [esp + 0x18], eax
cmp esi, eax
jae 0x404905
mov ch, byte [edi + ebp]
inc edi
cmp edi, ebx
jb 0x404846
xor al, al
mov dword [esp + 0x14], 2
xor cl, cl
mov byte [esp + 0x11], cl
jmp 0x404864
mov al, byte [edi + ebp]
inc edi
mov byte [esp + 0x11], al
mov cl, al
cmp edi, ebx
jae 0x40485a
mov al, byte [edi + ebp]
inc edi
jmp 0x404864
xor al, al
mov dword [esp + 0x14], 1
mov byte [esp + 0x12], al
and cl, 0xf
shr al, 6
shl cl, 2
or cl, al
movzx eax, ch
shr eax, 2
and ch, 3
shl ch, 4
mov byte [esp + 0x13], cl
movzx ecx, ch
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + edx], al
movzx eax, byte [esp + 0x11]
shr eax, 4
or ecx, eax
mov al, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + edx + 1], al
add esi, 2
mov eax, dword [esp + 0x14]
sub eax, 0
je 0x4048d6
sub eax, 1
je 0x4048c1
sub eax, 1
jne 0x4048f9
mov word [esi + edx], 0x3d3d
jmp 0x4048f6
movzx eax, byte [esp + 0x13]
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + edx], al
mov byte [esi + edx + 1], 0x3d
jmp 0x4048f6
movzx eax, byte [esp + 0x13]
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + edx], al
movzx eax, byte [esp + 0x12]
and eax, 0x3f
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + edx + 1], al
add esi, 2
mov eax, dword [esp + 0x18]
cmp edi, ebx
jb 0x404824
mov byte [esi + edx], 0
lea eax, [esi + 1]
jmp 0x404910
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x404baf
Capabilities:
Decrypt data via sspi

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 0xfac]
test ecx, ecx
je 0x404da7
mov edi, dword [esi + 0xfb0]
test edi, edi
je 0x404da7
mov eax, dword [esi + 0xfb8]
xorps xmm0, xmm0
sub edi, eax
movlpd qword [esp + 0x34], xmm0
xor ebx, ebx
movlpd qword [esp + 0x40], xmm0
inc ebx
mov dword [esp + 0x20], edi
lea ebp, [eax + ecx]
mov dword [esp + 0x24], ebx
xor eax, eax
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], eax
lea eax, [esi + 0xf84]
push eax
mov dword [esp + 0x1c], 4
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
push 0
lea eax, [esp + 0x1c]
push eax
lea eax, [esi + 0xf9c]
push eax
call dword [sym.imp.Secur32.dll_DecryptMessage]
cmp eax, 0x80090318
je 0x404d6f
cmp eax, 0x90317
jne 0x404ca4
cmp dword [esi + 8], 0xffffffff
mov eax, dword [esi + 0xfb8]
mov dword [esi + 0xfb0], eax
je 0x404ce2
push str.tls___socket_closed_in_decrypt_message
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403e49
push 2
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 8], 0xffffffff
jmp 0x404ce2
cmp eax, 0x80090308
jne 0x404cc2
push str.tls___invalid_token_in_decrypt_message
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403e49
jmp 0x404ce0
test eax, eax
je 0x404cf4
push eax
push str.tls___decrypt_message_failed___d_status
lea eax, [esi + 0x228]
push 0xff
push eax
call fcn.00403c67
add esp, 0x10
xor bl, bl
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, bl
jmp 0x404da9
push 4
lea edi, [esp + 0x24]
pop ebp
cmp dword [edi + 4], ebx
jne 0x404d22
push dword [edi]
mov eax, dword [esi + 0xfac]
push dword [edi + 8]
add eax, dword [esi + 0xfb8]
push eax
call fcn.0041c760
mov eax, dword [edi]
add esp, 0xc
add dword [esi + 0xfb8], eax
add edi, 0xc
sub ebp, 1
jne 0x404cfb
push 5
pop eax
cmp dword [esp + 0x24], eax
jne 0x404d3d
lea edi, [esp + 0x20]
lea eax, [esp + 0x28]
jmp 0x404d6b
cmp dword [esp + 0x30], eax
jne 0x404d4d
lea edi, [esp + 0x2c]
lea eax, [esp + 0x34]
jmp 0x404d6b
cmp dword [esp + 0x3c], eax
jne 0x404d5d
lea edi, [esp + 0x38]
lea eax, [esp + 0x40]
jmp 0x404d6b
cmp dword [esp + 0x48], eax
jne 0x404da3
lea edi, [esp + 0x44]
lea eax, [esp + 0x4c]
mov ebp, dword [eax]
mov edi, dword [edi]
test edi, edi
je 0x404d8a
mov eax, dword [esi + 0xfac]
add eax, dword [esi + 0xfb8]
push edi
push ebp
push eax
call fcn.0041c760
add esp, 0xc
mov ecx, dword [esi + 0xfb8]
lea eax, [esi + 0xf84]
add ecx, edi
mov dword [esi + 0xfb0], ecx
jmp 0x404ce6
xor edi, edi
jmp 0x404d8a
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
Function at 0x405067
Capabilities:
Encrypt data via sspi

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x50]
mov esi, ecx
test edi, edi
je 0x405144
mov ecx, dword [esi + 0xfc4]
mov edx, dword [esi + 0xfc0]
lea eax, [edx + ecx]
cmp dword [esp + 0x54], eax
jb 0x405144
mov ebp, dword [esp + 0x58]
lea eax, [edx + edi]
mov dword [esp + 0x30], eax
xor ebx, ebx
mov eax, dword [esp + 0x54]
sub eax, edx
mov dword [esp + 0x40], ebx
sub eax, ecx
mov dword [ebp], ebx
mov dword [esp + 0x28], eax
mov eax, edi
sub eax, ecx
mov dword [esp + 0x48], ebx
add eax, dword [esp + 0x54]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x10], ebx
lea ebx, [esi + 0xf84]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x1c]
push ebx
mov dword [esp + 0x28], edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], 7
mov dword [esp + 0x30], 1
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], 6
mov dword [esp + 0x18], 4
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
lea eax, [esp + 0x14]
push eax
push 0
lea eax, [esi + 0xf9c]
push eax
call dword [sym.imp.Secur32.dll_EncryptMessage]
test eax, eax
je 0x405150
push str.tls___encrypt_message_failed
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403e49
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret 0xc
mov eax, dword [esp + 0x1c]
cmp eax, dword [esi + 0xfc0]
jae 0x40518b
push dword [esp + 0x28]
add eax, edi
push dword [esp + 0x34]
push eax
call fcn.0041c760
push dword [esp + 0x40]
mov eax, dword [esp + 0x38]
add eax, dword [esp + 0x2c]
push dword [esp + 0x4c]
add eax, edi
push eax
call fcn.0041c760
mov eax, dword [esp + 0x34]
add esp, 0x18
mov ecx, dword [esp + 0x34]
add ecx, dword [esp + 0x28]
add ecx, eax
push ebx
mov dword [ebp], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
jmp 0x405146
Function at 0x4052d9
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x18
push ebx
mov ebx, ecx
push ebp
push esi
push edi
cmp dword [ebx + 8], 0xffffffff
je 0x40544d
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40544d
mov ebp, dword [esp + 0x34]
xor ecx, ecx
test ebp, ebp
je 0x405305
mov dword [ebp], ecx
mov esi, dword [ebx + 0x448]
mov edi, dword [ebx + 0x44c]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
add eax, esi
mov dword [ebx + 0x450], eax
adc edx, edi
mov dword [ebx + 0x454], edx
jmp 0x405412
mov ecx, ebx
call fcn.004062c7
test eax, eax
jne 0x405365
mov ecx, ebx
call fcn.00406342
test al, al
jne 0x405459
push 1
jmp 0x40540c
xor eax, eax
push eax
push eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x40]
push eax
push 1
lea eax, [esp + 0x34]
push eax
push dword [ebx + 8]
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
jne 0x4053e9
cmp dword [esp + 0x34], 1
jne 0x4053e9
mov esi, dword [ebx + 0x448]
xor ecx, ecx
mov edi, dword [ebx + 0x44c]
mov dword [esp + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
add eax, esi
mov dword [ebx + 0x450], eax
mov eax, dword [esp + 0x24]
adc edx, edi
mov dword [ebx + 0x454], edx
mov cl, byte [eax]
cmp cl, 0xd
je 0x405412
cmp cl, 0xa
je 0x405470
mov ecx, dword [esp + 0x30]
cmp ecx, 1
jbe 0x405412
add eax, dword [esp + 0x34]
sub ecx, dword [esp + 0x34]
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], ecx
jmp 0x405412
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x18], eax
cmp eax, 0x2733
jne 0x40541f
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, 0x7d0
je 0x40541f
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [ebx + 0x435], 0
je 0x405344
push str.raw___read_string_failed
lea ecx, [ebx + 0x228]
mov edx, 0xff
call fcn.00403e49
test ebp, ebp
je 0x40543f
mov eax, dword [esp + 0x18]
mov dword [ebp], eax
mov eax, dword [esp + 0x2c]
mov ecx, ebx
mov byte [eax], 0
call fcn.00403b0b
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
push str.raw___read_string_timeout
lea ecx, [ebx + 0x228]
mov edx, 0xff
call fcn.00403e49
jmp 0x40544d
mov byte [eax], 0
mov esi, dword [ebx + 0x448]
mov edi, dword [ebx + 0x44c]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
add eax, esi
mov dword [ebx + 0x450], eax
mov al, 1
adc edx, edi
mov dword [ebx + 0x454], edx
jmp 0x40544f
Function at 0x405c82
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
sub esp, 0x120
xor eax, eax
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x228]
mov word [edi], ax
cmp byte [esi + 0x435], al
je 0x405ca8
xor al, al
jmp 0x405e67
call fcn.00403b0b
mov ebp, dword [esp + 0x134]
xor ebx, ebx
push 1
push ebx
push ebx
movzx eax, word [ebp]
push 6
push 1
push eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
jne 0x405ce4
push str.socket_create_failed
mov edx, 0xff
mov ecx, edi
call fcn.00403e49
jmp 0x405ca1
lea eax, [esi + 0x440]
cmp dword [eax], ebx
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
jbe 0x405d06
push 4
push eax
push 0x1005
push 0xffff
push dword [esi + 8]
call ebx
lea eax, [esi + 0x444]
cmp dword [eax], 0
jbe 0x405d23
push 4
push eax
push 0x1006
push 0xffff
push dword [esi + 8]
call ebx
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x100000
push eax
push 0x1002
push 0xffff
push dword [esi + 8]
mov dword [esp + 0x2c], 0x40000
call ebx
push 4
lea eax, [esp + 0x1c]
push eax
push 0x1001
push 0xffff
push dword [esi + 8]
call ebx
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 1
push eax
push 8
push 0xffff
push dword [esi + 8]
call ebx
mov eax, dword [esi]
xor ebx, ebx
inc ebx
mov ecx, esi
push ebx
call dword [eax + 0x1c]
lea eax, [esp + 0x10]
mov dword [esp + 0x10], ebx
mov ebx, dword [sym.imp.WS2_32.dll_ioctlsocket]
push eax
push 0x8004667e
push dword [esi + 8]
call ebx
xor eax, eax
cmp word [ebp], 0x17
push eax
push eax
push eax
push eax
push 0x10
pop eax
push 0x1c
pop ecx
cmove eax, ecx
push eax
push ebp
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_WSAConnect]
cmp eax, 0xffffffff
jne 0x405e51
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x405e19
mov ecx, dword [esi + 8]
xor edx, edx
mov eax, dword [esp + 0x138]
mov dword [esp + 0x2c], ecx
mov ecx, 0x3e8
div ecx
xor ecx, ecx
mov dword [esp + 0x28], 1
mov dword [esp + 0x20], eax
imul eax, edx, 0x3e8
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
push eax
push ecx
lea eax, [esp + 0x30]
push eax
push ecx
push ecx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x405e51
mov ecx, esi
call fcn.00403b0b
push str.connect_failed
mov edx, 0xff
mov ecx, edi
call fcn.00403e49
lea eax, [esi + 0x28]
push eax
push str._s_direct_connect_failed
push str.Socket
push 0x4b9590
call fcn.00445742
add esp, 0x10
jmp 0x405ca1
and dword [esp + 0x10], 0
lea ecx, [esp + 0x10]
push ecx
push 0x8004667e
push dword [esi + 8]
call ebx
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret 0xc
Function at 0x4062c7
Capabilities:
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push esi
push edi
mov esi, ecx
xor edi, edi
inc edi
mov dword [ebp - 4], edi
cmp dword [esi + 8], 0xffffffff
je 0x40633b
lea ecx, [ebp - 4]
push ecx
push 0x4004667f
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x406301
mov ecx, esi
call fcn.00403b0b
mov eax, edi
jmp 0x40633e
mov eax, dword [ebp - 4]
test eax, eax
jne 0x40633e
mov eax, dword [esi + 8]
xor ecx, ecx
mov dword [ebp - 0x10c], eax
lea eax, [ebp - 0xc]
push eax
push ecx
push ecx
lea eax, [ebp - 0x110]
mov dword [ebp - 0x110], edi
push eax
push ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], 0x3e8
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x4062fd
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret