joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1004886
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x1007030]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
push 0x103
lea eax, [ebp - 0x107]
push ebx
push eax
mov byte [ebp - 0x108], bl
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x108]
push eax
push ebx
push 2
push ebx
push 0x100282c
push 0x80000002
mov dword [ebp - 0x10c], 0x104
call dword [sym.imp.SHLWAPI.dll_SHRegGetValueA]
test eax, eax
jne 0x100491c
cmp byte [ebp - 0x108], bl
je 0x100491c
push esi
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x100491b
push 0x16
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x1004914
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.010055d3
leave
ret

Function at 0x10049a9
Capabilities:
Create shortcut via ishelllink

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x1007030]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x210]
push eax
push 0x1002878
push 1
push 0
push 0x1002bf0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x1004a99
cmp dword [ebp + 0x14], 0
push esi
mov esi, 0x1002410
je 0x1004a25
push dword [ebp + 0x14]
lea eax, [ebp - 0x20c]
push esi
push 0x1002868
push 0x104
push eax
call fcn.0100335c
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax]
add esp, 0x14
lea edx, [ebp - 0x20c]
push edx
push eax
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax]
push 0x100284c
push eax
call dword [ecx + 0x24]
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x50]
test eax, eax
jl 0x1004a8c
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax]
lea edx, [ebp - 0x214]
push edx
push 0x1002be0
push eax
call dword [ecx]
test eax, eax
jl 0x1004a8c
mov eax, dword [ebp - 0x214]
mov ecx, dword [eax]
push 1
push ebx
push eax
call dword [ecx + 0x18]
test eax, eax
jl 0x1004a80
push dword [ebp + 0x10]
push esi
push ebx
call dword [sym.imp.SHELL32.dll_SHSetLocalizedName]
mov eax, dword [ebp - 0x214]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.010055d3
leave
ret 0x10
Function at 0x1004aae
Capabilities:
Delete file
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x1007030]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push esi
push ecx
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x210]
push eax
push 0x1002898
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHELL32.dll_SHCreateItemFromParsingName]
mov esi, eax
push 0x80
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test esi, esi
jl 0x1004b66
lea eax, [ebp - 0x214]
push eax
push 0x1002888
push 1
push 0
push 0x1002c00
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov esi, eax
test esi, esi
jl 0x1004b5a
mov eax, dword [ebp - 0x214]
push dword [ebp - 0x210]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov esi, eax
mov eax, dword [ebp - 0x214]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x210]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.010055d3
leave
ret 8
Function at 0x1004fc3
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x1007030]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
jbe 0x1005017
push 0
push dword [esi + edi*8]
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x1005011
push dword [esi + edi*8 + 4]
lea eax, [ebp - 0x20c]
push 0
push dword [ebp + 8]
push eax
call fcn.01004ec4
inc edi
cmp edi, dword [ebp + 0x10]
jb 0x1004fe4
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.010055d3
leave
ret 0xc

Function at 0x100502c
Capabilities:
Create directory
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x1007030]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
xor ebx, ebx
cmp dword [ebp + 8], ebx
push edi
mov edi, dword [ebp + 0x10]
jl 0x1005077
push edi
push 2
lea eax, [ebp - 0x20c]
push eax
push ebx
call esi
test eax, eax
je 0x1005077
push 1
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
call fcn.01004ec4
cmp dword [ebp + 0xc], ebx
jl 0x10050bf
push edi
push 0x1a
lea eax, [ebp - 0x20c]
push eax
push ebx
call esi
test eax, eax
je 0x10050bf
push 0x1002460
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 1
push edi
push dword [ebp + 0xc]
lea eax, [ebp - 0x20c]
push eax
call fcn.01004ec4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.010055d3
leave
ret 0xc
Function at 0x10055b8
Capabilities:
Terminate process

Disassembly:
push 0x5c
push 0x1005fb0
call fcn.010057a4
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov dword [ebp - 4], 0xfffffffe
mov dword [ebp - 4], 1
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov dword [ebp - 0x20], ebx
mov edi, 0x100740c
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, ebx
je 0x1005373
cmp eax, esi
jne 0x1005366
xor esi, esi
inc esi
mov dword [ebp - 0x20], esi
jmp 0x1005376
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x100534d
xor esi, esi
inc esi
mov eax, dword [0x1007408]
cmp eax, esi
jne 0x1005389
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x10053b8
mov eax, dword [0x1007408]
test eax, eax
jne 0x10053b2
mov dword [0x1007408], esi
push 0x1001230
push 0x1001224
call fcn.010052af
pop ecx
pop ecx
test eax, eax
je 0x10053b8
jmp 0x10054dc
mov dword [0x10070c0], esi
mov eax, dword [0x1007408]
cmp eax, esi
jne 0x10053dc
push 0x1001220
push 0x1001218
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x1007408], 2
cmp dword [ebp - 0x20], ebx
jne 0x10053e9
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x1007410], ebx
je 0x100540a
push 0x1007410
call fcn.01005719
pop ecx
test eax, eax
je 0x100540a
push ebx
push 2
push ebx
call dword [0x1007410]
mov eax, dword [sym.imp.msvcrt.dll__wcmdln]
cmp dword [eax], ebx
je 0x10054dc
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
movzx ecx, word [eax]
cmp cx, 0x20
ja 0x1005474
cmp cx, bx
je 0x100542f
cmp dword [ebp - 0x1c], ebx
jne 0x1005474
movzx ecx, word [eax]
cmp cx, bx
je 0x1005444
cmp cx, 0x20
ja 0x1005444
inc eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x100542f
test byte [ebp - 0x40], 1
je 0x1005450
movzx ecx, word [ebp - 0x3c]
jmp 0x1005453
push 0xa
pop ecx
push ecx
push eax
push ebx
push 0x1000000
call main
mov dword [0x10070bc], eax
cmp dword [0x10070b0], ebx
jne 0x10054b9
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp cx, 0x22
jne 0x1005485
xor ecx, ecx
cmp dword [ebp - 0x1c], ebx
sete cl
mov dword [ebp - 0x1c], ecx
inc eax
inc eax
jmp 0x1005419
cmp dword [0x10070c0], ebx
jne 0x10054c7
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x10070bc]
jmp 0x10054e8
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.010057e9
ret
call fcn.010058f1
jmp 0x1005310

Function at 0x1005d90
Capabilities:
Set global application hook

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
and dword [esi], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0
push 0x1005d3b
push 3
call dword [sym.imp.USER32.dll_SetWindowsHookExA]
test eax, eax
jne 0x1005dc4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01003390
jmp 0x1005dc8
mov dword [esi], eax
xor eax, eax
pop esi
pop ebp
ret 4
Function at 0x1005f3e
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 1
xor esi, esi
push esi
push 0x1002c20
push 0x80000002
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1005f92
push esi
push esi
lea eax, [ebp - 8]
push eax
push esi
push 0x1002c10
push dword [ebp - 4]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1005f89
cmp dword [ebp - 8], 4
jne 0x1005f89
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x403ba7
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 0x403bdf
lea eax, [ebp - 4]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 4], 0x103
jne 0x403bd2
xor al, al
jmp 0x403c03
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.0042bafc
add esp, 0x18
mov dword [esi + 4], eax
test eax, eax
setne al
pop esi
leave
ret 0xc

Function at 0x403d07
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
test ecx, ecx
je 0x403d70
test edx, edx
je 0x403d70
cmp dword [ebp + 8], 0
je 0x403d70
cmp dword [ebp + 0x10], 0
je 0x403d70
cmp dword [ebp + 0x14], 0
je 0x403d70
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 0x403d6b
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 0x403e35
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 0x403ea7
cmp dword [ebp + 0x10], 4
jb 0x403ea7
xor ebx, ebx
mov dword [esi], ebx
test ecx, ecx
je 0x403ea7
test edx, edx
je 0x403ea7
cmp dword [ebp + 8], ebx
je 0x403ea7
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 0x403ea3
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 0x403ea9
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x404b24
Capabilities:
Decrypt data via sspi

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 0x1374]
test ecx, ecx
je 0x404d1c
mov edi, dword [esi + 0x1378]
test edi, edi
je 0x404d1c
mov eax, dword [esi + 0x1380]
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 + 0x134c]
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 + 0x1364]
push eax
call dword [sym.imp.Secur32.dll_DecryptMessage]
cmp eax, 0x80090318
je 0x404ce4
cmp eax, 0x90317
jne 0x404c19
cmp dword [esi + 8], 0xffffffff
mov eax, dword [esi + 0x1380]
mov dword [esi + 0x1378], eax
je 0x404c57
push str.tls___socket_closed_in_decrypt_message
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403ead
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 0x404c57
cmp eax, 0x80090308
jne 0x404c37
push str.tls___invalid_token_in_decrypt_message
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403ead
jmp 0x404c55
test eax, eax
je 0x404c69
push eax
push str.tls___decrypt_message_failed___d_status
lea eax, [esi + 0x228]
push 0xff
push eax
call fcn.00403ccb
add esp, 0x10
xor bl, bl
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, bl
jmp 0x404d1e
push 4
lea edi, [esp + 0x24]
pop ebp
cmp dword [edi + 4], ebx
jne 0x404c97
push dword [edi]
mov eax, dword [esi + 0x1374]
push dword [edi + 8]
add eax, dword [esi + 0x1380]
push eax
call fcn.0041d880
mov eax, dword [edi]
add esp, 0xc
add dword [esi + 0x1380], eax
add edi, 0xc
sub ebp, 1
jne 0x404c70
push 5
pop eax
cmp dword [esp + 0x24], eax
jne 0x404cb2
lea edi, [esp + 0x20]
lea eax, [esp + 0x28]
jmp 0x404ce0
cmp dword [esp + 0x30], eax
jne 0x404cc2
lea edi, [esp + 0x2c]
lea eax, [esp + 0x34]
jmp 0x404ce0
cmp dword [esp + 0x3c], eax
jne 0x404cd2
lea edi, [esp + 0x38]
lea eax, [esp + 0x40]
jmp 0x404ce0
cmp dword [esp + 0x48], eax
jne 0x404d18
lea edi, [esp + 0x44]
lea eax, [esp + 0x4c]
mov ebp, dword [eax]
mov edi, dword [edi]
test edi, edi
je 0x404cff
mov eax, dword [esi + 0x1374]
add eax, dword [esi + 0x1380]
push edi
push ebp
push eax
call fcn.0041d880
add esp, 0xc
mov ecx, dword [esi + 0x1380]
lea eax, [esi + 0x134c]
add ecx, edi
mov dword [esi + 0x1378], ecx
jmp 0x404c5b
xor edi, edi
jmp 0x404cff
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
Function at 0x404fdc
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 0x4050b9
mov ecx, dword [esi + 0x138c]
mov edx, dword [esi + 0x1388]
lea eax, [edx + ecx]
cmp dword [esp + 0x54], eax
jb 0x4050b9
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 + 0x134c]
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 + 0x1364]
push eax
call dword [sym.imp.Secur32.dll_EncryptMessage]
test eax, eax
je 0x4050c5
push str.tls___encrypt_message_failed
lea ecx, [esi + 0x228]
mov edx, 0xff
call fcn.00403ead
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 + 0x1388]
jae 0x405100
push dword [esp + 0x28]
add eax, edi
push dword [esp + 0x34]
push eax
call fcn.0041d880
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.0041d880
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 0x4050bb
Function at 0x405cba
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 0x405ce0
xor al, al
jmp 0x405ede
call fcn.00403b48
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 0x405d1c
push str.socket_create_failed
mov edx, 0xff
mov ecx, edi
call fcn.00403ead
jmp 0x405cd9
lea eax, [esi + 0x440]
cmp dword [eax], ebx
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
jbe 0x405d3e
push 4
push eax
push 0x1005
push 0xffff
push dword [esi + 8]
call ebx
lea eax, [esi + 0x444]
cmp dword [eax], 0
jbe 0x405d5b
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
call fcn.00405be8
mov dword [esi + 0x470], eax
xor eax, eax
push eax
push eax
push eax
push eax
push 0x10
pop eax
push 0x1c
pop ecx
mov dword [esi + 0x474], edx
cmp word [ebp], 0x17
cmove eax, ecx
push eax
push ebp
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_WSAConnect]
cmp eax, 0xffffffff
jne 0x405ea9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x405e63
mov ecx, dword [esi + 8]
xor edx, edx
mov eax, dword [esp + 0x138]
mov dword [esp + 0x2c], ecx
mov ecx, 0x3e8
div 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 0
lea eax, [esp + 0x30]
push eax
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x405ea9
mov ecx, esi
call fcn.00403b48
and dword [esi + 0x470], 0
mov edx, 0xff
and dword [esi + 0x474], 0
mov ecx, edi
push str.connect_failed
call fcn.00403ead
lea eax, [esi + 0x28]
push eax
push str._s_direct_connect_failed
push str.Socket
push 0x4b9590
call fcn.004465e5
add esp, 0x10
jmp 0x405cd9
push dword [esi + 0x474]
push dword [esi + 0x470]
call fcn.00405c0f
and dword [esp + 0x18], 0
pop ecx
pop ecx
lea ecx, [esp + 0x10]
mov dword [esi + 0x470], eax
push ecx
push 0x8004667e
push dword [esi + 8]
mov dword [esi + 0x474], edx
call ebx
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret 0xc
Function at 0x407548
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x444c
call fcn.0041cf30
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x240]
mov esi, edx
call fcn.00403624
push 8
pop ecx
xor eax, eax
lea edi, [esp + 0x20]
push 0x4000
rep stosd dword es:[edi], eax
xor ebx, ebx
lea eax, [esp + 0x45c]
push ebx
push eax
call fcn.0041de00
mov eax, dword [esi + 4]
add esp, 0xc
mov dword [esp + 0x10], ebx
mov dword [esi + 8], ebx
test eax, eax
je 0x40759a
xor ecx, ecx
mov word [eax], cx
push 0x43
lea eax, [esp + 0x244]
push 0x46fe88
push eax
call fcn.004011fb
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push dword [esp + 0x25c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
cmp edi, 0xffffffff
je 0x407600
push ebx
lea eax, [esp + 0x14]
push eax
push 0x20
lea eax, [esp + 0x2c]
push eax
push ebx
push ebx
push 0x560000
push edi
call ebp
push edi
test eax, eax
jne 0x4075fa
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407767
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x28]
lea eax, [esp + 0x244]
push str..PHYSICALDRIVE_u
push eax
call fcn.004011fb
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push dword [esp + 0x25c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40774f
push ebx
lea eax, [esp + 0x14]
mov dword [esp + 0x20], ebx
push eax
push 0x4000
lea eax, [esp + 0x464]
mov dword [esp + 0x20], ebx
push eax
push 0xc
lea eax, [esp + 0x28]
mov dword [esp + 0x2c], ebx
push eax
push 0x2d1400
push edi
call ebp
test eax, eax
je 0x407748
cmp dword [esp + 0x10], 0x28
jb 0x407748
mov ebp, 0x100
lea eax, [esp + 0x140]
push ebp
push ebx
push eax
call fcn.0041de00
push ebp
lea eax, [esp + 0x50]
push ebx
push eax
call fcn.0041de00
mov eax, dword [esp + 0x47c]
add esp, 0x18
test eax, eax
je 0x4076c8
lea ecx, [esp + 0x458]
push 0xff
add eax, ecx
push eax
lea eax, [esp + 0x148]
push ebp
push eax
call fcn.00429f13
add esp, 0x10
mov eax, dword [esp + 0x468]
test eax, eax
je 0x4076f0
lea ecx, [esp + 0x458]
push 0xff
add eax, ecx
push eax
lea eax, [esp + 0x48]
push ebp
push eax
call fcn.00429f13
add esp, 0x10
mov ebp, 0x46fd84
cmp byte [esp + 0x140], bl
je 0x407733
cmp byte [esp + 0x40], bl
je 0x407721
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x144]
push eax
push str._S__S
push esi
call fcn.004011fb
add esp, 0x10
jmp 0x407748
lea eax, [esp + 0x140]
push eax
push ebp
push esi
call fcn.004011fb
add esp, 0xc
cmp byte [esp + 0x40], bl
je 0x407748
lea eax, [esp + 0x40]
push eax
push ebp
push esi
call fcn.004011fb
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
cmp dword [esi + 8], eax
jb 0x407763
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x407763
cmp word [ecx], bx
jne 0x407765
mov al, bl
mov bl, al
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x444c
ret