joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404230
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x1c]
push ebx
sub esp, 0x4c
mov eax, dword [ebp + 0x14]
mov ebx, dword [sym.imp.advapi32.dll_RegQueryValueExW]
mov dword [eax], 0
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp], eax
call ebx
sub esp, 0x18
test eax, eax
je 0x4042a8
mov edi, eax
cmp eax, 2
je 0x404380
xor ecx, ecx
test byte [0x419040], 2
jne 0x4042c8
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x1c]
cmp eax, 1
je 0x404308
cmp eax, 2
jne 0x4042bc
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x404308
mov edi, 0x70c
jmp 0x404287
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2c], ecx
call sym._wine_dbgstr_wn.constprop.0_2
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], str.Error__ld_while_reading_value__s_n
mov dword [esp + 8], str.load_reg_string
mov dword [esp + 4], 0x419040
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_2
mov ecx, dword [ebp - 0x2c]
jmp 0x404292
mov eax, dword [ebp - 0x20]
add eax, 2
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x30], eax
call eax
mov dword [esp + 0xc], esi
mov ecx, eax
lea eax, [ebp - 0x20]
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], ecx
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], ecx
mov dword [esp], eax
call ebx
mov ecx, dword [ebp - 0x2c]
sub esp, 0x18
test eax, eax
mov edi, eax
jne 0x404289
mov eax, dword [ebp - 0x20]
xor edx, edx
and eax, 0xfffffffe
cmp dword [ebp - 0x1c], 2
mov word [ecx + eax], dx
je 0x404390
mov eax, dword [ebp + 0x14]
mov dword [eax], ecx
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
xor edi, edi
pop ebx
mov eax, edi
pop esi
pop edi
pop ebp
ret
mov dword [esp], ecx
mov esi, dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call esi
mov ecx, dword [ebp - 0x2c]
sub esp, 0xc
test eax, eax
mov dword [ebp - 0x20], eax
mov ebx, eax
jne 0x4043d0
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
jmp 0x404289
add eax, eax
mov dword [ebp - 0x2c], ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x30]
call eax
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [ebp - 0x30], eax
call esi
mov ecx, dword [ebp - 0x2c]
sub esp, 0xc
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x30]
mov dword [eax], edx
jmp 0x40429b
Function at 0x404410
Capabilities:
Get process heap force flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov dword [esp], 1
call sym.__configure_narrow_argv
call sym.__initialize_narrow_environment
call sym.___p___argc
mov esi, dword [eax]
call sym.___p___argv
mov edi, dword [eax]
call sym.__get_initial_narrow_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
inc eax
mov dword [esp], eax
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._main
mov dword [esp], eax
call sym._exit
nop
nop
Function at 0x405600
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov esi, dword [ebp + 8]
mov edi, dword [esi + 8]
lea eax, [edi + 0x18]
add edi, 0x10
mov dword [ebp - 0x1c], eax
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
sub esp, 4
mov dword [esp + 4], 0
mov eax, dword [esi + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TerminateProcess]
mov ebx, dword [edi]
sub esp, 8
cmp edi, ebx
jne 0x40564e
jmp 0x405672
mov ebx, dword [ebx]
cmp ebx, edi
je 0x405672
cmp dword [ebx + 0x68], esi
jne 0x405648
mov dword [ebx + 0x18], 1
mov dword [ebx + 0x68], 0
dec dword [esi + 0x10]
mov dword [esp], esi
call sym._release_process
mov ebx, dword [ebx]
cmp ebx, edi
jne 0x40564e
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x405690
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, eax
sub esp, 0x34
test ecx, ecx
je 0x4056ec
cmp word [ecx], 0
mov eax, ecx
je 0x40570d
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4056a8
add eax, 2
cmp word [eax], 0
jne 0x4056a8
sub eax, ecx
add eax, 2
mov dword [esp], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 7
mov dword [esp + 8], 0
mov dword [esp + 4], edx
call dword [sym.imp.advapi32.dll_RegSetValueExW]
mov esi, dword [ebp - 4]
sub esp, 0x18
leave
ret
mov dword [ebp - 0xc], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteValueW]
mov ecx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
sub esp, 8
cmp eax, 2
leave
cmove eax, ecx
ret
mov eax, 2
jmp 0x4056bf

