joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4021d0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbc
push ebx
xor ebx, ebx
push esi
push ebx
push 0x80
push 3
push ebx
push ebx
push ebx
push str..KmxAgent
mov dword [ebp - 0xb4], 0xb4
mov dword [ebp - 0xb0], 0x10
mov dword [ebp - 0xac], ebx
mov dword [ebp - 0xa8], ebx
mov dword [ebp - 0xa4], ebx
mov dword [ebp - 0xa0], ebx
mov dword [ebp - 0x9c], ebx
mov dword [ebp - 0x98], ebx
mov dword [ebp - 0x94], ebx
mov dword [ebp - 0x90], ebx
mov dword [ebp - 0x8c], 0x7b761e52
mov dword [ebp - 0x88], 0x1c94cc7
mov dword [ebp - 0x84], ebx
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x74], 1
mov dword [ebp - 0x70], 1
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], 1
mov dword [ebp - 0x64], 0x20000000
mov dword [ebp - 0x60], 0x1210064
mov dword [ebp - 0x5c], 0x22
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], 0x4d0007
mov dword [ebp - 0x50], 0x730065
mov dword [ebp - 0x4c], 0x610073
mov dword [ebp - 0x48], 0x650067
mov dword [ebp - 0x44], 0x420000
mov dword [ebp - 0x40], 0xb0022
mov dword [ebp - 0x3c], 0x490000
mov dword [ebp - 0x38], 0x530053
mov dword [ebp - 0x34], 0x560045
mov dword [ebp - 0x30], 0x4e0045
mov dword [ebp - 0x2c], 0x490054
mov dword [ebp - 0x28], 0x3d0044
mov dword [ebp - 0x24], 0x300034
mov dword [ebp - 0x20], 0x320030
mov dword [ebp - 0x1c], 0x650000
mov dword [ebp - 0x18], 0x70006d
mov dword [ebp - 0x14], 0x790074
mov dword [ebp - 0x10], 0x45003d
mov dword [ebp - 0xc], 0x70006d
mov dword [ebp - 8], 0x790074
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402350
push ebx
lea eax, [ebp - 0xbc]
push eax
push 4
lea ecx, [ebp - 0xb8]
push ecx
push 0xb4
lea edx, [ebp - 0xb4]
push edx
push 0x86000054
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402360
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
xor ebx, ebx
push esi
push ebx
push 0x80000080
xor eax, eax
push 3
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
push 3
push 0xc0000000
push str..pipe_acsipc_server
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x60], 0xd48a445e
mov dword [ebp - 0x5c], 0x466e1597
mov dword [ebp - 0x58], 0x327416ba
mov dword [ebp - 0x54], 0x68ccde15
mov dword [ebp - 0x50], 5
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], 0x11
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], 0x11
mov dword [ebp - 0x38], 0xb5cb6c63
mov dword [ebp - 0x34], 0x46df52db
mov dword [ebp - 0x30], 0x65aa6b83
mov dword [ebp - 0x2c], 0x229bf18e
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402444
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea ecx, [ebp - 4]
push ecx
push 0x28
lea edx, [ebp - 0x60]
push edx
push esi
call edi
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
push ebx
lea eax, [ebp - 4]
push eax
mov dword [ebp - 0x23], ecx
push 0x1c
lea ecx, [ebp - 0x38]
push ecx
push esi
mov dword [ebp - 0x1f], edx
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x402450
Capabilities:
Get common file path
Get program files directory
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
lea eax, [ebp - 0x104]
push eax
push 0
push 0
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
cmp eax, 1
je 0x402535
xor eax, eax
lea esp, [esp]
mov cl, byte [ebp + eax - 0x104]
mov byte [ebp + eax - 0x208], cl
inc eax
test cl, cl
jne 0x402480
lea eax, [ebp - 0x104]
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4024a0
mov ecx, dword [str.AVGAVG9dfncfg.dat]
mov edx, dword [0x404e0c]
mov dword [eax], ecx
mov ecx, dword [0x404e10]
mov dword [eax + 4], edx
mov edx, dword [0x404e14]
mov dword [eax + 8], ecx
mov ecx, dword [0x404e18]
mov dword [eax + 0xc], edx
mov dl, byte [0x404e1c]
mov dword [eax + 0x10], ecx
mov byte [eax + 0x14], dl
lea eax, [ebp - 0x208]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4024e4
mov ecx, dword [str.AVGAVG9dfmcfg.dat]
mov edx, dword [0x404e24]
mov dword [eax], ecx
mov ecx, dword [0x404e28]
mov dword [eax + 4], edx
mov edx, dword [0x404e2c]
mov dword [eax + 8], ecx
mov ecx, dword [0x404e30]
mov dword [eax + 0xc], edx
mov dl, byte [0x404e34]
mov dword [eax + 0x10], ecx
mov byte [eax + 0x14], dl
lea eax, [ebp - 0x208]
push eax
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov esp, ebp
pop ebp
ret
Function at 0x402540
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
lea eax, [ebp - 0x10c]
push eax
push 0
push 0
push 0x23
push 0
mov byte [ebp - 1], 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
cmp eax, 1
je 0x402670
lea eax, [ebp - 0x10c]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402572
mov ecx, dword [str.PrevxCSIcsidb.csi]
mov edx, dword [0x404e3c]
push esi
push 0
push 0x80
mov dword [eax], ecx
mov ecx, dword [0x404e40]
push 3
mov dword [eax + 4], edx
mov edx, dword [0x404e44]
push 0
mov dword [eax + 8], ecx
mov ecx, dword [0x404e48]
push 3
mov dword [eax + 0xc], edx
push 0xc0000000
lea edx, [ebp - 0x10c]
push edx
mov dword [eax + 0x10], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40266f
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0x17a8
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 8]
push eax
push 1
lea ecx, [ebp - 1]
push ecx
push esi
call ebx
push 0
push 0
push 0xb98
push esi
call edi
push 0
lea edx, [ebp - 8]
push edx
push 1
lea eax, [ebp - 1]
push eax
push esi
call ebx
push 0
push 0
push 0x17e4
push esi
call edi
push 0
lea ecx, [ebp - 8]
push ecx
push 1
lea edx, [ebp - 1]
push edx
push esi
call ebx
push 0
push 0
push 0x17dc
push esi
call edi
push 0
lea eax, [ebp - 8]
push eax
push 1
lea ecx, [ebp - 1]
push ecx
push esi
call ebx
push 0
push 0
push 0x3380
push esi
call edi
push 0
lea edx, [ebp - 8]
push edx
push 1
lea eax, [ebp - 1]
push eax
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x402930
Capabilities:
Get disk information
Persist via run registry key
Persist via winlogon helper dll registry key
Query environment variable
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0x102
push 0
push 0
push 0
push 0x4044b8
push 0x80000002
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0xff0ff
call edi
test eax, eax
jne 0x4029fd
push 0x104
lea ecx, [ebp - 0x10c]
push ecx
push 0x4044a8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea edx, [ebp - 0x10c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
push 0
push 0
push 0
push 0
lea eax, [ebp - 8]
push eax
push 0
push 0
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov edx, dword [ebp - 8]
push edx
push 0x4044b4
lea eax, [ebp - 0x10c]
push 0x104
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
mov eax, esi
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4029e0
sub eax, edx
mov edx, dword [ebp - 4]
inc eax
push eax
push esi
push 1
push 0
lea ecx, [ebp - 0x10c]
push ecx
push edx
jmp 0x402a3e
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0x102
push 0
push 0
push 0
push 0x4044f0
push 0x80000001
call edi
test eax, eax
jne 0x402a44
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402a25
mov ecx, dword [ebp - 4]
sub eax, edx
inc eax
push eax
push esi
push 1
push 0
push 0x404520
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 4]
pop edi
test eax, eax
je 0x402a5d
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esp, ebp
pop ebp
ret
Function at 0x402d30
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
push edi
push 0x404f2c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call fcn.00403a20
test eax, eax
je 0x402d6c
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.004021d0
call fcn.004020e0
push 0
push str.____AVP.Root
call dword [sym.imp.USER32.dll_FindWindowA]
mov esi, eax
test esi, esi
je 0x402da1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push 0x10001
push 0x466
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
call fcn.00402360
call fcn.00402450
call fcn.00402540
call fcn.00402680
mov ebx, dword [sym.imp.SHELL32.dll_IsUserAnAdmin]
call ebx
test eax, eax
jne 0x402de3
call fcn.00401ea0
test eax, eax
je 0x402dd2
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.00403560
test eax, eax
je 0x402de3
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call ebx
push 0x404578
mov edi, eax
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x402e1c
push 0x404588
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x402e1c
lea ecx, [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
cmp dword [ebp - 8], 0
je 0x402e6e
test edi, edi
je 0x402e3c
push str._apppatch_
lea edx, [ebp - 0x10c]
push edx
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x402e5f
lea esi, [ebp - 0x10c]
call fcn.00402930
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call fcn.00401670
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402f58
call fcn.00402a70
call fcn.004012b0
jmp 0x402f58
test edi, edi
je 0x402efd
push str._apppatch_
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x402ea1
lea esi, [ebp - 0x10c]
call fcn.00402930
call fcn.004028d0
jmp 0x402f58
call fcn.00402a70
push 0x404eb0
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
test ax, ax
jne 0x402ef6
push 0x404eb0
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomA]
call ebx
test eax, eax
je 0x402ed7
lea ecx, [ebp - 1]
push ecx
push 0
push 1
push 0x14
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
call ebx
test eax, eax
mov eax, 0x404ecc
jne 0x402ee7
mov eax, 0x404edc
push eax
call fcn.004015a0
test eax, eax
je 0x402ef6
call fcn.00401670
call fcn.004012b0
jmp 0x402f58
lea esi, [ebp - 0x10c]
call fcn.00402930
push 0x404eb0
call dword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
test ax, ax
jne 0x402f58
push 0x404eb0
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomA]
call ebx
test eax, eax
je 0x402f39
lea edx, [ebp - 1]
push edx
push 0
push 1
push 0x14
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
call ebx
test eax, eax
mov eax, 0x404ecc
jne 0x402f49
mov eax, 0x404edc
push eax
call fcn.004015a0
test eax, eax
je 0x402f58
call fcn.00401670
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x4034c0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
push esi
lea eax, [ebp - 0x9c]
push eax
mov esi, 0x80004005
mov dword [ebp - 4], 0
mov dword [ebp - 0x9c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40354d
cmp dword [ebp - 0x8c], 2
jne 0x40354d
cmp dword [ebp - 0x98], 6
jb 0x40354d
lea ecx, [ebp - 4]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40354d
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push 4
push eax
push 0x12
push ecx
mov dword [ebp - 8], 0
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x403543
cmp dword [ebp - 8], 4
jne 0x403543
xor esi, esi
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x403a20
Capabilities:
Check for sandbox username or hostname
Get disk information
Get session user name
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x61c
push edi
lea eax, [ebp - 4]
push eax
push 0x101
push 0
push str.HARDWAREDESCRIPTIONSystem
push 0x80000002
mov dword [ebp - 0x14], 0x104
mov dword [ebp - 8], 0
mov edi, 1
mov dword [ebp - 0x10], 0x400
mov dword [ebp - 0xc], 7
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403acd
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x61c]
push edx
lea eax, [ebp - 0xc]
push eax
push 0
push str.SystemBiosVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x403a9b
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x403acd
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x61c], 0x51
jne 0x403acd
cmp byte [ebp - 0x61b], 0x45
jne 0x403acd
cmp byte [ebp - 0x61a], 0x4d
jne 0x403acd
cmp byte [ebp - 0x619], 0x55
je 0x403bec
push esi
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea edx, [ebp - 0x21c]
push edx
call dword [sym.imp.USER32.dll_CharUpperA]
mov esi, dword [sym.imp.MSVCRT.dll_strstr]
lea eax, [ebp - 0x21c]
push str.SANDBOX
push eax
call esi
add esp, 8
test eax, eax
jne 0x403beb
lea ecx, [ebp - 0x21c]
push str.MALNETVM
push ecx
call esi
add esp, 8
test eax, eax
jne 0x403beb
lea edx, [ebp - 0x21c]
push str.VIRUSCLONE
push edx
call esi
add esp, 8
test eax, eax
jne 0x403beb
push 0x104
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryA]
push 0
push 0
push 0
push 0
lea ecx, [ebp - 8]
push ecx
push 0
push 0
lea edx, [ebp - 0x118]
push edx
mov byte [ebp - 0x115], 0
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov eax, dword [ebp - 8]
cmp eax, 0xcd1a40
je 0x403beb
cmp eax, 0x6cbbc508
je 0x403beb
cmp eax, 0x774e1682
je 0x403beb
cmp eax, 0x837f873e
je 0x403beb
cmp eax, 0x8b6f64bc
je 0x403beb
push 0x104
lea eax, [ebp - 0x118]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [sym.imp.SHLWAPI.dll_StrStrIA]
push str._sand_box_
lea ecx, [ebp - 0x118]
push ecx
call esi
test eax, eax
jne 0x403beb
push str.cwsandbox_
lea edx, [ebp - 0x118]
push edx
call esi
test eax, eax
jne 0x403beb
push str._sandbox_
lea eax, [ebp - 0x118]
push eax
call esi
test eax, eax
jne 0x403beb
xor edi, edi
pop esi
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x403c00
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push esi
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
xor eax, 0xffffffff
test ecx, ecx
mov esi, dword [ebp + 8]
je 0x403c29
xor al, byte [esi]
movzx edx, al
shr eax, 8
mov edx, dword [edx*4 + section..data]
inc esi
xor eax, edx
dec ecx
jne 0x403c14
xor eax, 0xffffffff
pop esi
leave
ret 0xc
Function at 0x4015b2
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x4015e4
test dl, 7
je 0x4015e4
movzx ecx, byte [edx]
movzx eax, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [ecx*4 + 0x431ed0]
inc edx
mov dword [ebp + 0xc], edx
sub esi, 1
jne 0x4015c4
cmp esi, 8
jb 0x401674
push edi
mov edi, esi
shr edi, 3
xor ebx, dword [edx]
sub esi, 8
mov edx, dword [edx + 4]
mov ecx, edx
shr ecx, 0x18
mov eax, edx
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x431ed0]
xor ecx, dword [eax*4 + 0x4322d0]
mov eax, edx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4326d0]
mov eax, ebx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x432ed0]
mov eax, ebx
shr eax, 0x10
movzx eax, al
xor ecx, dword [eax*4 + 0x4332d0]
mov eax, ebx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4336d0]
movzx eax, dl
mov edx, dword [ebp + 0xc]
add edx, 8
mov dword [ebp + 0xc], edx
xor ecx, dword [eax*4 + 0x432ad0]
movzx eax, bl
xor ecx, dword [eax*4 + 0x433ad0]
mov ebx, ecx
sub edi, 1
jne 0x4015f3
pop edi
test esi, esi
je 0x401690
movzx ecx, byte [edx]
movzx eax, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [ecx*4 + 0x431ed0]
inc edx
sub esi, 1
jne 0x401678
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 0xc

