joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4817c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x4817ec
jl 0x4817e0
test ecx, ecx
jne 0x4817ec
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x481805
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x481853
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x481859
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x481859
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x4818c6
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x481882
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x4818b4
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x4818c6
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x481890
test edi, edi
je 0x4818c6
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x481c50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x509040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x481c80
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004870f9
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x481cbc
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x481cbc
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004870f9
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x481d93
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x481ce4
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x481cf0
movsx eax, bl
jmp 0x481d28
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x481d52
sub eax, 1
je 0x481d52
sub eax, 2
jne 0x481d93
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004870f9
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x481d70
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x481d93
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004870f9
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004870f9
mov esp, ebp
pop ebp
ret 4
Function at 0x483c30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x509040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x483cec
cmp byte [esi + 0x3d], 0
je 0x483cec
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x483cda
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x483ca1
sub eax, 1
je 0x483ca5
sub eax, 2
jne 0x483cda
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004870f9
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x483cc3
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x483cda
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004870f9
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004870f9
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004870f9
mov esp, ebp
pop ebp
ret

Function at 0x487df3
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x487e32
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x487e32
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x487e32
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x487e32
cmp dword [ecx + 0x74], 0xe
jbe 0x487e32
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x491170
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x4911fc
push esi
call fcn.004a3960
add esp, 4
test al, al
jne 0x4911fc
push ebx
push edi
mov edi, esi
xor ebx, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x491193
sub edi, ecx
push edi
push 0x2e
push esi
call fcn.004af170
add esp, 0xc
test eax, eax
je 0x4911c7
sub eax, esi
push eax
push 0x2e
push esi
call fcn.004af170
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x4911c9
inc ebx
mov ecx, esi
sub ecx, ebx
add edi, ecx
test ebx, ebx
cmovne esi, ebx
mov ebx, 0x1505
add edi, esi
cmp esi, edi
jae 0x4911f5
mov al, byte [esi]
push eax
call fcn.004a0670
movsx ecx, al
inc esi
mov eax, ebx
add esp, 4
shl eax, 5
add eax, ebx
xor ecx, eax
mov ebx, ecx
cmp esi, edi
jb 0x4911d7
pop edi
movzx eax, bl
pop ebx
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x49cb80
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp byte [esi + 0x6db], 0
je 0x49cc1d
cmp dword [esi + 0x1ac], 0
je 0x49cbd7
push esi
call fcn.0048bee0
push 1
push esi
mov byte [esp + 0x14], al
call fcn.0048c160
push dword [esi + 0x15c]
mov eax, dword [esi + 0x1ac]
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push esi
call eax
push dword [esp + 0x28]
push esi
call fcn.0048c160
add esp, 0x28
pop esi
ret
mov ecx, dword [esp + 0xc]
mov eax, ecx
sub eax, 0
je 0x49cbec
sub eax, 1
je 0x49cbec
sub eax, 1
jne 0x49cc1d
push dword [esi + 0x158]
lea eax, [ecx*2 + 0x4e3010]
push 1
add eax, ecx
push 2
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
push dword [esi + 0x158]
push 1
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x20
pop esi
ret
Function at 0x49e9f0
Capabilities:
Get common file path

Disassembly:
push ecx
push ebx
push edi
push str.kernel32
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x49ea0a
pop edi
pop ebx
pop ecx
ret
push ebp
push esi
push str.LoadLibraryExA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [esp + 0x18]
mov ebp, eax
push 0x4e3228
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strpbrk
add esp, 8
test eax, eax
je 0x49ea52
test ebp, ebp
je 0x49ea43
push 8
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
test ebp, ebp
je 0x49ea78
push str.AddDllDirectory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x49ea78
push 0x800
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x49eb2f
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x49ea95
sub ecx, ebx
lea eax, [ecx + 1]
add eax, edx
push eax
call dword [0x509098]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x49eb25
push dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x49eb25
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x49eac7
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x49eae0
sub ecx, edx
sub ecx, esi
add ecx, ebx
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x49eaf0
test ebp, ebp
je 0x49eb1c
push 8
push 0
push ebx
call ebp
push ebx
mov edi, eax
call dword [0x50909c]
add esp, 4
mov eax, edi
pop esi
pop ebp
pop edi
pop ebx
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push ebx
call dword [0x50909c]
add esp, 4
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
pop ecx
ret
Function at 0x4a3b10
Capabilities:
Create udp socket

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x4a3b4e
mov eax, dword [esi + 0x7c]
cmp byte [eax + 0x108], 0
jne 0x4a3b3f
push 0
call fcn.004a3b10
add esp, 4
test al, al
mov eax, dword [esi + 0x7c]
setne cl
inc cl
mov byte [eax + 0x108], cl
mov eax, dword [esi + 0x7c]
pop esi
cmp byte [eax + 0x108], 2
sete al
ret
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x4a3b63
xor al, al
pop esi
ret
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, 1
pop esi
ret
Function at 0x4af8c0
Capabilities:
Move file

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
call fcn.004914f0
push dword [esp + 0x38]
movups xmm0, xmmword [eax]
movups xmmword [esp + 0x18], xmm0
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
push dword [esp + 0x40]
mov edi, eax
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov ebx, dword [sym.imp.KERNEL32.dll_MoveFileExA]
add esp, 0xc
mov esi, eax
push 1
push esi
push edi
call ebx
test eax, eax
jne 0x4af955
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
nop dword [eax + eax]
lea eax, [esp + 0x20]
push eax
call fcn.004914f0
movups xmm0, xmmword [esp + 0x14]
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movups xmmword [ecx], xmm0
mov ecx, esp
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call fcn.004915a0
add esp, 0x20
test edx, edx
ja 0x4af979
jb 0x4af947
cmp eax, 0x3e8
ja 0x4af979
push 1
call ebp
push 1
push esi
push edi
call ebx
test eax, eax
je 0x4af910
test edi, edi
je 0x4af962
push edi
call fcn.004dbfbf
add esp, 4
test esi, esi
je 0x4af96f
push esi
call fcn.004dbfbf
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
test edi, edi
je 0x4af986
push edi
call fcn.004dbfbf
add esp, 4
test esi, esi
je 0x4af993
push esi
call fcn.004dbfbf
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x20
ret
Function at 0x4afdb0
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x20]
push edi
xor edi, edi
mov dword [esp + 0xc], edi
mov dword [eax], edi
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 4], eax
test eax, eax
jne 0x4aff3f
push esi
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4aff2a
push ebx
push ebp
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4afe0c
lea edx, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4afe00
sub eax, edx
inc eax
jmp 0x4afe0e
xor eax, eax
mov ecx, dword [esi + 4]
mov dword [esp + 0x14], eax
cmp ecx, 2
jne 0x4afe1f
lea ebp, [ecx + 0xe]
jmp 0x4afe2b
cmp ecx, 0x17
jne 0x4afecc
lea ebp, [ecx + 5]
cmp dword [esi + 0x18], 0
je 0x4afecc
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x4afecc
cmp ecx, ebp
jb 0x4afecc
add eax, 0x20
add eax, ebp
push eax
call dword [0x509098]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4aff1b
mov ecx, dword [esi]
mov dword [ebx], ecx
mov ecx, dword [esi + 4]
mov dword [ebx + 4], ecx
mov ecx, dword [esi + 8]
mov dword [ebx + 8], ecx
mov eax, dword [esi + 0xc]
mov dword [ebx + 0xc], eax
lea eax, [ebx + 0x20]
push ebp
mov dword [ebx + 0x10], ebp
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x18], eax
push dword [esi + 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x20]
add esp, 0xc
test ecx, ecx
je 0x4afeb8
mov eax, dword [ebx + 0x18]
add eax, ebp
push ecx
mov dword [ebx + 0x14], eax
push dword [esi + 0x14]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 0x18]
test edi, edi
cmove edi, ebx
test eax, eax
je 0x4afec8
mov dword [eax + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x4afdf2
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
pop ebp
pop ebx
test eax, eax
je 0x4afeec
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x4aff26
test edi, edi
je 0x4aff0b
mov esi, dword [edi + 0x1c]
push edi
call dword [0x50909c]
add esp, 4
mov edi, esi
test esi, esi
jne 0x4afef4
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x28]
xor edi, edi
mov dword [eax], edi
mov eax, esi
pop esi
pop edi
add esp, 0x10
ret
mov esi, 8
mov dword [esp + 0x10], esi
jmp 0x4afedb
test edi, edi
jne 0x4aff36
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
mov dword [eax], edi
mov eax, esi
pop esi
pop edi
add esp, 0x10
ret

