joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4bca80
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x11c
mov ebx, dword [esp + 0x130]
call sub.msvcrt.dll__errno
test ebx, ebx
mov dword [eax], 0
je 0x4bcc3e
cmp byte [ebx], 0
je 0x4bcc00
sub esp, 0xc
push ebx
call sub.KERNEL32.dll_GetFileAttributesA
add esp, 0xc
cmp eax, 0xffffffff
je 0x4bcc2c
test al, 0x10
je 0x4bcc00
push eax
push 0x104
push ebx
lea edi, [esp + 0x24]
push edi
call sub.msvcrt.dll__fullpath
pop eax
mov ecx, edi
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4bcade
test edx, 0x8080
je 0x4bcbf2
add dl, dl
sbb ecx, 3
sub ecx, edi
lea eax, [ecx + 0x233]
push eax
call sub.msvcrt.dll_malloc
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x4bcc1a
lea esi, [eax + 0x22c]
mov ebp, eax
push eax
push eax
push edi
push esi
call sub.msvcrt.dll_strcpy
add esp, 0x10
cmp byte [ebx + 0x22c], 0
jne 0x4bcba4
sub esp, 0xc
push esi
call sub.msvcrt.dll_strlen
add esp, 0xc
mov word [eax + esi], 0x2a
lea eax, [ebx + 0x120]
mov dword [ebx + 0x224], 0xffffffff
mov dword [ebx + 0x228], 0
mov dword [ebx + 0x118], 0
mov word [ebx + 0x11c], 0
mov word [ebx + 0x11e], 0
push 0x104
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0x10
add esp, 0x11c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push esi
call sub.msvcrt.dll_strlen
pop edx
pop ecx
push 0x2f
lea edi, [esi + eax - 1]
push esi
call sub.msvcrt.dll_strrchr
add esp, 0x10
cmp eax, edi
je 0x4bcb3f
push eax
push eax
push 0x5c
push esi
call sub.msvcrt.dll_strrchr
add esp, 0x10
cmp edi, eax
je 0x4bcb3f
sub esp, 0xc
push esi
call sub.msvcrt.dll_strlen
add esp, 0x10
mov word [eax + esi], 0x5c
jmp 0x4bcb3f
shr edx, 0x10
add ecx, 2
jmp 0x4bcb02
call sub.msvcrt.dll__errno
xor ebp, ebp
mov dword [eax], 0x14
add esp, 0x11c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
xor ebp, ebp
mov dword [eax], 0xc
jmp 0x4bcb97
call sub.msvcrt.dll__errno
xor ebp, ebp
mov dword [eax], 2
jmp 0x4bcb97
call sub.msvcrt.dll__errno
xor ebp, ebp
mov dword [eax], 0xe
jmp 0x4bcb97
Function at 0x10001ac0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10019815
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x10027008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
sub dword [ebp + 0xc], 1
jne 0x10001b5a
push 1
call fcn.10018670
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
push ecx
push 0
push eax
push 0x10001ef0
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x1c
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x10001b4b
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x18]
test ecx, ecx
jne 0x10001b35
push 1
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
push ecx
push eax
call dword [sym.imp.MSVCP140.dll__Thrd_detach]
add esp, 8
test eax, eax
je 0x10001b5a
push eax
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_C_error_int_]
push 6
mov dword [ebp - 0x18], 0
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10018459
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10008c70
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001a18c
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x10027008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 8
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov byte [esi + 0x24], 0
call fcn.10018670
add esp, 4
mov dword [ebp - 0x50], eax
xorps xmm0, xmm0
mov dword [ebp - 4], 0
mov ecx, eax
movq qword [eax], xmm0
call fcn.10009f40
mov dword [ebp - 4], 0xffffffff
mov dword [0x10027d10], eax
cmp dword [eax], 0
jne 0x10008d16
xor eax, eax
jmp 0x10008d29
push 0
push 0
push 0
push 0
push 0x1001da80
call dword [0x10027d34]
mov dword [esi + 4], eax
lea ecx, [ebp - 0x4c]
mov eax, 0x6d
mov dword [ebp - 0x4c], 0
mov word [ebp - 0x14], ax
xor eax, eax
mov word [ebp - 0x4c], ax
lea eax, [ebp - 0x34]
push 0x11
push eax
mov dword [ebp - 0x34], 0x6e006f
mov dword [ebp - 0x30], 0x640065
mov dword [ebp - 0x2c], 0x690072
mov dword [ebp - 0x28], 0x650076
mov dword [ebp - 0x24], 0x6c002e
mov dword [ebp - 0x20], 0x760069
mov dword [ebp - 0x1c], 0x2e0065
mov dword [ebp - 0x18], 0x6f0063
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 7
call fcn.10001c70
mov dword [ebp - 4], 1
lea eax, [ebp - 0x4c]
cmp dword [ebp - 0x38], 8
mov edx, dword [esi + 4]
cmovae eax, dword [ebp - 0x4c]
sub esp, 8
push eax
call fcn.1000a3d0
mov ecx, dword [ebp - 0x38]
mov dword [esi], eax
cmp ecx, 8
jb 0x10008df2
mov edx, dword [ebp - 0x4c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10008de8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10008de8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100189ba
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10018459
mov esp, ebp
pop ebp
ret
Function at 0x1000fa10
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x1000fa6b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x1000fa6b
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x1000fa58
cmp esi, edx
jae 0x1000fa6b
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x1000fa46
cmp esi, edx
jae 0x1000fa6b
xor eax, eax
cmp word [esi], ax
pop edi
cmove esi, eax
mov eax, esi
pop esi
pop ebx
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x1000fc80
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001ae67
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x10027008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0xa4], esi
mov dword [ebp - 4], 0
mov dword [ebp - 0xb4], esi
mov dword [ebp - 0xa8], 0
push 0
push 0x1001d9f3
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
call fcn.10001d80
push 0x88
lea eax, [ebp - 0xa0]
mov dword [ebp - 4], 0
push 0
push eax
mov dword [ebp - 0xa8], 1
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa0]
push 0
push eax
push 0x1001eaec
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov edi, eax
mov dword [ebp - 0xa4], edi
test edi, edi
jg 0x1000fdc5
lea ecx, [ebp - 0xcc]
call fcn.1000fa80
push eax
mov ecx, esi
call fcn.10005900
mov ecx, dword [ebp - 0xb8]
cmp ecx, 0x10
jb 0x1000fd87
mov edx, dword [ebp - 0xcc]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1000fd7d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1000fd7d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100189ba
add esp, 8
push 0
push 0x80
push 1
push 0
push 1
push 0x40000000
push str.telementry.cab
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp dword [esi + 0x14], 0x10
mov edi, eax
mov eax, esi
jb 0x1000fdb0
mov eax, dword [esi]
push 0
push 0
push dword [esi + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
jmp 0x1000fe43
push 0x20
mov dword [ebp - 0x14], 0
call fcn.10018d53
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0xb0], ebx
push 0
push eax
push 0x20
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor edi, edi
mov bl, byte [edi + ebx]
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x14]
mov byte [ebp - 0x18], bl
cmp ecx, edx
jae 0x1000fe19
lea eax, [ecx + 1]
mov dword [esi + 0x10], eax
mov eax, esi
cmp edx, 0x10
jb 0x1000fe0f
mov eax, dword [esi]
mov byte [eax + ecx], bl
mov byte [eax + ecx + 1], 0
jmp 0x1000fe31
push dword [ebp - 0x18]
mov byte [ebp - 0xac], 0
push dword [ebp - 0xac]
push ecx
mov ecx, esi
call fcn.10006300
mov ebx, dword [ebp - 0xb0]
inc edi
cmp edi, 0x20
jl 0x1000fdf0
push dword [ebp - 0xa4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10018459
mov esp, ebp
pop ebp
ret
Function at 0x10011e80
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001b32d
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push esi
mov eax, dword [0x10027008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, 0x1002712c
cmp dword [0x10027140], 8
cmovae eax, dword [0x1002712c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
mov dword [ebp - 0x20], 0x64616f4c
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x1c], 0x7262694c
lea eax, [ebp - 0x14]
mov dword [ebp - 0x18], 0x41797261
sub eax, ecx
mov dword [ebp - 0x38], 0
push eax
mov eax, ecx
mov dword [ebp - 0x28], 0
push eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x24], 0xf
call fcn.10005ce0
cmp dword [ebp - 0x24], 0x10
lea eax, [ebp - 0x38]
cmovae eax, dword [ebp - 0x38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x24]
mov esi, eax
cmp ecx, 0x10
jb 0x10011f52
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10011f48
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10011f48
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100189ba
add esp, 8
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
test esi, esi
je 0x10011f78
cmp dword [ebp + 0x1c], 0x10
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
call esi
mov esi, eax
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0x10
jb 0x10011fae
mov edx, dword [ebp + 8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10011fa4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10011fa4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100189ba
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10012040
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001b365
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push esi
mov eax, dword [0x10027008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 1
cmp dword [0x10027d48], 0
jne 0x10012149
cmp dword [0x10027140], 8
mov eax, 0x1002712c
cmovae eax, dword [0x1002712c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x10027d48], eax
lea ecx, [ebp - 0x20]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x20], 0x64616f4c
sub eax, ecx
mov dword [ebp - 0x1c], 0x7262694c
push eax
mov eax, ecx
mov dword [ebp - 0x18], 0x57797261
push eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
call fcn.10005ce0
cmp dword [ebp - 0x24], 0x10
lea eax, [ebp - 0x38]
cmovae eax, dword [ebp - 0x38]
push eax
push dword [0x10027d48]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, eax
mov eax, dword [ebp - 0x24]
mov dword [0x10027d4c], ecx
cmp eax, 0x10
jb 0x10012135
mov edx, dword [ebp - 0x38]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x10012125
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10012125
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100189ba
mov ecx, dword [0x10027d4c]
add esp, 8
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
jmp 0x1001214f
mov ecx, dword [0x10027d4c]
test ecx, ecx
jne 0x10012157
xor esi, esi
jmp 0x1001217a
cmp dword [ebp + 0x34], 0x10
lea esi, [ebp + 0x20]
lea eax, [ebp + 8]
cmovae esi, dword [ebp + 0x20]
cmp dword [ebp + 0x1c], 8
cmovae eax, dword [ebp + 8]
push eax
call ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
mov ecx, dword [ebp + 0x1c]
cmp ecx, 8
jb 0x100121b0
mov edx, dword [ebp + 8]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x100121a6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100121ea
push ecx
push edx
call fcn.100189ba
add esp, 8
mov ecx, dword [ebp + 0x34]
xor eax, eax
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 7
mov word [ebp + 8], ax
cmp ecx, 0x10
jb 0x100121fa
mov edx, dword [ebp + 0x20]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100121f0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100121f0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100189ba
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10012210
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001b3a5
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x10027008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [0x10027038]
lea ecx, [ebp - 0x20]
lea eax, [ebp - 0x15]
mov dword [ebp - 0x38], 0
sub eax, ecx
mov dword [ebp - 0x20], 0x6e65704f
push eax
mov eax, ecx
mov dword [ebp - 0x1c], 0x636f7250
push eax
lea ecx, [ebp - 0x38]
mov word [ebp - 0x18], 0x7365
mov byte [ebp - 0x16], 0x73
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0xf
mov byte [ebp - 0x38], 0
call fcn.10005ce0
mov dword [ebp - 4], 0
lea edx, [ebp - 0x38]
cmp dword [ebp - 0x24], 0x10
cmovae edx, dword [ebp - 0x38]
sub esp, 0x18
mov esi, esp
mov ecx, edx
lea eax, [ecx + 1]
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [ebp - 0x14], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100122b8
sub ecx, dword [ebp - 0x14]
push ecx
push edx
mov ecx, esi
call fcn.10001d80
call fcn.10011fc0
mov dword [ebp - 4], 0xffffffff
add esp, 0x18
mov ecx, dword [ebp - 0x24]
mov esi, eax
cmp ecx, 0x10
jb 0x10012312
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10012308
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10012308
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100189ba
add esp, 8
push edi
push 0
push 1
call esi
mov esi, eax
test esi, esi
je 0x100123fd
movaps xmm0, xmmword [0x1001eee0]
lea eax, [ebp - 0x48]
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 0
sub ecx, eax
mov dword [ebp - 0x28], 0
push ecx
push eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x24], 0xf
movups xmmword [ebp - 0x48], xmm0
mov byte [ebp - 0x38], 0
call fcn.10005ce0
mov dword [ebp - 4], 1
lea edx, [ebp - 0x38]
cmp dword [ebp - 0x24], 0x10
cmovae edx, dword [ebp - 0x38]
sub esp, 0x18
mov edi, esp
mov ecx, edx
lea eax, [ecx + 1]
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [ebp - 0x14], eax
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10012390
sub ecx, dword [ebp - 0x14]
push ecx
push edx
mov ecx, edi
call fcn.10001d80
call fcn.10011fc0
mov dword [ebp - 4], 0xffffffff
add esp, 0x18
mov ecx, dword [ebp - 0x24]
mov edi, eax
cmp ecx, 0x10
jb 0x100123ea
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x100123e0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x100123e0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100189ba
add esp, 8
push 0
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x100123ff
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10018459
mov esp, ebp
pop ebp
ret
Function at 0x10012b20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x10012b4c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x10012b74
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x10012b7a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x10012be2
jg 0x10012b91
test esi, esi
je 0x10012be2
test ecx, ecx
jl 0x10012bdd
jg 0x10012b9b
test eax, eax
je 0x10012bdd
cmp edi, ecx
jg 0x10012baf
jl 0x10012ba5
cmp esi, eax
jae 0x10012baf
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x10012be5
mov ecx, dword [ebp + 8]
jmp 0x10012bef
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x10012c09
jg 0x10012bef
test esi, esi
je 0x10012c09
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x10012c09
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10012c20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x10012c4c
jl 0x10012c40
test ecx, ecx
jne 0x10012c4c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x10012c65
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x10012cb3
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x10012cb9
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x10012cb9
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x10012d26
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x10012ce2
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x10012d14
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x10012d26
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x10012cf0
test edi, edi
je 0x10012d26
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x100130a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x10027008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x100130d0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10018459
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x10013100
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x10013100
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10018459
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x100131d8
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x10013129
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x10013135
movsx eax, bl
jmp 0x1001316d
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x10013197
sub eax, 1
je 0x10013197
sub eax, 2
jne 0x100131d8
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10018459
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x100131b5
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x100131d8
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10018459
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10018459
mov esp, ebp
pop ebp
ret 4