Function at 0x401cb6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0xc], 1
jne 0x401ccf
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401d42
mov ecx, esi
call fcn.00401da3
test al, al
je 0x401d0a
mov eax, 0x4e20
cmp dword [ebp + 0xc], eax
jbe 0x401d0a
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.00401cb6
jmp 0x401d45
cmp dword [esi + 0xc], 1
jne 0x401d1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
jne 0x401d1f
xor eax, eax
jmp 0x401d45
cmp dword [esi + 0xc], 0
jne 0x401d3d
mov ebx, 0x8000
cmp dword [ebp + 0xc], ebx
jbe 0x401d3d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x21
jne 0x401d3d
push ebx
jmp 0x401cfe
or eax, 0xffffffff
jmp 0x401d45
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x401dce
Capabilities:
Check if file exists

Disassembly:
mov eax, 0x1054
call fcn.00412bc0
push ebx
mov ebx, dword [esp + 0x1060]
push ebp
push edi
mov edi, ecx
and dword [edi + 0x1020], 0
cmp byte [edi + 0x1d], 0
jne 0x401dfa
test bl, 4
jne 0x401dfa
xor cl, cl
jmp 0x401dfc
mov cl, 1
mov eax, ebx
shr eax, 1
push esi
and al, 1
movzx esi, al
neg esi
sbb esi, esi
and esi, 0xc0000000
add esi, 0x80000000
test bl, 1
je 0x401e21
or esi, 0x40000000
shr ebx, 3
not ebx
and ebx, 1
test cl, cl
je 0x401e30
or ebx, 2
xor eax, eax
lea ecx, [esp + 0x1c]
cmp byte [edi + 0x15], al
setne al
dec eax
and eax, 0x8000000
mov dword [esp + 0x10], eax
call fcn.00401a4d
cmp byte [edi + 0x1c], 0
je 0x401e57
or esi, 0x100
push 0
push dword [esp + 0x14]
push 3
push 0
push ebx
push esi
push dword [esp + 0x1080]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x401ed9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1c]
push 0x800
push eax
push dword [esp + 0x1070]
call fcn.004032e9
test al, al
je 0x401ec8
push 0
push dword [esp + 0x14]
lea eax, [esp + 0x24]
push 3
push 0
push ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x401ec3
mov dword [esp + 0x14], eax
cmp ebp, 0xffffffff
jne 0x401ed9
cmp dword [esp + 0x14], 2
jne 0x401ed9
mov dword [edi + 0x1020], 1
cmp byte [edi + 0x1c], 0
pop esi
je 0x401eff
cmp ebp, 0xffffffff
je 0x401eff
or dword [esp + 0x10], 0xffffffff
lea eax, [esp + 0x10]
or dword [esp + 0x14], 0xffffffff
push 0
push eax
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
xor eax, eax
cmp ebp, 0xffffffff
mov byte [edi + 0x12], al
setne bl
mov dword [edi + 0xc], eax
mov byte [edi + 0x10], al
cmp ebp, 0xffffffff
je 0x401f2d
push 0x800
push dword [esp + 0x1068]
lea ecx, [edi + 0x1e]
mov dword [edi + 4], ebp
push ecx
call fcn.004065e7
pop edi
pop ebp
mov al, bl
pop ebx
add esp, 0x1054
ret 8
Function at 0x40221e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, dword [esp + 0xc]
push edi
mov edi, ecx
test ebp, ebp
jne 0x402231
mov al, 1
jmp 0x40231f
cmp dword [edi + 0xc], 1
jne 0x402242
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [edi + 4], eax
push ebx
push esi
and dword [esp + 0x18], 0
xor bl, bl
cmp dword [edi + 0xc], 0
je 0x402297
xor esi, esi
test ebp, ebp
je 0x4022b9
mov eax, ebp
sub eax, esi
cmp eax, 0x4000
jb 0x402267
mov eax, 0x4000
push 0
lea ecx, [esp + 0x1c]
push ecx
push eax
mov eax, dword [esp + 0x20]
add eax, esi
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ebx, [eax - 1]
neg ebx
sbb bl, bl
add bl, 1
je 0x4022b9
add esi, 0x4000
cmp esi, ebp
jb 0x402257
jmp 0x4022b5
push 0
lea eax, [esp + 0x1c]
push eax
push ebp
push dword [esp + 0x20]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec eax
neg eax
sbb al, al
inc al
mov bl, al
test bl, bl
jne 0x402317
cmp byte [edi + 0x14], 0
je 0x402317
cmp dword [edi + 0xc], 0
jne 0x402317
push 0
lea esi, [edi + 0x1e]
mov ecx, 0x450cd4
push esi
call fcn.0040176a
test al, al
je 0x40230a
cmp dword [esp + 0x18], ebp
jae 0x402244
cmp dword [esp + 0x18], 0
jbe 0x402244
mov esi, dword [edi]
mov ecx, edi
push 0
call dword [esi + 0x14]
sub eax, dword [esp + 0x1c]
mov ecx, edi
sbb edx, 0
push edx
push eax
call dword [esi + 0x10]
jmp 0x402244
push esi
push 0
mov ecx, 0x450cd4
call fcn.004019ac
pop esi
mov al, bl
mov byte [edi + 8], 1
pop ebx
pop edi
pop ebp
ret 8

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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.00412bc0
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4024ae
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.004032e9
test al, al
je 0x4024ae
lea eax, [ebp - 0x1000]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x4024eb
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.00412bc0
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.004035f8
movzx eax, word [eax]
cmp eax, 0x2e
je 0x40251c
cmp eax, 0x20
je 0x40251c
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40254f
push esi
call fcn.00402455
test al, al
jne 0x402562
push 0x800
lea eax, [ebp - 0x1000]
push eax
push esi
call fcn.004032e9
test al, al
je 0x402562
push 0
lea eax, [ebp - 0x1000]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x402562
cmp byte [ebp + 0xc], 0
je 0x40255e
push dword [ebp + 0x10]
push esi
call fcn.00402728
xor eax, eax
jmp 0x40257a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x402577
cmp eax, 3
je 0x402577
xor eax, eax
inc eax
jmp 0x40257a
push 2
pop eax
pop esi
mov esp, ebp
pop ebp
ret 0xc