joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46a7d0
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 0xc]
cdq
mov ecx, 0x64
idiv ecx
cmp eax, 2
je 0x46a810
push str.Couldnt_set_desired_mode
mov edx, dword [ebp - 8]
push edx
call fcn.004466f0
add esp, 8
mov eax, 0x11
jmp 0x46a88b
cmp dword [ebp + 0xc], 0xc8
je 0x46a82e
mov eax, dword [ebp + 0xc]
push eax
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
mov ecx, dword [ebp - 8]
push ecx
call fcn.00446670
add esp, 0xc
cmp dword [ebp + 0x10], 0x13
jne 0x46a845
mov edx, dword [ebp + 8]
push edx
call fcn.00468760
add esp, 4
mov dword [ebp - 4], eax
jmp 0x46a888
cmp dword [ebp + 0x10], 0x14
jne 0x46a85c
mov eax, dword [ebp + 8]
push eax
call fcn.0046a8a0
add esp, 4
mov dword [ebp - 4], eax
jmp 0x46a888
cmp dword [ebp + 0x10], 0x15
jne 0x46a873
mov ecx, dword [ebp + 8]
push ecx
call fcn.0046aa60
add esp, 4
mov dword [ebp - 4], eax
jmp 0x46a888
cmp dword [ebp + 0x10], 0x16
jne 0x46a888
mov edx, dword [ebp + 8]
push edx
call fcn.0046aa90
add esp, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x46b350
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x194]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], 0xffffffff
mov dword [ebp - 0x20], 0x10
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x46b3ad
mov dword [ebp - 0x20], 0x10
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0044c420
add esp, 8
cmp dword [ebp - 0xc], 0xffffffff
jne 0x46b3de
push str.Error_accept__ing_server_connect
mov eax, dword [ebp - 4]
push eax
call fcn.004466f0
add esp, 8
mov eax, 0x1e
jmp 0x46b470
push str.Connection_accepted_from_server_n
mov ecx, dword [ebp - 4]
push ecx
call fcn.00446670
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx + 0x3c8], 0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0x194], ecx
push 1
mov edx, dword [ebp - 0xc]
push edx
call fcn.0047ccf0
add esp, 8
mov eax, dword [ebp + 8]
mov dword [eax + 0x1a4], 1
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x1a8], 0
je 0x46b46e
mov dword [ebp - 0x24], 0
push 1
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x1ac]
push ecx
mov edx, dword [ebp - 4]
call dword [edx + 0x1a8]
add esp, 0xc
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x46b46e
mov eax, dword [ebp + 8]
push eax
call fcn.00469580
add esp, 4
mov eax, 0x2a
jmp 0x46b470
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x47b020
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
mov dword [ebp - 0x108], eax
mov byte [ebp - 0x104], 0
cmp dword [ebp - 0x108], 0
je 0x47b068
push 0x104
lea ecx, [ebp - 0x104]
push ecx
mov edx, dword [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
movsx eax, byte [ebp - 0x104]
test eax, eax
je 0x47b08b
lea ecx, [ebp - 0x104]
push ecx
call dword [0x4ab914]
add esp, 4
mov dword [ebp - 0x10c], eax
jmp 0x47b095
mov dword [ebp - 0x10c], 0
mov eax, dword [ebp - 0x10c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x47ccf0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
xor eax, eax
cmp dword [ebp + 0xc], 0
setne al
mov dword [ebp - 4], eax
lea ecx, [ebp - 4]
push ecx
push 0x8004667e
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4807f0
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov byte [eax], 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_gethostname]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
add eax, dword [ebp + 0xc]
mov byte [eax - 1], 0
cmp dword [ebp - 4], 0
je 0x480825
mov eax, dword [ebp - 4]
jmp 0x480845
push 0x2e
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x480843
mov edx, dword [ebp - 8]
mov byte [edx], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4808b0
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x20], 8
push 0xf0000000
push 1
push 0
push 0
lea eax, [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x4808e0
xor eax, eax
jmp 0x480999
push 0x14
push 0
lea ecx, [ebp - 0x1c]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov byte [ebp - 0x1c], 8
mov byte [ebp - 0x1b], 2
mov dword [ebp - 0x18], 0x6601
mov dword [ebp - 0x14], 8
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.004809a0
add esp, 8
push 8
lea ecx, [ebp - 0x10]
push ecx
call fcn.00487fa0
add esp, 8
lea edx, [ebp - 8]
push edx
push 0
push 0
push 0x14
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x480950
push 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
jmp 0x480999
push 8
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x20]
push edx
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0
push 0
push 0
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x480b80
Capabilities:
Hash data using md4
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
push edi
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
shl ecx, 1
push ecx
call dword [0x4ab908]
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x480bba
mov eax, 0x1b
jmp 0x480c82
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00480c90
add esp, 0xc
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0xc], 0
je 0x480be3
mov eax, dword [ebp - 0xc]
jmp 0x480c82
push 0xf0000000
push 1
push 0
push 0
lea edx, [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x480c60
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0x8002
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x480c54
mov dword [ebp - 0x18], 0x10
push 0
mov edx, dword [ebp - 4]
shl edx, 1
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
push 0
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 2
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push 0
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 5
push 0
mov ecx, dword [ebp + 0x10]
add ecx, 0x10
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov edx, dword [ebp - 8]
push edx
call dword [0x4ab90c]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x485240
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
xor edx, edx
cmp dword [ecx + 4], 3
sete dl
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
je 0x485291
mov eax, dword [ebp + 8]
cmp dword [eax + 0xc], 0
jne 0x485270
xor eax, eax
jmp 0x48531a
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 1
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
call dword [eax + 0xc]
add esp, 0x10
mov dword [ebp - 4], eax
jmp 0x4852e2
mov ecx, dword [ebp + 8]
cmp dword [ecx + 8], 0
jne 0x4852c5
push 0x494428
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov edx, dword [ebp + 8]
mov dword [edx + 8], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0
jne 0x4852c5
or eax, 0xffffffff
jmp 0x48531a
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 1
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x485317
mov edx, dword [ebp + 8]
cmp dword [edx + 8], 0
je 0x48530b
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov edx, dword [ebp + 8]
mov dword [edx + 8], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10002b1d
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
cmp eax, 1
push esi
jne 0x10002c0d
mov eax, 0x94
call fcn.10007600
mov esi, esp
push esi
mov dword [esi], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x10002c82
mov ecx, dword [esi + 0x10]
mov dword [0x1000ee08], ecx
mov eax, dword [esi + 4]
mov dword [0x1000ee14], eax
mov edx, dword [esi + 8]
mov dword [0x1000ee18], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
cmp ecx, 2
mov dword [0x1000ee0c], esi
je 0x10002b88
or esi, 0x8000
mov dword [0x1000ee0c], esi
shl eax, 8
add eax, edx
push 1
mov dword [0x1000ee10], eax
call fcn.10005628
test eax, eax
pop ecx
je 0x10002c82
call fcn.10003f5d
test eax, eax
jne 0x10002bb5
call fcn.10005679
jmp 0x10002c82
call fcn.10007576
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x1001046c], eax
call fcn.10007454
mov dword [0x1000ec10], eax
call fcn.10006f35
test eax, eax
jl 0x10002c06
call fcn.100073b2
test eax, eax
jl 0x10002c01
call fcn.1000717f
test eax, eax
jl 0x10002c01
push 0
call fcn.10006d2d
test eax, eax
pop ecx
jne 0x10002c01
inc dword [0x1000ec0c]
jmp 0x10002c93
call fcn.10007133
call fcn.10003d46
jmp 0x10002bab
test eax, eax
jne 0x10002c3d
cmp dword [0x1000ec0c], eax
jle 0x10002c82
dec dword [0x1000ec0c]
cmp dword [0x1000ee44], eax
jne 0x10002c2c
call fcn.10006e6b
call fcn.10007133
call fcn.10003d46
call fcn.10005679
jmp 0x10002c93
cmp eax, 2
jne 0x10002c86
push 0x8c
push 1
call fcn.10006e7a
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x10002c82
push esi
push dword [0x1000e328]
call dword [0x1000ec38]
test eax, eax
push esi
je 0x10002c7c
call fcn.10003d63
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
jmp 0x10002c93
call fcn.100027c5
pop ecx
xor eax, eax
jmp 0x10002c96
cmp eax, 3
jne 0x10002c93
push 0
call fcn.10003f2e
pop ecx
xor eax, eax
inc eax
lea esp, [ebp - 4]
pop esi
pop ebp
ret 0xc
Function at 0x10006d97
Capabilities:
Terminate process

Disassembly:
push 8
push 0x1000caf0
call fcn.10002f64
push 8
call fcn.10004483
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x1000ee48], esi
jne 0x10006dcb
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x1000ee44], esi
mov al, byte [ebp + 0x10]
mov byte [0x1000ee40], al
cmp dword [ebp + 0xc], edi
jne 0x10006e15
cmp dword [0x10010428], edi
je 0x10006e05
mov eax, dword [0x10010424]
sub eax, 4
mov dword [0x10010424], eax
cmp eax, dword [0x10010428]
jb 0x10006e05
mov eax, dword [eax]
cmp eax, edi
je 0x10006de6
call eax
jmp 0x10006de6
push 0x1000e028
mov eax, 0x1000e020
call fcn.10006d15
pop ecx
push 0x1000e030
mov eax, 0x1000e02c
call fcn.10006d15
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x10006e46
cmp dword [ebp + 0x10], edi
jne 0x10006e54
mov dword [0x1000ee48], esi
push dword [ebp + 8]
call fcn.10006cd3
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x10006e53
push 8
call fcn.100043ce
pop ecx
ret
call fcn.10002f9f
ret

Function at 0x100077bc
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x1000e040]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x1000e6a8]
je 0x100077f1
inc eax
cmp eax, 0x13
jb 0x100077e2
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x1000e6a8]
jne 0x10007917
mov eax, dword [0x1000ec18]
cmp eax, 1
je 0x100078ef
cmp eax, edx
jne 0x10007821
cmp dword [0x1000ec1c], 1
je 0x100078ef
cmp ecx, 0xfc
je 0x10007917
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10007857
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.10004050
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.10005190
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x1000788b
mov eax, edi
push eax
call fcn.10005190
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x1000b3d4
push edi
call fcn.100041a0
add esp, 0x10
push edi
call fcn.10005190
push dword [esi + 0x1000e6ac]
mov ebx, eax
call fcn.10005190
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.10007600
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.10004050
push edi
push ebx
call fcn.10004060
push 0x1000b3d0
push ebx
call fcn.10004060
push dword [esi + 0x1000e6ac]
push ebx
call fcn.10004060
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.1000796c
add esp, 0x2c
jmp 0x10007917
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x1000e6ac]
push dword [esi]
call fcn.10005190
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.10001cbd
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x1000796c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x1000ef60], ebx
push esi
push edi
jne 0x100079ec
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x10007a27
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x1000ef60], eax
je 0x10007a27
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x1000ef64], eax
call esi
cmp dword [0x1000ee08], 2
mov dword [0x1000ef68], eax
jne 0x100079ec
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x1000ef70], eax
je 0x100079ec
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x1000ef6c], eax
mov eax, dword [0x1000ef6c]
test eax, eax
je 0x10007a31
call eax
test eax, eax
je 0x10007a18
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x1000ef70]
test eax, eax
je 0x10007a18
test byte [ebp - 8], 1
jne 0x10007a31
cmp dword [0x1000ee14], 4
jb 0x10007a2b
or byte [ebp + 0x12], 0x20
jmp 0x10007a50
xor eax, eax
jmp 0x10007a60
or byte [ebp + 0x12], 4
jmp 0x10007a50
mov eax, dword [0x1000ef64]
test eax, eax
je 0x10007a50
call eax
mov ebx, eax
test ebx, ebx
je 0x10007a50
mov eax, dword [0x1000ef68]
test eax, eax
je 0x10007a50
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x1000ef60]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10007cde
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.10007600
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10007d79
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x1000ee08]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x10007d79
cmp eax, 1
je 0x10007d9a
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10007d79
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x10007d46
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x10007d75
xor eax, eax
inc eax
jmp 0x10007db9
cmp edi, eax
jae 0x10007d7d
xor eax, eax
jmp 0x10007db9
cmp eax, esi
jae 0x10007d84
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x1000ee08]
jmp 0x10007d9d
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10008cac
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x1000e040]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x10008cdd
xor eax, eax
jmp 0x10008e66
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x10010320]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x10008d19
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.10009c63
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x10008df4
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x10008e32
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x10008d7d
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x10008d6e
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x10008d4e
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10008dbd
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x10008dc6
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x10008d3f
jmp 0x10008dc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x10008e61
cmp dword [ebp - 0x6c], edi
je 0x10008e32
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x10008e27
call fcn.10006236
mov dword [eax], 9
call fcn.1000623f
mov dword [eax], esi
jmp 0x10008e5c
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10008e1c
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x10008dc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x10008dc8
push dword [ebp - 0x6c]
call fcn.10006248
pop ecx
jmp 0x10008e5c
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x10008e4a
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x10008e4a
xor eax, eax
jmp 0x10008e64
call fcn.10006236
mov dword [eax], 0x1c
call fcn.1000623f
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x10008e64
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.10001cbd
add ebp, 0x3a0
leave
ret
Function at 0x10009341
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x1000d028
call fcn.10002f64
xor edi, edi
xor ebx, ebx
inc ebx
cmp dword [0x1000f094], edi
jne 0x10009385
push edi
push edi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10009370
mov dword [0x1000f094], ebx
jmp 0x10009385
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x10009385
mov dword [0x1000f094], 2
mov eax, dword [0x1000f094]
cmp eax, ebx
jne 0x100093a5
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
jmp 0x10009468
cmp eax, 2
je 0x100093ae
cmp eax, edi
jne 0x100093d6
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
cmp dword [ebp + 0x18], edi
jne 0x100093c1
mov eax, dword [0x1000edcc]
mov dword [ebp + 0x18], eax
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov dword [ebp - 0x20], eax
cmp eax, edi
jne 0x100093dd
xor eax, eax
jmp 0x10009468
mov dword [ebp - 4], edi
add eax, 3
and eax, 0xfffffffc
call fcn.10007600
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [ebp - 0x28], esi
or dword [ebp - 4], 0xffffffff
jmp 0x10009410
cmp esi, edi
jne 0x10009426
push dword [ebp - 0x20]
call fcn.100028dd
pop ecx
mov esi, eax
cmp esi, edi
je 0x100093d6
mov dword [ebp - 0x24], ebx
push dword [ebp - 0x20]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x10009459
cmp dword [ebp + 0x14], edi
jne 0x10009443
push edi
push edi
jmp 0x10009449
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push esi
push ebx
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x24], edi
je 0x10009465
push esi
call fcn.100027c5
pop ecx
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0x34]
call fcn.10002f9f
ret