Function at 0x4b0340
Capabilities:
Create thread

Disassembly:
push 0
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push 0
push 0
call sub.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex
mov ecx, eax
add esp, 0x18
xor eax, eax
test ecx, ecx
je 0x4b0366
cmp ecx, 0xffffffff
cmovne eax, ecx
ret
Function at 0x4b03b0
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
mov ecx, 0x2b
test edi, edi
je 0x4b045b
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
nop dword [eax]
mov ebx, 4
lea eax, [esp + 0x1c]
push 4
push eax
cmp edi, ebx
push ebp
cmovb ebx, edi
call fcn.00496b50
add esp, 0xc
cmp eax, 4
jne 0x4b0416
cmp byte [0x5887c8], 0
jne 0x4b0422
push 2
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
mov ecx, eax
test eax, eax
jne 0x4b045d
mov eax, dword [esp + 0x1c]
jmp 0x4b043f
imul eax, dword [0x5887c4], 0x41c64e6d
add eax, 0x3039
mov dword [0x5887c4], eax
rol eax, 0x10
xor ecx, ecx
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x4b0453
mov byte [esi], al
dec edi
inc esi
shr eax, 8
sub ebx, 1
jne 0x4b0443
mov dword [esp + 0x1c], eax
test edi, edi
jne 0x4b03d0
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x4b0470
Capabilities:
Generate random numbers via winapi

Disassembly:
sub esp, 0x8c
mov eax, dword [0x509040]
xor eax, esp
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x90]
mov edx, dword [esp + 0x98]
mov dword [esp + 4], eax
mov eax, edx
push ebx
and eax, 0xfffffffe
lea ebx, [esp + 0xc]
push ebp
mov ebp, dword [esp + 0x9c]
cmp eax, 0x100
jae 0x4b05d9
test dl, 1
je 0x4b05d9
push esi
dec edx
mov esi, ebx
push edi
mov edi, edx
mov dword [esp + 0xa8], edx
shr edi, 1
mov ecx, 0x2b
je 0x4b0583
nop word [eax + eax]
push 4
lea eax, [esp + 0x14]
mov ebx, 4
push eax
push dword [esp + 0x1c]
cmp edi, ebx
cmovb ebx, edi
call fcn.00496b50
add esp, 0xc
cmp eax, 4
jne 0x4b0529
cmp byte [0x5887c8], 0
jne 0x4b0539
push 2
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
mov ecx, eax
test eax, eax
jne 0x4b05c0
mov eax, dword [esp + 0x10]
jmp 0x4b0556
imul eax, dword [0x5887c4], 0x41c64e6d
add eax, 0x3039
mov dword [0x5887c4], eax
rol eax, 0x10
xor ecx, ecx
mov dword [esp + 0x10], eax
test ebx, ebx
je 0x4b0570
nop word [eax + eax]
mov byte [esi], al
dec edi
inc esi
shr eax, 8
sub ebx, 1
jne 0x4b0560
mov dword [esp + 0x10], eax
test edi, edi
jne 0x4b04e0
mov edx, dword [esp + 0xa8]
lea ebx, [esp + 0x18]
mov eax, ecx
test eax, eax
jne 0x4b05c0
test edx, edx
je 0x4b05ba
nop dword [eax]
movzx ecx, byte [ebx]
lea ebx, [ebx + 1]
mov eax, ecx
and ecx, 0xf
shr eax, 4
movzx eax, byte [eax + 0x4e71d0]
mov byte [ebp], al
movzx eax, byte [ecx + 0x4e71d0]
mov byte [ebp + 1], al
add ebp, 2
sub edx, 2
jne 0x4b0590
mov byte [ebp], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x88]
xor ecx, esp
call fcn.004870f9
add esp, 0x8c
ret
mov ecx, dword [esp + 0x90]
mov eax, 0x2b
pop ebp
pop ebx
xor ecx, esp
call fcn.004870f9
add esp, 0x8c
ret

