joyce8/EMBER2024-capa huggingface dataset:
Function at 0x502b90
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x6255e2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esp + 0x10], esi
mov dword [esi + 4], ebx
mov dword [esi], vtable.wxFileSystemHandler.0
lea edi, [esi + 0xc]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], edi
mov dword [edi], vtable.wxObject.0
mov dword [edi + 4], ebx
mov eax, dword [0x6e0ea0]
mov dword [edi + 8], eax
mov ecx, dword [0x6e0ea0]
mov dword [edi + 0xc], ecx
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x14]
push edx
push eax
push 0x64
lea ecx, [edi + 0x14]
mov byte [esp + 0x2c], 3
call fcn.00503700
mov dword [edi], vtable.wxFileSystem.0
mov dword [edi + 0x10], ebx
mov ecx, dword [0x6e0ea0]
lea edi, [esi + 0x38]
mov dword [edi], ecx
mov edx, dword [0x6e0ea0]
lea ecx, [esi + 0x3c]
mov dword [ecx], edx
mov eax, dword [0x6e0ea0]
lea ebp, [esi + 0x40]
mov dword [ebp], eax
mov dword [esi], vtable.wxArchiveFSHandler.0
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
mov eax, dword [0x6e0ea0]
push eax
mov byte [esp + 0x24], 7
call fcn.004ea6a0
push eax
mov ecx, edi
call fcn.004ea610
push edi
mov ecx, ebp
call fcn.004ea610
mov ecx, dword [esp + 0x18]
mov al, 1
mov byte [esi + 0x45], al
mov byte [esi + 0x44], al
mov dword [esi + 0x48], ebx
mov dword [esi + 8], ebx
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x508a10
Capabilities:
Get geographical location

Disassembly:
push 0xffffffffffffffff
push 0x625bcb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
push ebx
xor ebx, ebx
mov dword [esp + 4], ebx
mov eax, dword [0x6e0ea0]
push esi
push edi
mov dword [esp + 0xc], eax
push ebx
push ebx
mov dword [esp + 0xc4], ebx
mov edi, 0x6e4808
call dword [sym.imp.MSVCRT.dll_setlocale]
add esp, 8
mov esi, eax
mov ecx, 2
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x508c05
call dword [sym.imp.KERNEL32.dll_GetThreadLocale]
lea ecx, [esp + 0x10]
push 0x51
push ecx
push 0x1f
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x508c05
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_wcslen]
xor esi, esi
xor edi, edi
lea ebx, [esp + 0x14]
mov ax, word [ebx]
cmp ax, si
jne 0x508aa0
inc edi
add ebx, 2
jmp 0x508a92
mov edx, eax
and edx, 0xffff
lea ecx, [edx - 0x4d]
cmp ecx, 0x2c
ja case.0x508ab8.78
xor edx, edx
mov dl, byte [ecx + 0x508c74]
jmp dword [edx*4 + 0x508c6c]
mov esi, eax
mov edi, 1
jmp 0x508bf6
test edi, edi
je 0x508bcc
and esi, 0xffff
mov eax, esi
cmp eax, 0x4d
je 0x508b7b
cmp eax, 0x64
je 0x508b32
cmp eax, 0x79
jne case.default.0x508b83
test edi, edi
jbe case.default.0x508b83
cmp edi, 2
jbe 0x508b1d
cmp edi, 4
jne case.default.0x508b83
push 0x6e4800
call ebp
add esp, 4
push eax
push 0x6e4800
jmp 0x508bbe
push 0x6e47f8
call ebp
add esp, 4
push eax
push 0x6e47f8
jmp 0x508bbe
lea eax, [edi - 1]
cmp eax, 3
ja case.default.0x508b83
jmp dword [eax*4 + 0x508ca4]
push 0x6c2acc
call ebp
add esp, 4
push eax
push 0x6c2acc
jmp 0x508bbe
push 0x6e45a4
call ebp
add esp, 4
push eax
push 0x6e45a4
jmp 0x508bbe
push 0x6e459c
call ebp
add esp, 4
push eax
push 0x6e459c
jmp 0x508bbe
lea eax, [edi - 1]
cmp eax, 3
ja case.default.0x508b83
jmp dword [eax*4 + 0x508cb4]
push 0x6e47f0
call ebp
add esp, 4
push eax
push 0x6e47f0
jmp 0x508bbe
push 0x6e4594
call ebp
add esp, 4
push eax
push 0x6e4594
jmp 0x508bbe
push 0x6e458c
call ebp
add esp, 4
push eax
push 0x6e458c
lea ecx, [esp + 0x18]
push eax
call fcn.004ea760
xor esi, esi
xor edi, edi
mov ax, word [ebx]
test ax, ax
je 0x508c04
cmp ax, 0x25
jne 0x508be7
push 0x25
push 1
lea ecx, [esp + 0x18]
call fcn.004e9db0
mov ax, word [ebx]
lea ecx, [esp + 0x10]
push eax
push 1
call fcn.004e9db0
cmp word [ebx], 0
je 0x508c04
add ebx, 2
jmp 0x508a92
pop ebp
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 0xc4]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x508c21
mov ecx, dword [0x6e0ea0]
mov dword [esi], ecx
jmp 0x508c33
mov dword [esi], eax
mov ecx, dword [eax - 0xc]
cmp ecx, 0xffffffff
je 0x508c33
inc ecx
mov dword [eax - 0xc], ecx
mov eax, dword [esp + 0xc]
mov ecx, dword [eax - 0xc]
add eax, 0xfffffff4
cmp ecx, 0xffffffff
je 0x508c4f
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x508c4f
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [esp + 0xb4]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0xb4
ret
Function at 0x50b060
Capabilities:
Delete registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x625e58
push eax
mov dword fs:[0], esp
push ebx
push esi
push edi
push 1
mov esi, ecx
call fcn.0050ad80
test al, al
jne 0x50b099
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0xc
ret 4
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x50b0ab
cmp word [ebx], 0
je 0x50b0ab
xor eax, eax
jmp 0x50b0b0
mov eax, 1
neg al
sbb eax, eax
not eax
and eax, ebx
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
mov dword [esi + 0x10], eax
je 0x50b14d
cmp eax, 2
je 0x50b14d
lea ecx, [esp + 0x1c]
push 1
push ecx
mov ecx, esi
call fcn.0050ac70
mov edi, dword [eax]
mov dword [esp + 0x14], 0
call fcn.004f0590
test eax, eax
je 0x50b103
mov edx, dword [eax]
push 0
push str.Cant_delete_value__s_from_key__s
mov ecx, eax
call dword [edx + 8]
jmp 0x50b108
mov eax, str.Cant_delete_value__s_from_key__s
push edi
push ebx
push eax
mov eax, dword [esi + 0x10]
push eax
call fcn.004f4710
mov ecx, dword [esp + 0x2c]
add esp, 0x10
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, 0xffffffff
je 0x50b137
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50b137
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor al, al
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0xc
ret 4
mov ecx, dword [esp + 0xc]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0xc
ret 4

Function at 0x50b170
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x625e78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
mov bl, byte [0x6e314c]
push esi
mov esi, ecx
mov byte [0x6e314c], 0
mov byte [esp + 8], bl
push 0
mov dword [esp + 0x18], 0
call fcn.0050ad80
test al, al
je 0x50b1e4
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x50b1c0
cmp word [ecx], 0
je 0x50b1c0
xor eax, eax
jmp 0x50b1c5
mov eax, 1
neg al
sbb eax, eax
push 0
not eax
push 0
push 0
and eax, ecx
push 0
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
sete al
mov ecx, dword [esp + 0xc]
mov byte [0x6e314c], bl
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 4
Function at 0x50b200
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x625e98
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
push edi
push 0
mov esi, ecx
call fcn.0050ad80
test al, al
je 0x50b377
push ebp
mov ebp, dword [esp + 0x24]
test ebp, ebp
je 0x50b23f
cmp word [ebp], 0
je 0x50b23f
xor eax, eax
jmp 0x50b244
mov eax, 1
neg al
lea ecx, [esp + 0x24]
lea edx, [esp + 0x10]
sbb eax, eax
push ecx
not eax
push 0
push edx
and eax, ebp
push 0
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
mov dword [esi + 0x10], eax
jne 0x50b30b
mov eax, dword [esp + 0x24]
test eax, eax
je 0x50b2fe
push ebx
mov ebx, dword [esp + 0x2c]
mov edi, dword [ebx]
cmp eax, dword [edi + 4]
jbe 0x50b2b8
mov ebx, dword [edi]
add eax, 0x400
push eax
push ebx
mov dword [esp + 0x18], eax
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
mov dword [edi], eax
test eax, eax
jne 0x50b2ad
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x2c]
mov dword [edi + 4], ecx
mov edx, dword [ebx]
test ebp, ebp
mov ecx, dword [edx]
je 0x50b2cb
cmp word [ebp], 0
je 0x50b2cb
xor eax, eax
jmp 0x50b2d0
mov eax, 1
lea edx, [esp + 0x28]
neg al
push edx
mov edx, dword [esi]
sbb eax, eax
push ecx
lea ecx, [esp + 0x1c]
not eax
push ecx
and eax, ebp
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [esp + 0x28]
mov dword [esi + 0x10], eax
mov eax, dword [ebx]
pop ebx
mov dword [eax + 8], ecx
jmp 0x50b30b
mov edx, dword [esp + 0x28]
mov eax, dword [edx]
mov dword [eax + 8], 0
mov eax, dword [esi + 0x10]
pop ebp
test eax, eax
je 0x50b38c
lea ecx, [esp + 0x24]
push 1
push ecx
mov ecx, esi
call fcn.0050ac70
mov edi, dword [eax]
mov dword [esp + 0x18], 0
call fcn.004f0590
test eax, eax
je 0x50b344
mov edx, dword [eax]
push 0
push str.Cant_read_value_of_key__s
mov ecx, eax
call dword [edx + 8]
jmp 0x50b349
mov eax, str.Cant_read_value_of_key__s
push edi
push eax
mov eax, dword [esi + 0x10]
push eax
call fcn.004f4710
mov ecx, dword [esp + 0x30]
add esp, 0xc
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, 0xffffffff
je 0x50b377
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50b377
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret 8
mov ecx, dword [esp + 0x10]
pop edi
mov al, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret 8
Function at 0x50b3b0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x625eb8
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
push edi
push 0
mov ebx, ecx
call fcn.0050ad80
mov edi, dword [esp + 0x28]
test al, al
je 0x50b528
test edi, edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
je 0x50b3ff
cmp word [edi], 0
je 0x50b3ff
xor eax, eax
jmp 0x50b404
mov eax, 1
neg al
lea ecx, [esp + 0x10]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
sbb eax, eax
push ecx
lea edx, [esp + 0x18]
push 0
not eax
push edx
and eax, edi
push 0
push eax
mov eax, dword [ebx]
push eax
call ebp
test eax, eax
mov dword [ebx + 0x10], eax
jne 0x50b528
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x50b448
mov ecx, dword [esp + 0x2c]
push eax
call fcn.004ebfc0
jmp 0x50b51d
mov esi, dword [esp + 0x2c]
push eax
mov ecx, esi
call fcn.004ead20
test edi, edi
je 0x50b462
cmp word [edi], 0
je 0x50b462
xor ecx, ecx
jmp 0x50b467
mov ecx, 1
lea edx, [esp + 0x10]
neg cl
push edx
push eax
sbb ecx, ecx
lea eax, [esp + 0x1c]
not ecx
push eax
and ecx, edi
push 0
push ecx
mov ecx, dword [ebx]
push ecx
call ebp
mov ecx, esi
mov dword [ebx + 0x10], eax
call fcn.004ead50
cmp dword [esp + 0x14], 2
jne 0x50b51d
mov al, byte [esp + 0x30]
test al, al
jne 0x50b51d
mov eax, dword [esi]
mov ebp, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0
push 0
push eax
call ebp
mov edi, eax
test edi, edi
setne al
test al, al
je 0x50b519
mov edx, dword [0x6e0ea0]
mov dword [esp + 0x30], edx
push edi
lea ecx, [esp + 0x34]
mov dword [esp + 0x24], 0
call fcn.004ead20
mov ecx, dword [esi]
push edi
push eax
push ecx
call ebp
lea ecx, [esp + 0x30]
call fcn.004ead50
lea eax, [esp + 0x30]
mov ecx, esi
push eax
call fcn.004ea610
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x20], 0xffffffff
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, 0xffffffff
je 0x50b519
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x50b519
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov edi, dword [esp + 0x28]
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x50b528
mov al, 1
jmp 0x50b55f
call fcn.004f0590
test eax, eax
je 0x50b543
mov edx, dword [eax]
push 0
push str.Cant_read_value_of__s
mov ecx, eax
call dword [edx + 8]
mov esi, eax
jmp 0x50b548
mov esi, str.Cant_read_value_of__s
push edi
push ebx
call fcn.0050b700
push eax
mov eax, dword [ebx + 0x10]
push esi
push eax
call fcn.004f4710
add esp, 0x14
xor al, al
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 0xc
Function at 0x50b580
Capabilities:
Set registry value

Disassembly:
push esi
push edi
push 1
mov esi, ecx
call fcn.0050ad80
mov edi, dword [esp + 0xc]
test al, al
je 0x50b5d9
mov eax, dword [esp + 0x10]
test edi, edi
mov ecx, dword [eax]
mov edx, dword [ecx - 8]
je 0x50b5aa
cmp word [edi], 0
je 0x50b5aa
xor eax, eax
jmp 0x50b5af
mov eax, 1
neg al
lea edx, [edx + edx + 2]
sbb eax, eax
push edx
not eax
push ecx
push 1
and eax, edi
push 0
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
mov dword [esi + 0x10], eax
jne 0x50b5d9
pop edi
mov al, 1
pop esi
ret 8
push ebx
call fcn.004f0590
test eax, eax
je 0x50b5f5
mov edx, dword [eax]
push 0
push str.Cant_set_value_of__s
mov ecx, eax
call dword [edx + 8]
mov ebx, eax
jmp 0x50b5fa
mov ebx, str.Cant_set_value_of__s
push edi
push esi
call fcn.0050b700
push eax
mov eax, dword [esi + 0x10]
push ebx
push eax
call fcn.004f4710
add esp, 0x14
xor al, al
pop ebx
pop edi
pop esi
ret 8

Function at 0x50b8b0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x625f38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x10], esp
push esi
lea eax, [ebp - 0x1c]
push fcn.0050b860
push eax
call fcn.0050c6a0
add esp, 0xc
mov ecx, dword [0x6e4d2c]
push esi
mov dword [ebp - 4], 0
push ecx
mov dword [ebp + 8], 0xffffffff
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x50b958
call fcn.004f0590
test eax, eax
je 0x50b923
mov edx, dword [eax]
push 0
push str.Can_not_start_thread:_error_writing_TLS.
mov ecx, eax
call dword [edx + 8]
jmp 0x50b928
mov eax, str.Can_not_start_thread:_error_writing_TLS.
push eax
call fcn.004f45b0
add esp, 4
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], 2
push eax
call fcn.0050c6d0
add esp, 4
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
mov esi, eax
jmp 0x50b977
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 4
push ecx
call fcn.0050c6d0
mov ecx, dword [ebp - 0xc]
add esp, 4
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x50bb30
Capabilities:
Create thread

Disassembly:
push esi
mov edx, dword [esp + 0xc]
mov esi, ecx
mov ecx, dword [esp + 8]
lea eax, [esi + 0x10]
push eax
push 4
push ecx
push 0x50b9a0
push edx
push 0
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
mov dword [esi + 4], eax
test eax, eax
jne 0x50bb94
call fcn.004f0590
test eax, eax
je 0x50bb80
mov edx, dword [eax]
push 0
push str.Cant_create_thread
mov ecx, eax
call dword [edx + 8]
push eax
call fcn.004f45b0
add esp, 4
xor al, al
pop esi
ret 8
mov eax, str.Cant_create_thread
push eax
call fcn.004f45b0
add esp, 4
xor al, al
pop esi
ret 8
mov eax, dword [esi + 0xc]
cmp eax, 0x32
je 0x50bba4
push eax
mov ecx, esi
call fcn.0050bab0
mov al, 1
pop esi
ret 8
Function at 0x50bbb0
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
push 0xffffffffffffffff
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
test eax, eax
jne 0x50bbff
call fcn.004f0590
test eax, eax
je 0x50bbea
mov edx, dword [eax]
push 0
push str.Couldnt_terminate_thread
mov ecx, eax
call dword [edx + 8]
push eax
call fcn.004f45b0
add esp, 4
mov eax, 5
pop esi
ret
mov eax, str.Couldnt_terminate_thread
push eax
call fcn.004f45b0
add esp, 4
mov eax, 5
pop esi
ret
mov eax, dword [esi + 4]
test eax, eax
je 0x50bc14
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0
xor eax, eax
pop esi
ret

Function at 0x50bee0
Capabilities:
Resume thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x50bf30
call fcn.004f0590
test eax, eax
je 0x50bf1a
mov edx, dword [eax]
push 0
push str.Can_not_resume_thread__x
mov ecx, eax
call dword [edx + 8]
mov ecx, dword [esi + 4]
push ecx
push eax
call fcn.004f45b0
add esp, 8
xor al, al
pop esi
ret
mov ecx, dword [esi + 4]
mov eax, str.Can_not_resume_thread__x
push ecx
push eax
call fcn.004f45b0
add esp, 8
xor al, al
pop esi
ret
mov ecx, dword [esi + 8]
mov eax, 1
cmp ecx, 4
je 0x50bf40
mov dword [esi + 8], eax
pop esi
ret

Function at 0x50c860
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x18]
cmp eax, 0xffffffff
jne 0x50c878
mov dword [esi + 8], 1
xor eax, eax
pop esi
ret 8
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push 0
push ecx
mov ecx, dword [esp + 0x10]
push edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x50c8a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
cmp eax, 0x6d
setne dl
lea edx, [edx + edx + 1]
mov dword [esi + 8], edx
mov eax, dword [esp + 0xc]
pop esi
ret 8
Function at 0x50d8e0
Capabilities:
Get session user name
Query environment variable

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0xc]
lea eax, [esp + 0x10]
mov dword [esp + 0x10], esi
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x50d914
push esi
push edi
push str.username
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x50d914
pop edi
xor al, al
pop esi
ret
pop edi
mov al, 1
pop esi
ret

Function at 0x50dad0
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x20
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x50daef
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.GetDiskFreeSpaceExW
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x50db6d
mov ecx, dword [esi]
lea edx, [esp + 0x20]
push 0
push edx
lea edx, [esp + 0x20]
push edx
push ecx
call eax
test eax, eax
jne 0x50db27
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x50db44
mov eax, dword [esp + 0x24]
xor ecx, ecx
cdq
mov edx, dword [esp + 0x20]
xor edi, edi
or ecx, edx
or eax, edi
mov dword [esi], ecx
mov dword [esi + 4], eax
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x50dbe9
mov eax, dword [esp + 0x1c]
xor ecx, ecx
cdq
mov edx, dword [esp + 0x18]
xor edi, edi
or ecx, edx
or eax, edi
mov dword [esi + 4], eax
mov dword [esi], ecx
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [esi]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x10]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
test eax, eax
jne 0x50db96
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
cdq
push edx
push eax
push 0
push ecx
call fcn.005b68e0
mov esi, dword [ebp + 0xc]
mov ecx, edx
test esi, esi
mov edi, eax
mov dword [esp + 0x14], ecx
je 0x50dbcf
mov eax, dword [esp + 0x18]
push ecx
cdq
push edi
push edx
push eax
call fcn.005b68e0
mov ecx, dword [esp + 0x14]
mov dword [esi], eax
mov dword [esi + 4], edx
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x50dbe9
mov eax, dword [esp + 0x20]
push ecx
cdq
push edi
push edx
push eax
call fcn.005b68e0
mov dword [esi], eax
mov dword [esi + 4], edx
pop edi
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x50fc50
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
xor eax, eax
mov cx, word [edx]
test cx, cx
je 0x50fc7f
and ecx, 0xffff
add edx, 2
add eax, ecx
mov ecx, eax
shl ecx, 0xa
add eax, ecx
mov ecx, eax
shr ecx, 6
xor eax, ecx
mov cx, word [edx]
test cx, cx
jne 0x50fc5e
lea eax, [eax + eax*8]
mov ecx, eax
shr ecx, 0xb
xor ecx, eax
mov eax, ecx
shl eax, 0xf
add eax, ecx
ret
Function at 0x5139b0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x626828
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
mov dword [esi], vtable.wxBufferedInputStream.0
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x18]
push 1
mov dword [esp + 0x1c], 0
mov edi, dword [eax + 8]
mov ebx, dword [eax + 0xc]
mov edx, dword [ecx]
sub edi, ebx
xor eax, eax
neg edi
adc eax, eax
neg eax
push eax
push edi
call dword [edx + 0x30]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x513a09
mov edx, dword [ecx]
push 1
call dword [edx]
mov ecx, esi
mov dword [esp + 0x18], 0xffffffff
call fcn.00513570
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x514600
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x626940
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x14]
push ebp
push esi
push edi
test eax, eax
mov esi, ecx
je 0x5146d6
cmp dword [esi], 0
je 0x5146d6
call fcn.00514a10
test edx, edx
jl 0x5146d6
jg 0x514647
test eax, eax
jb 0x5146d6
mov ecx, esi
call fcn.00514a10
mov ecx, esi
mov ebp, eax
call fcn.00514a10
xor ecx, ecx
cmp ebp, eax
jne 0x5146d6
cmp ecx, edx
jne 0x5146d6
mov eax, dword [esi]
push eax
call dword [sym.imp.MSVCRT.dll_clearerr]
lea ecx, [ebp + 2]
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
mov dword [esp + 0x14], edi
mov byte [edi + ebp + 1], 0
mov edx, dword [esi]
mov dword [esp + 0x20], 0
push edx
push ebp
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esi]
add esp, 0x18
mov edx, dword [ecx + 0xc]
shr edx, 5
test dl, 1
je 0x5146ec
mov esi, dword [esi + 4]
call fcn.004f0590
test eax, eax
je 0x5146c0
mov edx, dword [eax]
push 0
push str.Read_error_on_file__s
mov ecx, eax
call dword [edx + 8]
jmp 0x5146c5
mov eax, str.Read_error_on_file__s
push esi
push eax
call fcn.004f45b0
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0xc
pop edi
pop esi
xor al, al
pop ebp
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
add esp, 0x10
ret 8
mov ecx, dword [esp + 0x24]
mov byte [edi + eax], 0
mov eax, dword [0x65329c]
push eax
push ecx
push edi
lea ecx, [esp + 0x30]
call fcn.004eabd0
mov ecx, dword [esp + 0x20]
push eax
mov byte [esp + 0x1c], 1
call fcn.004ea610
mov edx, dword [esp + 0x24]
mov esi, dword [sym.imp.MSVCRT.dll_free]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, 0xffffffff
je 0x514736
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x514736
push eax
call esi
add esp, 4
push edi
call esi
mov ecx, dword [esp + 0x14]
add esp, 4
mov al, 1
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
add esp, 0x10
ret 8
Function at 0x514760
Capabilities:
Read file on windows

Disassembly:
push edi
mov edi, ecx
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x5147db
mov eax, dword [edi]
test eax, eax
je 0x5147db
push ebx
push esi
mov esi, dword [esp + 0x14]
push eax
push esi
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
mov ebx, eax
add esp, 0x10
cmp ebx, esi
jae 0x5147d3
mov eax, dword [edi]
mov ecx, dword [eax + 0xc]
shr ecx, 5
test cl, 1
je 0x5147d3
mov edi, dword [edi + 4]
call fcn.004f0590
test eax, eax
je 0x5147c4
mov edx, dword [eax]
push 0
push str.Read_error_on_file__s
mov ecx, eax
call dword [edx + 8]
push edi
push eax
call fcn.004f45b0
add esp, 8
mov eax, ebx
pop esi
pop ebx
pop edi
ret 8
mov eax, str.Read_error_on_file__s
push edi
push eax
call fcn.004f45b0
add esp, 8
mov eax, ebx
pop esi
pop ebx
pop edi
ret 8
xor eax, eax
pop edi
ret 8

Function at 0x5147f0
Capabilities:
Write file on windows

Disassembly:
push edi
mov edi, ecx
mov ecx, dword [esp + 8]
test ecx, ecx
je 0x51485e
mov eax, dword [edi]
test eax, eax
je 0x51485e
push ebx
push esi
mov esi, dword [esp + 0x14]
push eax
push esi
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ebx, eax
add esp, 0x10
cmp ebx, esi
jae 0x514856
mov edi, dword [edi + 4]
call fcn.004f0590
test eax, eax
je 0x514847
mov edx, dword [eax]
push 0
push str.Write_error_on_file__s
mov ecx, eax
call dword [edx + 8]
push edi
push eax
call fcn.004f45b0
add esp, 8
mov eax, ebx
pop esi
pop ebx
pop edi
ret 8
mov eax, str.Write_error_on_file__s
push edi
push eax
call fcn.004f45b0
add esp, 8
mov eax, ebx
pop esi
pop ebx
pop edi
ret 8
xor eax, eax
pop edi
ret 8