joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100315c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, ecx
mov ecx, 0x100845f5
call fcn.10048d85
cmp dword [edi + 0x38], 0
je 0x100315f8
push dword [ebp + 0x10]
mov ecx, edi
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__::xsgetn_char___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi + 0x1c]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
test eax, eax
je 0x1003161a
mov eax, dword [edi + 0x2c]
mov eax, dword [eax]
jmp 0x1003161c
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test ebx, ebx
jl 0x100316bc
jg 0x10031639
test esi, esi
je 0x100316bc
test ecx, ecx
jl 0x10031686
jg 0x10031643
test eax, eax
je 0x10031686
cmp ebx, ecx
jg 0x10031657
jl 0x1003164d
cmp esi, eax
jae 0x10031657
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
push eax
push dword [esp + 0x18]
push dword [ebp + 8]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [edi + 0x2c]
add edx, ecx
sub esi, ecx
mov dword [esp + 0xc], edx
sbb ebx, dword [esp + 0x10]
sub dword [eax], ecx
mov eax, dword [edi + 0x1c]
add dword [eax], ecx
jmp 0x1003168d
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
test ebx, ebx
jl 0x100316bc
jg 0x10031697
test esi, esi
je 0x100316bc
cmp dword [edi + 0x4c], 0
je 0x100316bc
mov ecx, edi
call fcn.10032900
push dword [edi + 0x4c]
push esi
push 1
push dword [esp + 0x18]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
sub esi, eax
sbb ebx, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
pop edi
pop esi
sbb edx, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10031a70
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x30
mov eax, dword [0x1007f008]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
push esi
mov esi, ecx
mov ecx, 0x100845f5
call fcn.10048d85
mov ebx, dword [esp + 0x3c]
cmp ebx, 0xffffffff
jne 0x10031aaa
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.10046cee
add esp, 0x30
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x10031add
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x10031add
mov ecx, esi
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 [esp + 0x2c]
xor ecx, esp
call fcn.10046cee
add esp, 0x30
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x10031be3
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x10031b06
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 0x10031b3b
push dword [esi + 0x4c]
movsx eax, bl
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 [esp + 0x2c]
xor ecx, esp
call fcn.10046cee
add esp, 0x30
ret 4
lea eax, [esp + 0xc]
mov byte [esp + 0x17], bl
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x2b]
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]
test eax, eax
js 0x10031be3
cmp eax, 1
jle 0x10031b9f
cmp eax, 3
jne 0x10031be3
mov edx, dword [esi + 0x4c]
mov cl, byte [esp + 0x17]
call fcn.10030700
or ecx, 0xffffffff
test al, al
pop edi
cmovne ecx, ebx
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.10046cee
add esp, 0x30
ret 4
mov edi, dword [esp + 0xc]
lea eax, [esp + 0x18]
sub edi, eax
je 0x10031bbf
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 0x10031be3
lea eax, [esp + 0x17]
mov byte [esi + 0x3d], 1
cmp dword [esp + 0x10], eax
je 0x10031be3
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.10046cee
add esp, 0x30
ret 4
mov ecx, dword [esp + 0x38]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10046cee
add esp, 0x30
ret 4
Function at 0x10032970
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x28
mov eax, dword [0x1007f008]
xor eax, esp
mov dword [esp + 0x24], eax
push esi
mov esi, ecx
mov ecx, 0x100845f5
push edi
call fcn.10048d85
cmp dword [esi + 0x38], 0
je 0x10032a28
cmp byte [esi + 0x3d], 0
je 0x10032a28
mov eax, dword [esi]
mov ecx, esi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x100329d9
mov ecx, dword [esi + 0x38]
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x100329ec
sub eax, 1
je 0x100329f0
sub eax, 2
je 0x10032a28
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.10046cee
add esp, 0x28
ret
mov byte [esi + 0x3d], 0
mov edi, dword [esp + 8]
lea eax, [esp + 0xc]
sub edi, eax
je 0x10032a10
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 0x100329d9
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.10046cee
add esp, 0x28
ret
mov ecx, dword [esp + 0x2c]
mov al, 1
pop edi
pop esi
xor ecx, esp
call fcn.10046cee
add esp, 0x28
ret
Function at 0x10035e80
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x414]
sub esp, 0x414
push 0xfffffffffffffffe
push 0x10077340
push 0x100477f6
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x1007f008]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x410], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, edx
mov edi, ecx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], esi
mov ecx, 0x10084fe6
call fcn.10048d85
mov dword [ebp - 4], 0
mov dword [esi + 0x10], 0
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x10035ef0
mov eax, dword [esi]
xor ecx, ecx
mov word [eax], cx
mov edx, esi
mov ecx, edi
call fcn.10035fd0
mov bl, al
mov byte [ebp - 0x19], bl
mov dword [ebp - 4], 0xfffffffe
jmp 0x10035f27
test bl, bl
jne 0x10035f9c
cmp edi, 0x1a
jne 0x10035f9c
mov dword [esi + 0x10], 0
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x10035f41
mov eax, dword [esi]
xor ecx, ecx
mov word [eax], cx
push 0x410
push ecx
lea eax, [ebp]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x207
lea eax, [ebp]
push eax
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [ebp]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10035f72
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp]
push eax
mov ecx, esi
call fcn.100082e0
movzx ebx, bl
mov eax, 1
cmp dword [esi + 0x10], 0
cmovne ebx, eax
mov al, bl
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x410]
xor ecx, ebp
call fcn.10046cee
lea esp, [ebp + 0x414]
pop ebp
ret
Function at 0x100361a0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100559ef
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x1007f008]
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, edx
mov edi, ecx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x34], edi
mov ecx, 0x10084fe6
mov dword [ebp - 0x30], 0
call fcn.10048d85
cmp dword [esi + 0x14], 8
mov edx, esi
jb 0x100361f0
mov edx, dword [esi]
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x1003620e
mov eax, edx
nop dword [eax]
cmp word [eax], 0x25
je 0x10036242
add eax, 2
sub ecx, 1
jne 0x10036200
push esi
mov ecx, edi
call fcn.10006db0
mov dword [ebp - 4], 0
mov dword [ebp - 0x30], 1
mov eax, edi
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.10046cee
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x1003620e
sub eax, edx
sar eax, 1
cmp eax, 0xffffffff
je 0x1003620e
push esi
lea ecx, [ebp - 0x28]
call fcn.10006db0
mov dword [ebp - 4], 1
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x10036269
mov eax, dword [esi]
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
test ebx, ebx
jne 0x100362a0
push esi
mov ecx, edi
call fcn.10006db0
mov dword [ebp - 0x30], 1
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x28]
call fcn.100080f0
mov dword [ebp - 4], ebx
mov dword [ebp - 4], ebx
jmp 0x10036224
xor ecx, ecx
lea eax, [ebx + 2]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100477ed
add esp, 4
mov dword [ebp - 0x2c], eax
cmp dword [esi + 0x14], 8
jb 0x100362c7
mov esi, dword [esi]
lea ecx, [ebx + 1]
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, dword [ebp - 0x2c]
test eax, eax
je 0x10036309
cmp eax, ebx
ja 0x10036309
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100362f0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.100082e0
push esi
call fcn.100474d0
add esp, 4
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call fcn.10006be0
mov dword [ebp - 0x30], 1
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x28]
call fcn.100080f0
mov dword [ebp - 4], 0
mov dword [ebp - 4], 0
jmp 0x10036224
Function at 0x10039760
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100568b8
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, dword [0x1007f008]
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 edi, dword [ebp + 8]
mov ecx, 0x10084fe6
call fcn.10048d85
mov eax, dword [esi]
test eax, eax
je 0x100397ad
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0
lea ecx, [ebp - 0x14]
mov word [esi + 4], 0
mov dword [ebp - 0x14], 0
call fcn.10045170
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x14]
cmp dword [eax], 0
je 0x100397d6
add eax, 8
jmp 0x100397d8
xor eax, eax
cmp dword [edi + 0x10], 0
je 0x100397e8
cmp dword [edi + 0x14], 8
jb 0x100397ea
mov edi, dword [edi]
jmp 0x100397ea
xor edi, edi
push edi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi], eax
test eax, eax
je 0x1003980b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1003980b
mov byte [esi + 5], 1
cmp dword [esi], 0
setne bl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.10045250
mov al, bl
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.10046cee
mov esp, ebp
pop ebp
ret 4

Function at 0x1003d740
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [0x1007f008]
xor eax, esp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x18]
push ebx
push ebp
push esi
mov ebp, ecx
mov dword [esp + 0xc], eax
push edi
mov edi, dword [esp + 0x20]
mov ecx, 0x10084fe6
call fcn.10048d85
mov esi, dword [esp + 0x24]
xor ebx, ebx
cmp dword [ebp + 0x10], 0xffffffff
je 0x1003d7c2
mov ecx, 0x100000
nop dword [eax + eax]
cmp esi, 0x100000
mov dword [esp + 0x14], 0
push 0
mov eax, esi
cmova eax, ecx
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x14]
add ebx, ecx
test eax, eax
je 0x1003d7c2
test ecx, ecx
je 0x1003d7be
add edi, ecx
sub esi, ecx
mov ecx, 0x100000
jne 0x1003d780
xor eax, eax
jmp 0x1003d7c7
mov eax, 1
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x1003d7d1
mov dword [ecx], ebx
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10046cee
add esp, 0xc
ret 0xc
Function at 0x1003eda0
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10057f6f
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x1007f008]
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, edx
mov edi, ecx
mov ecx, 0x10084fe6
call fcn.10048d85
cmp esi, 0xffffffff
jne 0x1003ede2
xor al, al
jmp 0x1003ee59
and esi, 0xffffb1af
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x1003edf2
mov eax, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
push eax
call ebx
test eax, eax
je 0x1003ee04
mov al, 1
jmp 0x1003ee59
lea ecx, [ebp - 0x28]
call fcn.10006d30
mov dword [ebp - 4], 0
lea edx, [ebp - 0x28]
mov ecx, edi
call fcn.1003f510
test al, al
je 0x1003ee38
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push esi
cmovae eax, dword [ebp - 0x28]
push eax
call ebx
test eax, eax
je 0x1003ee38
mov bl, 1
jmp 0x1003ee3a
xor bl, bl
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x28]
call fcn.100080f0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov al, bl
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.10046cee
mov esp, ebp
pop ebp
ret

Function at 0x1003ee80
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10057fd6
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x1007f008]
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, ecx
mov ecx, 0x10084fe6
call fcn.10048d85
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x1003eec0
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1003ef44
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 3
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 4
lea edx, [ebp - 0x28]
mov ecx, edi
call fcn.1003f510
test al, al
je 0x1003ef27
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x28]
call fcn.100080f0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov eax, esi
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.10046cee
mov esp, ebp
pop ebp
ret
Function at 0x1003f180
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005813c
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x1007f008]
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 ecx, 0x10084fe6
call fcn.10048d85
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x1003f1c1
mov eax, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call edi
test eax, eax
je 0x1003f1d5
mov al, 1
jmp 0x1003f30f
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x1003f1df
mov eax, dword [esi]
push eax
lea ecx, [ebp - 0x28]
call fcn.10006c80
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.1003ee80
mov ebx, eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.100080f0
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
cmp ebx, 0xffffffff
jne 0x1003f228
xor al, al
jmp 0x1003f30f
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x1003f232
mov eax, dword [esi]
push eax
lea ecx, [ebp - 0x28]
call fcn.10006c80
mov dword [ebp - 4], 5
xor edx, edx
lea ecx, [ebp - 0x28]
call fcn.1003eda0
mov bl, al
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x28]
call fcn.100080f0
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
test bl, bl
je 0x1003f221
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x1003f27c
mov eax, dword [esi]
push eax
call edi
test eax, eax
jne 0x1003f1ce
lea ecx, [ebp - 0x28]
call fcn.10006d30
mov dword [ebp - 4], 0xa
lea edx, [ebp - 0x28]
mov ecx, esi
call fcn.1003f510
test al, al
je 0x1003f2ba
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call edi
test eax, eax
je 0x1003f2ba
mov bl, 1
jmp 0x1003f2f0
cmp dword [esi + 0x14], 8
jb 0x1003f2c2
mov esi, dword [esi]
push esi
lea ecx, [ebp - 0x48]
call fcn.10006c80
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x48]
mov edx, dword [ebp - 0x30]
call fcn.1003eda0
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x48]
call fcn.100080f0
mov byte [ebp - 4], 0xa
mov byte [ebp - 4], 0xa
xor bl, bl
mov dword [ebp - 4], 0x14
lea ecx, [ebp - 0x28]
call fcn.100080f0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov al, bl
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.10046cee
mov esp, ebp
pop ebp
ret
Function at 0x1003f670
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x120]
sub esp, 0x120
push 0xffffffffffffffff
push 0x10058275
mov eax, dword fs:[0]
push eax
push ecx
mov eax, dword [0x1007f008]
xor eax, ebp
mov dword [ebp + 0x11c], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov ecx, 0x10084fe6
mov dword [ebp - 0x10], esi
call fcn.10048d85
mov dword [ebp - 4], 0
push 1
call fcn.10046cff
mov dword [esi], eax
push 0x118
push 0
mov byte [eax], 0
lea eax, [ebp + 4]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov dword [ebp], 0x11c
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x1003f6fd
cmp dword [ebp + 4], 6
mov ecx, dword [esi]
setae dl
mov byte [ecx], dl
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp + 0x11c]
xor ecx, ebp
call fcn.10046cee
lea esp, [ebp + 0x120]
pop ebp
ret
Function at 0x10045c40
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [0x1007f008]
xor eax, esp
mov dword [esp + 4], eax
push esi
mov esi, ecx
mov ecx, 0x10084fe6
push edi
mov edi, dword [esp + 0x14]
call fcn.10048d85
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x10045cb1
lea ecx, [esp + 8]
mov dword [esp + 8], 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10045c8c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10045cb1
mov eax, dword [esp + 8]
xor ecx, ecx
add ecx, esi
mov dword [edi], ecx
adc eax, 0
mov dword [edi + 4], eax
mov al, 1
pop edi
pop esi
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.10046cee
add esp, 8
ret 4
mov ecx, dword [esp + 0xc]
xor al, al
pop edi
pop esi
xor ecx, esp
call fcn.10046cee
add esp, 8
ret 4
Function at 0x10046410
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100594a8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x1007f008]
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 edi, ecx
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x24], ecx
mov ecx, 0x10084fe6
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x2c], ebx
call fcn.10048d85
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x10046466
mov dword [eax], 0
mov dword [ebx], 0
cmp dword [edi], 0xffffffff
je 0x100465bb
mov eax, dword [ebp + 0xc]
mov ecx, 0x100000
nop dword [eax]
push 0
mov ebx, eax
mov dword [ebp - 0x1c], 0
cmp eax, 0x100000
lea eax, [ebp - 0x1c]
push eax
cmova ebx, ecx
push ebx
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, 0x7fffbffb
add eax, 0x80004005
cmp dword [edi + 0x1c], 0
je 0x10046586
test eax, eax
je 0x10046586
mov edx, dword [ebp - 0x1c]
cmp edx, ebx
jae 0x10046589
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi]
mov dword [ebp - 0x28], eax
cmp ecx, 0xffffffff
je 0x1004650b
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x100464ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1004650b
mov eax, dword [ebp - 0x14]
xor ecx, ecx
add ecx, esi
adc eax, 0
jmp 0x10046519
xorps xmm0, xmm0
movlpd qword [ebp - 0x38], xmm0
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
push 0
push dword [ebp - 0x28]
push eax
push ecx
sub esp, 0x18
lea eax, [edi + 4]
mov ecx, esp
mov dword [ebp - 0x28], esp
push eax
call fcn.10006db0
mov dword [ebp - 4], 0
mov ecx, dword [edi + 0x1c]
mov eax, dword [ecx]
mov dword [ebp - 4], 0xffffffff
call dword [eax + 0x18]
mov esi, dword [ebp - 0x20]
test eax, eax
jne 0x10046586
push eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x1c]
push ebx
add eax, esi
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
xor edx, edx
test ecx, ecx
mov eax, 0x80004005
cmovne eax, edx
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edx
test ecx, ecx
je 0x100464c4
jmp 0x10046589
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
add dword [ecx], edx
test eax, eax
jne 0x100465b2
test edx, edx
je 0x100465ae
mov eax, dword [ebp + 0xc]
add esi, edx
sub eax, edx
mov dword [ebp - 0x20], esi
mov dword [ebp + 0xc], eax
mov ecx, 0x100000
jne 0x10046480
mov al, 1
jmp 0x100465bd
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x100465bb
mov dword [ecx], eax
xor al, al
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.10046cee
mov esp, ebp
pop ebp
ret 0x10