joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14015b4c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x140283fc0]
mov rbx, rcx
mov r11d, dword [rsi]
test r11d, r11d
jne 0x14015b4f4
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x14015b551
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rdi, qword [rcx + 0x10]
test rdi, rdi
je 0x14015b5a0
mov esi, dword [0x1402a4dd8]
mov rbp, qword [sym.imp.KERNEL32.dll_GetLastError]
call rbp
mov r12d, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rsi, rax
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x14015b560
mov r12, qword [rsi]
cmp rdi, r12
ja 0x14015b610
lea rsi, [rsi + rdi*8]
mov rax, qword [rsi]
test rax, rax
jne 0x14015b4e7
mov rcx, rbx
call fcn.14015b3c0
mov qword [rsi], rax
jmp 0x14015b4e7
call fcn.14015b3c0
mov qword [rbx + 0x10], rax
jmp 0x14015b4e7
lea rcx, [rdi + 0x21]
mov edx, 8
lea r12, [rdi + 0x20]
call sub.msvcrt.dll_calloc
test rax, rax
mov rsi, rax
je 0x14015b6ff
mov qword [rax], r12
mov rdx, rsi
mov ecx, dword [0x1402a4dd8]
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x14015b538
call rbp
jmp 0x14015b538
mov r10d, dword [rsi]
test r10d, r10d
je 0x14015b5c6
mov r9d, dword [0x140171590]
test r9d, r9d
je 0x14015b6c2
lock add dword [0x1402a4de0], 1
jne 0x14015b69b
mov rdi, qword [rbx + 0x10]
test rdi, rdi
je 0x14015b680
mov eax, dword [rsi]
test eax, eax
je 0x14015b501
mov eax, 0xffffffff
lock xadd dword [0x1402a4de0], eax
sub eax, 1
js 0x14015b501
xor r8d, r8d
mov edx, 1
mov rcx, qword [0x1402a4de8]
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x14015b501
lea r13, [r12 + r12]
lea rax, [rdi + 0x20]
mov rcx, rsi
cmp rdi, r13
cmova r13, rax
lea rdx, [r13*8 + 8]
call sub.msvcrt.dll_realloc
test rax, rax
mov rsi, rax
je 0x14015b6ff
mov qword [rax], r13
sub r13, r12
lea rcx, [rax + r12*8 + 8]
lea r8, [r13*8]
xor edx, edx
call sub.msvcrt.dll_memset
jmp 0x14015b581
call fcn.14015b460
mov dword [0x140171590], 1
mov edx, dword [rsi]
test edx, edx
jne 0x14015b5b8
mov rdi, qword [rbx + 0x10]
test rdi, rdi
jne 0x14015b501
mov rax, qword [0x1402a4dd0]
lea rdi, [rax + 1]
mov qword [0x1402a4dd0], rdi
mov qword [rbx + 0x10], rdi
jmp 0x14015b5d3
mov edx, 0xffffffff
mov rcx, qword [0x1402a4de8]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14015b5c6
lock sub dword [0x1402a4de0], 1
jmp 0x14015b5c6
lock add dword [0x140171594], 1
je 0x14015b65a
mov r8d, dword [0x140171590]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x140171590]
test r8d, r8d
jne 0x14015b669
nop word cs:[rax + rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x14015b6f0
jmp 0x14015b669
call sub.msvcrt.dll_abort
nop
nop
nop word cs:[rax + rax]
cmp qword [rcx], rdx
jae 0x14015b720
mov qword [rcx], rdx
mov qword [rcx + 0x18], 0
cmp qword [rcx + 8], r8
jae 0x14015b72a
mov qword [rcx + 8], r8
test r9, r9
je 0x14015b734
cmp rdx, qword [rcx]
je 0x14015b740
repz ret
mov qword [rcx + 0x18], r9
ret
Function at 0x14015cae0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x230
mov rbx, rcx
call sub.msvcrt.dll__errno
test rbx, rbx
mov dword [rax], 0
je 0x14015cc82
cmp word [rbx], 0
je 0x14015cc40
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14015cc60
test al, 0x10
je 0x14015cc40
lea rsi, [rsp + 0x20]
mov rdx, rbx
mov r8d, 0x104
mov rcx, rsi
call sub.msvcrt.dll__wfullpath
mov rcx, rsi
call sub.msvcrt.dll_wcslen
lea rcx, [0x140283360]
mov rbx, rax
call sub.msvcrt.dll_wcslen
lea rcx, [0x140283364]
add rbx, rax
call sub.msvcrt.dll_wcslen
lea rcx, [rbx + rax + 0x229]
add rcx, rcx
call sub.msvcrt.dll_malloc
test rax, rax
mov rbx, rax
je 0x14015cc72
lea rdi, [rax + 0x44c]
mov rdx, rsi
mov rcx, rdi
call sub.msvcrt.dll_wcscpy
cmp word [rbx + 0x44c], 0
jne 0x14015cc00
lea rdx, [0x140283364]
mov rcx, rdi
call sub.msvcrt.dll_wcscat
xor edx, edx
xor eax, eax
mov ecx, 0x41
mov word [rbx + 0x236], dx
lea rdx, [rbx + 0x238]
mov word [rbx + 0x234], ax
xor eax, eax
mov qword [rbx + 0x440], 0xffffffffffffffff
mov dword [rbx + 0x448], 0
mov rdi, rdx
mov dword [rbx + 0x230], 0
rep stosq qword [rdi], rax
mov rax, rbx
add rsp, 0x230
pop rbx
pop rsi
pop rdi
ret
mov rcx, rdi
call sub.msvcrt.dll_wcslen
cmp word [rbx + rax*2 + 0x44a], 0x2f
je 0x14015cb99
mov rcx, rdi
call sub.msvcrt.dll_wcslen
cmp word [rbx + rax*2 + 0x44a], 0x5c
je 0x14015cb99
lea rdx, [0x140283360]
mov rcx, rdi
call sub.msvcrt.dll_wcscat
jmp 0x14015cb99
xor ebx, ebx
call sub.msvcrt.dll__errno
mov dword [rax], 0x14
mov rax, rbx
add rsp, 0x230
pop rbx
pop rsi
pop rdi
ret
call sub.msvcrt.dll__errno
xor ebx, ebx
mov dword [rax], 2
jmp 0x14015cbed
call sub.msvcrt.dll__errno
mov dword [rax], 0xc
jmp 0x14015cbed
call sub.msvcrt.dll__errno
mov dword [rax], 0xe
jmp 0x14015cbed
Function at 0x1401642e0
Capabilities:
Query environment variable

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12d, 1
sub r8d, 1
mov edi, ecx
mov ecx, 0x66666667
mov eax, r8d
mov rbp, rdx
movsxd rsi, r8d
imul ecx
sar r8d, 0x1f
mov rbx, r9
mov ecx, edx
sar ecx, 2
sub ecx, r8d
je 0x140164335
mov r8d, 0x66666667
nop dword [rax]
mov eax, ecx
sar ecx, 0x1f
add r12d, 1
imul r8d
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x140164320
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x1401643b0
mov ecx, dword [rbx + 0xc]
cmp r12d, edx
mov r9, rbx
cmovl r12d, edx
mov r8d, 1
lea edx, [r12 + 2]
mov eax, ecx
sub eax, edx
cmp ecx, edx
mov edx, 0xffffffff
cmovle eax, edx
mov ecx, edi
mov rdx, rbp
mov dword [rbx + 0xc], eax
add r12d, 1
call fcn.140163ba0
mov ecx, dword [rbx + 8]
mov eax, dword [rbx + 0x2c]
mov rdx, rbx
mov dword [rbx + 0x10], eax
mov eax, ecx
and ecx, 0x20
or eax, 0x1c0
or ecx, 0x45
mov dword [rbx + 8], eax
call fcn.140163750
add dword [rbx + 0xc], r12d
mov rdx, rbx
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.140164010
mov eax, dword [0x140171600]
cmp eax, 0xffffffff
je 0x1401643dc
test eax, eax
je 0x1401643cc
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x14016433d
call fcn.14016b8a0
test al, 1
mov edx, 3
jne 0x1401643bf
jmp 0x1401643c4
lea rcx, [0x140283807]
call sub.msvcrt.dll_getenv
test rax, rax
je 0x140164404
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
setbe al
movzx eax, al
mov dword [0x140171600], eax
jmp 0x1401643bb
xor eax, eax
jmp 0x1401643f9

Function at 0x140166670
Capabilities:
Query environment variable

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12d, 1
sub r8d, 1
mov edi, ecx
mov ecx, 0x66666667
mov eax, r8d
mov rbp, rdx
movsxd rsi, r8d
imul ecx
sar r8d, 0x1f
mov rbx, r9
mov ecx, edx
sar ecx, 2
sub ecx, r8d
je 0x1401666c5
mov r8d, 0x66666667
nop dword [rax]
mov eax, ecx
sar ecx, 0x1f
add r12d, 1
imul r8d
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x1401666b0
mov edx, dword [rbx + 0x2c]
cmp edx, 0xffffffff
je 0x140166740
mov ecx, dword [rbx + 0xc]
cmp r12d, edx
mov r9, rbx
cmovl r12d, edx
mov r8d, 1
lea edx, [r12 + 2]
mov eax, ecx
sub eax, edx
cmp ecx, edx
mov edx, 0xffffffff
cmovle eax, edx
mov ecx, edi
mov rdx, rbp
mov dword [rbx + 0xc], eax
add r12d, 1
call fcn.140165de0
mov ecx, dword [rbx + 8]
mov eax, dword [rbx + 0x2c]
mov rdx, rbx
mov dword [rbx + 0x10], eax
mov eax, ecx
and ecx, 0x20
or eax, 0x1c0
or ecx, 0x45
mov dword [rbx + 8], eax
call fcn.140165900
add dword [rbx + 0xc], r12d
mov rdx, rbx
mov rcx, rsi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.1401663a0
mov eax, dword [0x140171630]
cmp eax, 0xffffffff
je 0x14016676c
test eax, eax
je 0x14016675c
mov edx, 2
mov dword [rbx + 0x2c], edx
jmp 0x1401666cd
call fcn.14016b8a0
test al, 1
mov edx, 3
jne 0x14016674f
jmp 0x140166754
lea rcx, str.PRINTF_EXPONENT_DIGITS
call sub.msvcrt.dll_getenv
test rax, rax
je 0x140166794
movsx eax, byte [rax]
sub eax, 0x30
cmp eax, 2
setbe al
movzx eax, al
mov dword [0x140171630], eax
jmp 0x14016674b
xor eax, eax
jmp 0x140166789
Function at 0x140002550
Capabilities:
Capture screenshot

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x90
mov rax, qword [0x14000e040]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov rsi, rcx
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetDC]
mov rbp, rax
mov rcx, rax
call qword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov r14, rax
mov edx, 8
mov rcx, rbp
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edi, eax
mov edx, 0xa
mov rcx, rbp
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ebx, eax
mov r8d, eax
mov edx, edi
mov rcx, rbp
call qword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov r15, rax
mov rdx, rax
mov rcx, r14
call qword [sym.imp.GDI32.dll_SelectObject]
mov dword [rsp + 0x40], 0xcc0020
xor r12d, r12d
mov dword [rsp + 0x38], r12d
mov dword [rsp + 0x30], r12d
mov qword [rsp + 0x28], rbp
mov dword [rsp + 0x20], ebx
mov r9d, edi
xor r8d, r8d
xor edx, edx
mov rcx, r14
call qword [sym.imp.GDI32.dll_BitBlt]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rax
lea rax, vtable.Gdiplus::Bitmap.0
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], r12
lea r8, [rsp + 0x58]
xor edx, edx
mov rcx, r15
call qword [sym.imp.gdiplus.dll_GdipCreateBitmapFromHBITMAP]
mov dword [rsp + 0x70], eax
mov rdi, qword [rsp + 0x58]
mov qword [rsp + 0x68], rdi
mov dword [rsp + 0x58], r12d
mov dword [rsp + 0x50], r12d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x58]
call qword [sym.imp.gdiplus.dll_GdipGetImageEncodersSize]
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x1400026dc
mov ecx, eax
call fcn.140007044
mov rbx, rax
mov r8, rax
mov edx, dword [rsp + 0x50]
mov ecx, dword [rsp + 0x58]
call qword [sym.imp.gdiplus.dll_GdipGetImageEncoders]
mov r8d, r12d
mov r10d, dword [rsp + 0x58]
test r10d, r10d
je 0x1400026d4
lea r11, str.image_png
mov ecx, r8d
imul r9, rcx, 0x68
mov rdx, qword [r9 + rbx + 0x40]
mov rax, r12
nop
movzx ecx, word [rdx + rax*2]
cmp cx, word [r11 + rax*2]
jne 0x14000274d
movzx ecx, word [rdx + rax*2 + 2]
cmp cx, word [r11 + rax*2 + 2]
jne 0x14000274d
add rax, 2
cmp rax, 0xa
jne 0x1400026a0
movups xmm0, xmmword [r9 + rbx]
movups xmmword [rsp + 0x78], xmm0
mov rcx, rbx
call fcn.140007000
cmp qword [rsi + 0x18], 7
jbe 0x1400026e6
mov rsi, qword [rsi]
xor r9d, r9d
lea r8, [rsp + 0x78]
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.gdiplus.dll_GdipSaveImageToFile]
mov rcx, r15
call qword [sym.imp.GDI32.dll_DeleteObject]
mov rcx, r14
call qword [sym.imp.GDI32.dll_DeleteDC]
mov rdx, rbp
xor ecx, ecx
call qword [sym.imp.USER32.dll_ReleaseDC]
nop
mov rcx, rdi
call qword [sym.imp.gdiplus.dll_GdipDisposeImage]
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.140006fe0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
inc r8d
cmp r8d, r10d
jb 0x140002690
jmp 0x1400026d4
Function at 0x140004580
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
push r15
sub rsp, 0x20
cmp qword [rcx + 0x68], 0
mov rbx, r8
mov r15, rdx
mov rdi, rcx
je 0x1400045a8
add rsp, 0x20
pop r15
pop rdi
pop rbx
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x40]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x48], rsi
mov rsi, rbx
mov qword [rsp + 0x58], r14
mov r9, qword [rax]
test r9, r9
je 0x1400045ce
mov rax, qword [rcx + 0x58]
mov ecx, dword [rax]
jmp 0x1400045d0
xor ecx, ecx
movsxd rbp, ecx
test rbx, rbx
jle 0x140004629
test ecx, ecx
jle 0x140004609
cmp rbx, rbp
mov rcx, r9
cmovl rbp, rbx
mov r8, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rdi + 0x58]
add r15, rbp
sub rbx, rbp
sub dword [rax], ebp
mov rcx, qword [rdi + 0x40]
movsxd rax, ebp
add qword [rcx], rax
test rbx, rbx
jle 0x140004629
mov r9, qword [rdi + 0x80]
test r9, r9
je 0x140004629
mov r8, rbx
mov edx, 1
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
sub rbx, rax
mov r14, qword [rsp + 0x58]
sub rsi, rbx
mov rbp, qword [rsp + 0x40]
mov rax, rsi
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop r15
pop rdi
pop rbx
ret

Function at 0x140004650
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push r14
sub rsp, 0x30
mov rbp, r8
mov r14, rdx
mov rsi, rcx
test r8, r8
jg 0x140004672
xor eax, eax
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
cmp qword [rcx + 0x68], 0
je 0x140004688
add rsp, 0x30
pop r14
pop rsi
pop rbp
jmp qword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char____ptr64__long_long___int64_____ptr64]
mov rax, qword [rcx + 0x38]
mov qword [rsp + 0x28], rbx
mov rbx, rbp
mov rdx, qword [rax]
test rdx, rdx
je 0x1400046a4
mov rax, qword [rcx + 0x50]
mov ecx, dword [rax]
jmp 0x1400046a6
xor ecx, ecx
movsxd rax, ecx
test ecx, ecx
je 0x1400046e2
mov qword [rsp + 0x20], rdi
cmp rax, rbp
mov rdi, rbp
mov rcx, r14
cmovb rdi, rax
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsi + 0x50]
add r14, rdi
sub rbx, rdi
sub dword [rax], edi
mov rcx, qword [rsi + 0x38]
movsxd rax, edi
mov rdi, qword [rsp + 0x20]
add qword [rcx], rax
cmp qword [rsi + 0x80], 0
je 0x14000477e
mov r8, qword [rsi + 0x18]
lea rax, [rsi + 0x70]
cmp qword [r8], rax
jne 0x14000471d
mov rcx, qword [rsi + 0x88]
mov rdx, qword [rsi + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rsi + 0x38]
mov qword [rax], rcx
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
cmp rbx, 0xfff
jbe 0x14000475e
nop word [rax + rax]
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8d, 0xfff
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add r14, rax
sub rbx, rax
cmp rax, 0xfff
jne 0x14000477e
cmp rbx, rax
ja 0x140004730
test rbx, rbx
je 0x14000477e
mov r9, qword [rsi + 0x80]
mov r8, rbx
mov edx, 1
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
sub rbx, rax
sub rbp, rbx
mov rbx, qword [rsp + 0x28]
mov rax, rbp
add rsp, 0x30
pop r14
pop rsi
pop rbp
ret
Function at 0x140004be0
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x80
mov rax, qword [0x14000e040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov edi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x140004c0d
xor eax, eax
jmp 0x140004d79
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140004c47
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140004c47
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov eax, edi
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], dil
jmp 0x140004d79
cmp qword [rbx + 0x80], 0
mov qword [rsp + 0xa0], rsi
je 0x140004d6c
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x140004c8a
mov rcx, qword [rbx + 0x88]
mov rdx, qword [rbx + 0x90]
mov qword [r8], rcx
sub edx, ecx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140004cb5
mov rdx, qword [rbx + 0x80]
movsx ecx, dil
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140004d71
lea rax, [rsp + 0x40]
mov byte [rsp + 0x50], dil
mov qword [rsp + 0x38], rax
lea rdx, [rbx + 0x74]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x51]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140004d24
sub eax, 1
je 0x140004d24
cmp eax, 2
jne 0x140004d6c
movsx ecx, byte [rsp + 0x50]
mov rdx, qword [rbx + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
mov ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, edi
mov eax, ecx
jmp 0x140004d71
mov rsi, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
sub rsi, rax
je 0x140004d52
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rsi, rax
jne 0x140004d6c
lea rax, [rsp + 0x50]
mov byte [rbx + 0x71], 1
cmp qword [rsp + 0x48], rax
mov ecx, 0xffffffff
cmovne ecx, edi
mov eax, ecx
jmp 0x140004d71
mov eax, 0xffffffff
mov rsi, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.140006fe0
mov rbx, qword [rsp + 0xa8]
add rsp, 0x80
pop rdi
ret
Function at 0x1400050e0
Capabilities:
Write file on windows

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x14000e040]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [rcx + 0x68], 0
mov rbx, rcx
je 0x1400051b3
cmp byte [rcx + 0x71], 0
je 0x1400051b3
mov rax, qword [rcx]
mov edx, 0xffffffff
mov qword [rsp + 0x78], rdi
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x1400051af
mov rcx, qword [rbx + 0x68]
lea rax, [rsp + 0x30]
lea rdx, [rbx + 0x74]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x38]
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
je 0x140005174
sub eax, 1
je 0x140005178
cmp eax, 2
jne 0x1400051af
mov byte [rbx + 0x71], 0
mov al, 1
mov rdi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140006fe0
add rsp, 0x60
pop rbx
ret
mov byte [rbx + 0x71], 0
mov rdi, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
sub rdi, rax
je 0x1400051a6
mov r9, qword [rbx + 0x80]
lea rcx, [rsp + 0x38]
mov r8, rdi
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rdi, rax
jne 0x1400051af
cmp byte [rbx + 0x71], 0
sete al
jmp 0x14000515c
xor al, al
jmp 0x14000515c
mov al, 1
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140006fe0
add rsp, 0x60
pop rbx
ret

Function at 0x140006760
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x14000679a
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x14000679f
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x1400067e8
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, [0x140009550]
cmp byte [rcx + rax], 0
je 0x1400067e8
dec r8
sub rdx, 1
jne 0x1400067ce
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret

Function at 0x140007a14
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140007a5e
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140007a5e
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140007a5e
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140007a5e
cmp dword [rcx + 0x84], 0xe
jbe 0x140007a5e
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140007a60
xor al, al
add rsp, 0x28
ret
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x140004490]
mov dword [rax], 1
mov rax, qword [0x1400044a0]
mov dword [rax], 1
mov rax, qword [0x1400044b0]
mov dword [rax], 1
mov rax, qword [0x140004440]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x1400019d0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sym.__acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sym.fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sym.__acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call sym.vfprintf
call sym.abort
nop

Function at 0x1400026a2
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140007108]
test eax, eax
je 0x14000273a
lea rax, [0x1400070e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140007110]
mov qword [rbp - 8], rax
jmp 0x14000271e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x140002712
cmp qword [rbp - 0x10], 0
je 0x140002712
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1400026d8
lea rax, [0x1400070e0]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14000273b
nop
add rsp, 0x30
pop rbp
ret
Function at 0x140002840
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140002868
mov eax, 0
jmp 0x1400028b6
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140002891
mov eax, 0
jmp 0x1400028b6
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x1400028b1
mov eax, 0
jmp 0x1400028b6
mov eax, 1
add rsp, 0x20
pop rbp
ret

Function at 0x1400028bc
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x14000293a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140002931
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140002931
mov rax, qword [rbp - 8]
jmp 0x14000294f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140002904
mov eax, 0
add rsp, 0x20
pop rbp
ret