Function at 0x405720
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, eax
sub esp, 0x34
test ecx, ecx
je 0x405778
cmp word [ecx], 0
mov eax, ecx
je 0x4057a0
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x405738
sub eax, ecx
add eax, 2
mov dword [esp], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], edx
call dword [sym.imp.advapi32.dll_RegSetValueExW]
mov esi, dword [ebp - 4]
sub esp, 0x18
leave
ret
mov dword [ebp - 0xc], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteValueW]
mov ecx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
sub esp, 8
cmp eax, 2
leave
cmove eax, ecx
ret
mov eax, 2
jmp 0x405746
Function at 0x405850
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [ebp + 8]
mov edi, dword [ebx + 8]
lea esi, [edi + 0x18]
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
sub esp, 4
lock dec dword [ebx + 0xc]
jne 0x40587b
mov eax, dword [ebx + 0x74]
test eax, eax
jne 0x405890
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 0x10]
mov dword [esp + 4], eax
mov eax, dword [edi]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegDeleteTreeW]
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
sub esp, 8
mov dword [edx + 4], eax
mov edx, dword [ebx]
mov dword [eax], edx
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [esp], ebx
call sym._free_service_entry
jmp 0x40587b
Function at 0x24804a90
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
pushal
call 0x24804a9f
pop dword [ebp - 0x38]
mov eax, 0x682b2031
sub eax, 0x43aad592
sub dword [ebp - 0x38], eax
push 0x40
push 0x1000
push 0x36244
push 0
mov eax, 0x9c91e8f8
add eax, 0x87ef5a28
add eax, dword [ebp - 0x38]
call dword [eax]
mov ecx, 0x81e3b9c8
add ecx, 0x7e1c8b96
mov esi, eax
mov edi, 0x2482be00
add edi, dword [ebp - 0x38]
mov edx, 0x9236046e
xor dword [ebp - 0x30], 0x64ef9299
mov ebx, dword [edi]
sub dword [ebp - 0x18], 0xd6224995
sub ebx, edx
xor dword [ebp - 0x28], 0xac18c1ce
mov dword [esi], ebx
sub dword [ebp - 0x30], 0xdbe19be5
add esi, 4
add edi, 0x82ed0958
sub edi, 0x82ed0954
loop 0x24804af2
add eax, 0xe0e6eda5
sub eax, 0xe0e5e55a
xor ebx, ebx
add ebx, eax
add eax, 0xe85235f5
add eax, 0x17adca10
mov ecx, 0xb25a8e75
add ecx, 0x7224718b
add ecx, dword [ebp - 0x38]
call ebx
leave
ret

Function at 0x24804da0
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push esi
call fcn.24805660
call dword [sym.imp.kernel32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x2480e480], eax
je 0x24804df8
push 0x74
push 1
call fcn.24807430
mov esi, eax
add esp, 8
test esi, esi
je 0x24804df8
mov eax, dword [0x2480e480]
push esi
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
test eax, eax
je 0x24804df8
push esi
call fcn.24804e30
add esp, 4
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret

Function at 0x24804e50
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push edi
call dword [sym.imp.kernel32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x2480e480]
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x24804ebe
push 0x74
push 1
call fcn.24807430
mov esi, eax
add esp, 8
test esi, esi
je 0x24804eb4
mov ecx, dword [0x2480e480]
push esi
push ecx
call dword [sym.imp.kernel32.dll_TlsSetValue]
test eax, eax
je 0x24804eb4
push esi
call fcn.24804e30
add esp, 4
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
push edi
mov dword [esi], eax
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.kernel32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
push 0x10
call fcn.248041a0
add esp, 4
push edi
call dword [sym.imp.kernel32.dll_SetLastError]
mov eax, esi
pop edi
pop esi
ret
Function at 0x24804ed0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov eax, dword [0x2480e480]
cmp eax, 0xffffffff
je 0x24804f7f
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x24804ef4
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x24804f70
mov eax, dword [esi + 0x24]
test eax, eax
je 0x24804f04
push eax
call fcn.248041e0
add esp, 4
mov eax, dword [esi + 0x28]
test eax, eax
je 0x24804f14
push eax
call fcn.248041e0
add esp, 4
mov eax, dword [esi + 0x30]
test eax, eax
je 0x24804f24
push eax
call fcn.248041e0
add esp, 4
mov eax, dword [esi + 0x38]
test eax, eax
je 0x24804f34
push eax
call fcn.248041e0
add esp, 4
mov eax, dword [esi + 0x40]
test eax, eax
je 0x24804f44
push eax
call fcn.248041e0
add esp, 4
mov eax, dword [esi + 0x44]
test eax, eax
je 0x24804f54
push eax
call fcn.248041e0
add esp, 4
mov eax, dword [esi + 0x50]
cmp eax, 0x24810888
je 0x24804f67
push eax
call fcn.248041e0
add esp, 4
push esi
call fcn.248041e0
add esp, 4
mov eax, dword [0x2480e480]
push 0
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
pop esi
ret

Function at 0x248058f0
Capabilities:
Terminate process

Disassembly:
push ebx
push ebp
push esi
call fcn.248059b0
mov eax, dword [0x24811a1c]
mov ebp, dword [esp + 0x10]
cmp eax, 1
jne 0x24805914
push ebp
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.kernel32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x24811a18], 1
mov byte [0x24811a14], bl
jne 0x2480596e
mov ecx, dword [0x24813008]
test ecx, ecx
je 0x2480595c
mov esi, dword [0x24813004]
sub esi, 4
cmp esi, ecx
jb 0x2480595c
mov eax, dword [esi]
test eax, eax
je 0x24805955
call eax
mov ecx, dword [0x24813008]
sub esi, 4
cmp esi, ecx
jae 0x24805947
push 0x2480e028
push 0x2480e020
call fcn.248059d0
add esp, 8
push 0x2480e034
push 0x2480e02c
call fcn.248059d0
add esp, 8
test ebx, ebx
je 0x2480598d
call fcn.248059c0
pop esi
pop ebp
pop ebx
ret
push ebp
mov dword [0x24811a1c], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
Function at 0x24809880
Capabilities:
Get geographical location

Disassembly:
mov eax, dword [0x24811ed0]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.kernel32.dll_GetLocaleInfoA]
push edi
test eax, eax
jne 0x248098c8
push 0
push 0
push 1
push 0
call dword [sym.imp.kernel32.dll_GetLocaleInfoW]
test eax, eax
je 0x248098ac
mov eax, 1
jmp 0x248098c3
push 0
push 0
push 1
push 0
call esi
test eax, eax
je 0x248099a8
mov eax, 2
mov dword [0x24811ed0], eax
cmp eax, 2
jne 0x248098e8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
call esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 1
jne 0x248099ba
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x24809903
mov ecx, dword [0x248119d8]
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
push 0
push 0
push ebx
push ebp
call dword [sym.imp.kernel32.dll_GetLocaleInfoW]
mov edi, eax
test edi, edi
jne 0x24809922
pop edi
pop esi
pop ebp
pop ebx
ret
lea edx, [edi + edi]
push edx
call fcn.24804250
mov esi, eax
add esp, 4
test esi, esi
jne 0x24809939
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
push esi
push ebx
push ebp
call dword [sym.imp.kernel32.dll_GetLocaleInfoW]
test eax, eax
je 0x2480999f
mov eax, dword [esp + 0x20]
push 0
test eax, eax
push 0
jne 0x24809980
mov eax, dword [esp + 0x2c]
push 0
push 0
push 0xffffffffffffffff
push esi
push 0x220
push eax
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x2480999f
push esi
call fcn.248041e0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
push eax
push ecx
push 0xffffffffffffffff
push esi
push 0x220
push edx
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
jne 0x248099af
push esi
call fcn.248041e0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call fcn.248041e0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x402ee0
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 0x402f0c
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 0x402f34
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x402f3a
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 0x402fa2
jg 0x402f51
test esi, esi
je 0x402fa2
test ecx, ecx
jl 0x402f9d
jg 0x402f5b
test eax, eax
je 0x402f9d
cmp edi, ecx
jg 0x402f6f
jl 0x402f65
cmp esi, eax
jae 0x402f6f
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 0x402fa5
mov ecx, dword [ebp + 8]
jmp 0x402faf
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x402fc9
jg 0x402faf
test esi, esi
je 0x402fc9
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x402fc9
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 0x402fe0
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 0x40300c
jl 0x403000
test ecx, ecx
jne 0x40300c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x403025
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 0x403073
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x403079
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 0x403079
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x4030e6
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x4030a2
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 0x4030d4
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 0x4030e6
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x4030b0
test edi, edi
je 0x4030e6
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 0x403460
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x41b00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x403490
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412ed8
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x4034c0
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x4034c0
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.00412ed8
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x403598
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x4034e9
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 0x4034f5
movsx eax, bl
jmp 0x40352d
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 0x403557
sub eax, 1
je 0x403557
sub eax, 2
jne 0x403598
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.00412ed8
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x403575
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 0x403598
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.00412ed8
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.00412ed8
mov esp, ebp
pop ebp
ret 4
Function at 0x403c40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x41b00c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x403cfc
cmp byte [esi + 0x3d], 0
je 0x403cfc
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x403cea
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 0x403cb1
sub eax, 1
je 0x403cb5
sub eax, 2
jne 0x403cea
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412ed8
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x403cd3
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 0x403cea
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412ed8
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412ed8
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00412ed8
mov esp, ebp
pop ebp
ret

Function at 0x405640
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4143cd
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, dword [0x41b00c]
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
sub esp, 0x18
mov dword [ebp - 4], 0
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.004038e0
call fcn.00407ee0
add esp, 0x18
test al, al
je 0x4056bc
mov ebx, dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
xor edi, edi
cmp edi, 0x64
jge 0x4056ea
cmp dword [ebp + 0x1c], 0x10
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
call ebx
add esp, 4
mov esi, eax
inc edi
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
test esi, esi
jne 0x405694
mov bl, 1
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0x10
jb 0x4056f8
mov edx, dword [ebp + 8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4056ee
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4056ee
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
xor bl, bl
jmp 0x4056be
push ecx
push edx
call fcn.0041342f
add esp, 8
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.00412ed8
mov esp, ebp
pop ebp
ret