Function at 0x4b0600
Capabilities:
Generate random numbers via winapi

Disassembly:
push dword [esp + 8]
push 0
push dword [esp + 0xc]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 2
push dword [esp + 0xc]
push dword [esp + 0xc]
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
ret
Function at 0x4b32d0
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
xor ebp, ebp
push esi
push edi
lea esi, [ebp + 1]
push esi
push ebp
call dword [0x5090a0]
mov edi, eax
add esp, 8
test edi, edi
je 0x4b3327
nop word [eax + eax]
push esi
push edi
push dword [esp + 0x1c]
mov ebp, edi
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
je 0x4b333f
cmp esi, ebx
je 0x4b333f
cmp esi, 0x8000
ja 0x4b333f
cmp esi, ebx
jb 0x4b3338
push esi
push edi
call dword [0x5090a0]
mov edi, eax
add esp, 8
test edi, edi
jne 0x4b32f0
push ebp
call dword [0x50909c]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call dword [0x50909c]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret

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

Disassembly:
mov ecx, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push 0
mov byte [esp + 0x12], cl
lea ecx, [esp + 0x10]
push 3
mov eax, dword [esi + 0x18]
push ecx
mov byte [esp + 0x18], 0xff
mov byte [esp + 0x19], bl
push dword [eax + 0x128]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4b485c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.0049cc20
add esp, 0xc
push dword [esp + 0x14]
push ebx
push str.SENT
push esi
call fcn.004b4430
add esp, 0x10
pop esi
pop ebx
ret
Function at 0x4b49b0
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
cmp dword [esp + 0xc], 0x1f
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov eax, dword [ebx + 0x18]
mov ebp, dword [ebx + 0x12c]
mov dword [esp + 8], eax
jne 0x4b4b03
push esi
lea ecx, [ebp + 0x1cb4]
push edi
lea edi, [ebp + 0x1eb4]
mov eax, ecx
mov dword [edi], ecx
cmp ecx, edi
jae 0x4b49ed
lea eax, [ecx + 1]
mov byte [ecx], 0xff
mov dword [edi], eax
cmp eax, edi
jae 0x4b4a01
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b4a01
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebp + 0x1ca8]
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
movzx eax, ax
mov dword [esp + 0x18], eax
movzx eax, word [ebp + 0x1caa]
push eax
call esi
mov edx, dword [esp + 0x18]
movzx ecx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x4b4a6b
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b4a6b
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b4a6b
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b4a6b
shr ecx, 8
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b4a6b
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b4a6b
mov byte [eax], 0xf0
mov eax, dword [edi]
inc eax
mov dword [ebp + 0x1eb8], eax
lea esi, [ebp + 0x1cb4]
sub eax, esi
mov dword [edi], esi
sub eax, 2
push eax
lea eax, [ebp + 0x1cb6]
push eax
push 0x3e
push ebx
call fcn.004b4530
mov eax, dword [esp + 0x20]
add esp, 0x10
mov edi, dword [sym.imp.WS2_32.dll_send]
push 0
push 3
push esi
push dword [eax + 0x128]
call edi
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x4b4ac3
call esi
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.0049cc20
add esp, 0xc
push 4
lea eax, [ebp + 0x1cb7]
push eax
push ebx
call fcn.004b4880
add esp, 0xc
lea eax, [ebp + 0x1cbb]
push 0
push 2
push eax
mov eax, dword [esp + 0x1c]
push dword [eax + 0x128]
call edi
test eax, eax
jns 0x4b4b01
call esi
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.0049cc20
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret