joyce8/EMBER2024-capa huggingface dataset:
Function at 0x12180
Capabilities:
Create device object
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push 0x133a8
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea ecx, [ebp - 4]
push ecx
push 1
push 0
push 0x22
lea edx, [ebp - 0x14]
push edx
push 0x14
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ntoskrnl.exe_IoCreateDevice]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jge 0x1220f
cmp dword [ebp - 0x18], 0xc000009a
jne 0x121ce
push 0x133c4
call sub.ntoskrnl.exe_DbgPrint
add esp, 4
cmp dword [ebp - 0x18], 0x40000000
jne 0x121e4
push 0x133d0
call sub.ntoskrnl.exe_DbgPrint
add esp, 4
cmp dword [ebp - 0x18], 0xc0000035
jne 0x121fa
push 0x133e0
call sub.ntoskrnl.exe_DbgPrint
add esp, 4
push 0x133f0
call sub.ntoskrnl.exe_DbgPrint
add esp, 4
mov eax, dword [ebp - 0x18]
jmp 0x12291
push 0x13400
call sub.ntoskrnl.exe_DbgPrint
add esp, 4
push str.__BaoHuSys
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x1c]
or eax, 4
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x1c], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x28]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 4]
mov dword [ecx], edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x10]
mov dword [eax + 8], edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0xc], ecx
mov edx, dword [ebp - 8]
mov dword [eax + 0x10], edx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.ntoskrnl.exe_IoCreateSymbolicLink]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jge 0x1228f
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ntoskrnl.exe_IoDeleteDevice]
mov eax, dword [ebp - 0x18]
jmp 0x12291
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x1000567f
Capabilities:
Validate payment card number using luhn algorithm

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebx]
mov cl, byte [edi]
lea eax, [ecx - 0x30]
cmp al, 9
ja 0x100056d9
xor eax, eax
lea esi, [eax - 0x30]
movsx ecx, cl
add esi, ecx
mov eax, edx
push 0xa
cdq
inc edi
pop ecx
idiv ecx
mov dword [ebx], edi
mov edx, eax
imul eax, esi, 0xa
cmp eax, dword [ebp + 0x14]
jg 0x100056c5
test edx, edx
je 0x100056c5
mov cl, byte [edi]
cmp cl, 0x30
jl 0x100056c5
cmp cl, 0x39
jle 0x10005698
cmp esi, dword [ebp + 0x10]
jl 0x100056d9
cmp esi, dword [ebp + 0x14]
jg 0x100056d9
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
xor eax, eax
inc eax
jmp 0x100056db
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x100067b8
Capabilities:
Read file on windows

Disassembly:
push 0x418
mov eax, 0x1000bfe1
call fcn.1000a4a9
mov edi, dword [ebp + 0xc]
xor eax, eax
mov esi, dword [ebp + 8]
mov dword [ebp - 0x424], esi
mov dword [ebp - 0x414], eax
mov dword [ebp - 4], eax
cmp dword [edi + 0x18], eax
je 0x10006886
push 2
push eax
push dword [edi + 0x18]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push dword [edi + 0x18]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push dword [edi + 0x18]
mov ebx, eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
add esp, 0x14
mov dword [esi + 0x14], 0xf
xor eax, eax
mov ecx, esi
mov dword [esi + 0x10], eax
mov byte [esi], al
push eax
push ebx
call fcn.100066d3
and dword [ebp - 4], 0
xor ecx, ecx
inc ecx
mov eax, esi
cmp dword [esi + 0x14], 0x10
mov dword [ebp - 0x414], ecx
jb 0x10006838
mov eax, dword [esi]
push dword [edi + 0x18]
push ebx
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
test eax, eax
jne 0x1000687e
push dword [edi + 0x18]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
pop ecx
test eax, eax
je 0x1000687e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push 0x400
lea ecx, [ebp - 0x410]
push ecx
push dword [eax]
call sym.matador_utils.dll_char____cdecl_matador::os::strerror_int__char___unsigned_int_
add esp, 0xc
lea eax, [ebp - 0x410]
push eax
jmp 0x1000688b
mov eax, esi
call fcn.1000a464
ret
push str.file_is_not_open
lea ecx, [ebp - 0x420]
call fcn.100026b3
push 0x1000eed4
lea eax, [ebp - 0x420]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x100086c4
Capabilities:
Encode data using xor
Hash data using murmur3

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x100180c4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0
jle 0x10008857
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ecx + 0x88]
push esi
push edi
mov dword [ebp - 0x12c], eax
add ebx, 2
xor edx, edx
movzx ecx, byte [ebx - 2]
movzx eax, byte [ebx - 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 1]
shl ecx, 8
add ebx, 4
or ecx, eax
mov dword [ebp + edx*4 - 0x124], ecx
inc edx
cmp edx, 0x10
jl 0x100086f8
push 0x30
mov dword [ebp - 0x130], ebx
lea edi, [ebp - 0xec]
pop ebx
mov ecx, dword [edi - 0x34]
mov esi, ecx
mov edx, dword [edi]
mov eax, ecx
rol esi, 0xe
lea edi, [edi + 4]
ror eax, 7
xor esi, eax
shr ecx, 3
xor esi, ecx
mov eax, edx
mov ecx, edx
rol eax, 0xd
rol ecx, 0xf
xor ecx, eax
shr edx, 0xa
xor ecx, edx
add esi, ecx
add esi, dword [edi - 0x3c]
add esi, dword [edi - 0x18]
mov dword [edi + 4], esi
sub ebx, 1
jne 0x10008735
mov esi, dword [ebp - 0x12c]
lea edi, [ebp - 0x24]
mov ebx, dword [ebp - 0x130]
xor edx, edx
push 8
pop ecx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x128], edx
mov esi, edi
mov eax, edi
rol eax, 7
mov ecx, edi
ror esi, 0xb
not ecx
and ecx, dword [ebp - 0xc]
xor esi, eax
mov eax, edi
ror eax, 6
xor esi, eax
mov eax, dword [ebp - 0x10]
and eax, edi
xor ecx, eax
add esi, ecx
mov ecx, dword [ebp - 0x24]
add esi, dword [edx + sym.matador_utils.dll_unsigned_int_const__const_const_matador::ext::SHA256::sha256_k]
mov eax, ecx
add esi, dword [ebp + edx - 0x124]
mov edx, ecx
add esi, dword [ebp - 8]
rol eax, 0xa
ror edx, 0xd
xor edx, eax
mov eax, ecx
ror eax, 2
xor edx, eax
mov eax, dword [ebp - 0x20]
mov ecx, eax
and eax, dword [ebp - 0x1c]
xor ecx, dword [ebp - 0x1c]
and ecx, dword [ebp - 0x24]
xor ecx, eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
add edx, ecx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
add edi, esi
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
lea eax, [edx + esi]
mov edx, dword [ebp - 0x128]
add edx, 4
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x128], edx
cmp edx, 0x100
jl 0x1000878e
mov edx, dword [ebp - 0x12c]
xor ecx, ecx
mov dword [ebp - 0x14], edi
mov eax, dword [ebp + ecx*4 - 0x24]
add dword [edx], eax
inc ecx
lea edx, [edx + 4]
cmp ecx, 8
jl 0x1000883b
sub dword [ebp + 0xc], 1
jne 0x100086f6
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000a43e
leave
ret 8
Function at 0x100089c6
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push 0x90c
mov eax, 0x1000c2ad
call fcn.1000a4a9
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x918], eax
mov dword [ebp - 0x910], eax
mov eax, dword [ebp + 0x14]
push 0x40
mov dword [ebp - 0x914], eax
lea eax, [ebp - 0x70]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp esi, 0x40
jbe 0x10008a45
lea eax, [ebp - 0x908]
push edi
push eax
call sym.matador_utils.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_matador::ext::sha256_char_const__
cmp dword [ebp - 0x8f4], 0x10
lea eax, [ebp - 0x908]
push 0x40
cmovae eax, dword [ebp - 0x908]
push eax
lea eax, [ebp - 0x70]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0x14
lea ecx, [ebp - 0x908]
call fcn.10001d10
jmp 0x10008a77
lea eax, [ebp - 0x70]
jae 0x10008a6c
push edi
push 0x40
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
push 0x40
pop eax
sub eax, esi
push eax
lea eax, [ebp - 0x70]
add eax, esi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
jmp 0x10008a77
push esi
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push 0x40
lea eax, [ebp - 0xf0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x40
lea eax, [ebp - 0xb0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x40
lea eax, [ebp - 0xb0]
push 0x36
push eax
call sub.VCRUNTIME140.dll_memset
push 0x40
lea eax, [ebp - 0xf0]
push 0x5c
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x30
xor eax, eax
movups xmm2, xmmword [ebp + eax - 0x70]
movups xmm0, xmmword [ebp + eax - 0xf0]
movaps xmm1, xmm2
pxor xmm1, xmm0
movups xmm0, xmmword [ebp + eax - 0xb0]
movups xmmword [ebp + eax - 0xf0], xmm1
pxor xmm2, xmm0
movups xmmword [ebp + eax - 0xb0], xmm2
add eax, 0x10
cmp eax, 0x40
jb 0x10008abc
mov esi, dword [ebp + 0x18]
lea ecx, [ebp - 0x909]
push ecx
lea ecx, [ebp - 0x8fc]
lea eax, [esi + 0x40]
mov dword [ebp - 0x910], eax
add eax, 0x40
push eax
call fcn.1000895a
and dword [ebp - 4], 0
lea eax, [ebp - 0xb0]
push 0x40
push eax
push dword [ebp - 0x8fc]
call sub.VCRUNTIME140.dll_memcpy
push esi
mov esi, dword [ebp - 0x8fc]
push dword [ebp - 0x914]
lea eax, [esi + 0x40]
push eax
call sub.VCRUNTIME140.dll_memcpy
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x30]
rep stosd dword es:[edi], eax
push 0x20
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x910]
push esi
call sym.matador_utils.dll_void___cdecl_matador::ext::sha256_char_const___unsigned_int__unsigned_char___unsigned_int_
push 0x40
lea eax, [ebp - 0xf0]
push eax
lea eax, [ebp - 0x8f0]
push eax
call sub.VCRUNTIME140.dll_memcpy
push 0x20
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x8b0]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [ebp - 0x918]
lea eax, [ebp - 0x8f0]
add esp, 0x40
push 0x60
push eax
push esi
call sym.matador_utils.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_matador::ext::sha256_char_const___unsigned_int_
add esp, 0xc
lea ecx, [ebp - 0x8fc]
call fcn.1000221c
mov eax, esi
call fcn.1000a464
ret
Function at 0x401120
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401139
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40114d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40116e
cmp esi, eax
jae 0x401147
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x401160
cmp esi, eax
jae 0x401147
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x402b00
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get file version info

Disassembly:
sub esp, 8
push ebx
mov ebx, ecx
push ebp
xor eax, eax
push esi
push edi
xor ebp, ebp
mov dword [ebx], ebp
lea esi, [ebx + 0x14]
mov ecx, 0xc2
mov edi, esi
rep stosd dword es:[edi], eax
xor ecx, ecx
lea eax, [ebx + 4]
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov eax, dword [esp + 0x1c]
cmp eax, ebp
push 0x104
je 0x402b44
push eax
push esi
call fcn.00405144
add esp, 0xc
jmp 0x402b76
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp word [esi], bp
je 0x402b68
push esi
call fcn.00404b0a
add esp, 4
cmp word [ebx + eax*2 + 0x12], 0x5c
je 0x402b68
push str.drivers_tcpip.sys
jmp 0x402b6d
push 0x41a97c
push esi
call fcn.004050fe
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402c3b
lea edx, [esp + 0x14]
push edx
push esi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
call sub.VERSION.dll_GetFileVersionInfoSizeW
cmp eax, ebp
mov dword [esp + 0x1c], eax
je 0x402c3b
lea edi, [eax + 0xa]
push edi
call fcn.004115e7
mov ebp, eax
mov ecx, edi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
push ebp
add eax, 2
push eax
push 0
push esi
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x402c32
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x20]
push edx
push 0x41a978
push ebp
mov dword [esp + 0x2c], 0
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x402c32
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x402c32
cmp dword [esp + 0x10], 0x34
jb 0x402c32
movzx ecx, word [eax + 0xa]
mov dword [ebx + 4], ecx
mov edx, dword [eax + 8]
and edx, 0xffff
mov dword [ebx + 8], edx
movzx ecx, word [eax + 0xe]
mov dword [ebx + 0xc], ecx
mov edx, dword [eax + 0xc]
and edx, 0xffff
mov dword [ebx + 0x10], edx
push ebp
call fcn.004115ec
add esp, 4
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 8
ret 4
Function at 0x40442b
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41c750
call fcn.00405ecc
mov edi, 0x94
mov eax, edi
call fcn.004058c0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x424aa8], ecx
mov eax, dword [esi + 4]
mov dword [0x424ab4], eax
mov edx, dword [esi + 8]
mov dword [0x424ab8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x424aac], esi
cmp ecx, 2
je 0x40448b
or esi, 0x8000
mov dword [0x424aac], esi
shl eax, 8
add eax, edx
mov dword [0x424ab0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4044c6
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4044c6
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4044de
cmp eax, 0x20b
je 0x4044cb
mov dword [ebp - 0x1c], esi
jmp 0x4044f2
cmp dword [ecx + 0x84], 0xe
jbe 0x4044c6
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4044ec
cmp dword [ecx + 0x74], 0xe
jbe 0x4044c6
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.00407096
pop ecx
test eax, eax
jne 0x404506
push 0x1c
call fcn.00404407
pop ecx
call fcn.00406f8d
test eax, eax
jne 0x404517
push 0x10
call fcn.00404407
pop ecx
call fcn.00406d27
mov dword [ebp - 4], esi
call fcn.00406b29
test eax, eax
jge 0x404530
push 0x1b
call fcn.004043e2
pop ecx
call fcn.00406a8a
mov dword [0x426490], eax
call fcn.00406920
mov dword [0x424a9c], eax
call fcn.0040688a
test eax, eax
jge 0x404555
push 8
call fcn.004043e2
pop ecx
call fcn.00406657
test eax, eax
jge 0x404566
push 9
call fcn.004043e2
pop ecx
push 1
call fcn.004053ad
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40457c
push eax
call fcn.004043e2
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
call fcn.00406611
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40459d
movzx eax, word [ebp - 0x40]
jmp 0x4045a0
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.0040f792
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4045be
push edi
call fcn.004054da
call fcn.004054fc
jmp 0x4045f0
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00405f07
ret
Function at 0x405417
Capabilities:
Terminate process

Disassembly:
push 8
push 0x41c7a8
call fcn.00405ecc
push 8
call fcn.00407d4f
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x424ae8], esi
jne 0x40544b
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x424ae4], esi
mov al, byte [ebp + 0x10]
mov byte [0x424ae0], al
cmp dword [ebp + 0xc], edi
jne 0x405495
cmp dword [0x426488], edi
je 0x405485
mov eax, dword [0x426484]
sub eax, 4
mov dword [0x426484], eax
cmp eax, dword [0x426488]
jb 0x405485
mov eax, dword [eax]
cmp eax, edi
je 0x405466
call eax
jmp 0x405466
push 0x421080
mov eax, 0x421078
call fcn.00405395
pop ecx
push 0x42108c
mov eax, 0x421084
call fcn.00405395
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x4054c6
cmp dword [ebp + 0x10], edi
jne 0x4054d4
mov dword [0x424ae8], esi
push dword [ebp + 8]
call fcn.00405353
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x4054d3
push 8
call fcn.00407c9a
pop ecx
ret
call fcn.00405f07
ret

Function at 0x4060da
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.004058c0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x406175
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 [0x424aa8]
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 0x406175
cmp eax, 1
je 0x406196
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 0x406175
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x406142
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x406171
xor eax, eax
inc eax
jmp 0x4061b5
cmp edi, eax
jae 0x406179
xor eax, eax
jmp 0x4061b5
cmp eax, esi
jae 0x406180
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 [0x424aa8]
jmp 0x406199
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 0x4062fd
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x421948]
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 + 0x421b18]
je 0x406332
inc eax
cmp eax, 0x13
jb 0x406323
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x421b18]
jne 0x406458
mov eax, dword [0x424aa0]
cmp eax, 1
je 0x406430
cmp eax, edx
jne 0x406362
cmp dword [0x421944], 1
je 0x406430
cmp ecx, 0xfc
je 0x406458
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 0x406398
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040ac80
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00405d20
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4063cc
mov eax, edi
push eax
call fcn.00405d20
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x41cc28
push edi
call fcn.0040ad80
add esp, 0x10
push edi
call fcn.00405d20
push dword [esi + 0x421b1c]
mov ebx, eax
call fcn.00405d20
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004058c0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040ac80
push edi
push ebx
call fcn.0040ac90
push 0x41cc08
push ebx
call fcn.0040ac90
push dword [esi + 0x421b1c]
push ebx
call fcn.0040ac90
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040ab82
add esp, 0x2c
jmp 0x406458
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x421b1c]
push dword [esi]
call fcn.00405d20
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.00404630
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x406920
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x424d0c]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x406969
call ebp
mov esi, eax
cmp esi, ebx
je 0x40694f
mov dword [0x424d0c], 1
jmp 0x40696e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x406964
push 2
pop eax
mov dword [0x424d0c], eax
jmp 0x406969
mov eax, dword [0x424d0c]
cmp eax, 1
jne 0x4069c6
cmp esi, ebx
jne 0x406981
call ebp
mov esi, eax
cmp esi, ebx
jne 0x406981
xor eax, eax
jmp 0x406a6d
cmp word [esi], bx
mov eax, esi
je 0x406996
inc eax
inc eax
cmp word [eax], bx
jne 0x406988
inc eax
inc eax
cmp word [eax], bx
jne 0x406988
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.00405b53
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x4069b9
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x406a6d
push ebp
push esi
push edi
call fcn.00405580
add esp, 0xc
jmp 0x4069ab
cmp eax, 2
je 0x4069cf
cmp eax, ebx
jne 0x40697a
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x40697a
cmp byte [ebp], bl
mov esi, ebp
je 0x406a05
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x40697a
push esi
add edi, eax
call fcn.00405d20
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x4069e2
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.00405b53
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x406a7e
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x406a5f
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x10]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x406a74
push edi
call fcn.00405d20
push esi
lea edi, [edi + eax + 1]
call fcn.00404b0a
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x406a25
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x10]
call fcn.00404e8b
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x40697a
Function at 0x406a8a
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x424d10]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x406aca
call esi
test eax, eax
je 0x406aaf
mov dword [0x424d10], 1
jmp 0x406acf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x406ac6
mov dword [0x424d10], 2
jmp 0x406ad8
xor eax, eax
jmp 0x406b26
cmp eax, 1
jne 0x406ad3
call esi
jmp 0x406b26
cmp eax, 2
jne 0x406ac6
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebp
push ebp
push 0xffffffffffffffff
mov ebx, eax
push ebx
push 1
push ebp
call edi
mov esi, eax
cmp esi, ebp
je 0x406b1e
lea eax, [esi + esi]
push eax
call fcn.00405b53
mov ebp, eax
test ebp, ebp
pop ecx
je 0x406b1e
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x406b22
push ebp
call fcn.00404e8b
pop ecx
xor eax, eax
jmp 0x406b24
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret