joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405f70
Capabilities:
Accept command line arguments
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1bc
mov eax, dword [str._u]
xor eax, ebp
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0x1bc], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
mov dword [esp + 0x14], eax
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x9c
call esi
test eax, eax
jne 0x405fd4
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], 0x94
call esi
test eax, eax
je 0x4060ff
cmp dword [esp + 0x28], 2
jne 0x4060ff
cmp dword [esp + 0x1c], 4
jbe 0x4060ff
call fcn.0040de90
test eax, eax
je 0x40604d
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0
call fcn.0040df00
add esp, 4
test eax, eax
jl 0x4060ff
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40604d
push 0x104
lea ecx, [esp + 0xbc]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push 0
push eax
lea edx, [esp + 0xc0]
push edx
push 0
call fcn.0040df90
add esp, 0x10
jmp 0x4060ff
push str.GlobalDB37DF94_6157_42e3_8324_3FF035409B59
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
je 0x4060f1
cmp eax, 0xb7
je 0x4060f1
cmp eax, 5
je 0x4060f1
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 0
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_DefWindowProcA]
push 4
call fcn.00405c00
add esp, 4
push 0
push ebx
push 0
mov ecx, 0x42154c
call fcn.00405cd0
mov eax, dword [ebp + 0x14]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.00405f40
add esp, 8
mov ecx, 0x42154c
mov edi, eax
call fcn.00405ee0
call dword [sym.imp.ole32.dll_CoUninitialize]
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1b8]
xor ecx, ebp
call fcn.0041277f
mov esp, ebp
pop ebp
ret 0x10
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x1c4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0041277f
mov esp, ebp
pop ebp
ret 0x10
Function at 0x407d50
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 0x11c
mov eax, dword [str._u]
xor eax, esp
push ebp
push esi
lea edx, [esp + 0x10]
push edx
push 0x2001f
mov ebp, ecx
mov ecx, dword [esp + 0x130]
push 0
mov dword [esp + 0x12c], eax
mov eax, dword [ebp]
push ecx
push eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x407db7
lea ecx, [esp + 8]
call fcn.00407c40
mov esi, eax
test esi, esi
mov eax, dword [esp + 0x10]
mov dword [esp + 8], eax
je 0x407dc5
lea ecx, [esp + 8]
call fcn.00407c40
jmp 0x407e5e
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
lea ecx, [esp + 0x1c]
push ecx
push 0
push 0
push 0
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x38]
push ecx
push 0
push eax
mov dword [esp + 0x30], 0x100
call edi
test eax, eax
jne 0x407e2c
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x10]
call fcn.00407d50
mov esi, eax
test esi, esi
jne 0x407e54
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x10]
push esi
push esi
push esi
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x38]
push edx
push esi
push eax
mov dword [esp + 0x30], 0x100
call edi
test eax, eax
je 0x407df2
mov eax, dword [esp + 0xc]
test eax, eax
je 0x407e43
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], 0
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
lea ecx, [esp + 0xc]
call fcn.00407c40
pop edi
mov ecx, dword [esp + 0x120]
mov eax, esi
pop esi
pop ebp
xor ecx, esp
call fcn.0041277f
add esp, 0x11c
ret 4
Function at 0x408230
Capabilities:
Set registry value

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebp
push esi
mov esi, dword [esp + 0x14]
push edi
mov ebp, ecx
xor edi, edi
push esi
call ebx
inc eax
add esi, eax
add edi, eax
cmp eax, 1
jne 0x408242
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp]
push edi
push eax
push 7
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop edi
pop esi
pop ebp
pop ebx
ret 8

Function at 0x408d60
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x11c
mov eax, dword [str._u]
push ebx
mov ebx, dword [ebp + 8]
xor eax, ebp
push esi
mov esi, ecx
mov dword [esp + 0x120], eax
mov eax, dword [esi + 8]
push edi
xor edi, edi
cmp eax, edi
je 0x408d98
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esi + 8], edi
mov dword [esi + 4], edi
mov dword [esp + 0x14], edi
xor eax, eax
test ebx, ebx
mov byte [esp + 0x18], 0
mov ecx, 0x40
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x408db9
mov edi, ebx
jmp 0x408dc1
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [eax*4 + 4]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebx
call dword [sym.imp.USER32.dll_CharUpperA]
push 0x104
lea ecx, [esp + 0x1c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp byte [edi], 0
jne 0x408e0a
lea edx, [esp + 0x18]
mov dword [esp + 0x10], edx
jmp 0x408e0e
mov dword [esp + 0x10], ebx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
lea edi, [esi + 4]
push edi
push 0
push 0
push ecx
mov ecx, esi
call fcn.00408ac0
mov edx, dword [edi]
mov eax, dword [esp + 0x14]
lea ecx, [eax + edx*4 + 4]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esi + 8], eax
jne 0x408e62
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, ebp
call fcn.0041277f
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [edi]
lea edx, [esp + 0x14]
push edx
push edi
lea edx, [eax + ecx*4]
push edx
push eax
mov eax, dword [esp + 0x20]
push eax
mov ecx, esi
call fcn.00408ac0
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x124]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0041277f
mov esp, ebp
pop ebp
ret 4
Function at 0x408ec0
Capabilities:
Query or enumerate registry value

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x10]
push esi
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
push 0
mov dword [edi], 0
mov eax, dword [ecx]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x408f21
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x408f03
cmp eax, 2
jne 0x408f13
test esi, esi
mov eax, dword [esp + 0x14]
je 0x408f1d
mov cl, byte [eax + esi - 1]
test cl, cl
je 0x408f1d
pop edi
mov eax, 0xd
pop esi
ret 0xc
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
ret 0xc

Function at 0x409330
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [str._u]
push ebx
mov ebx, dword [0x41df18]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [0x41df14]
lea edx, [esp + 0x10]
push edx
push 0x20019
xor eax, ebp
push 0
mov dword [esp + 0x148], eax
mov eax, dword [0x41df0c]
mov dword [esp + 0x24], ecx
mov ecx, dword [0x41df10]
push str.CLSIDCAA2D3B1_4BB5_4a45_A17A_122773379D99
push 0x80000000
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409424
mov byte [esp + 0x30], al
mov ecx, 0x40
lea edi, [esp + 0x31]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edi + 0x10]
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
push 0
push eax
push ecx
mov dword [esp + 0x34], 0x104
mov dword [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4093fe
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, edi
call fcn.00409140
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, esi
mov dword [edx], eax
mov eax, dword [esp + 0x28]
mov dword [edx + 4], ecx
mov dword [edx + 8], eax
mov dword [edx + 0xc], ebx
jmp 0x409439
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, esi
mov dword [ecx], edx
mov dword [ecx + 4], eax
mov dword [ecx + 8], edi
mov dword [ecx + 0xc], ebx
mov ecx, dword [esp + 0x13c]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041277f
mov esp, ebp
pop ebp
ret 4
Function at 0x409460
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [str._u]
push ebx
mov ebx, dword [ebp + 0x14]
xor eax, ebp
push esi
push edi
mov dword [esp + 0x13c], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x14], ecx
mov edx, dword [ebp + 0x10]
mov byte [esp + 0x30], 0
mov ecx, 0x40
lea edi, [esp + 0x31]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov esi, dword [ebp + 8]
mov eax, ebx
shr eax, 0x10
movzx ecx, ah
push ecx
movzx eax, al
push eax
movzx ecx, bh
push ecx
movzx eax, bl
push eax
mov eax, edx
mov ecx, edx
shr ecx, 0x18
push ecx
shr eax, 0x10
movzx eax, al
push eax
movzx eax, word [esp + 0x36]
movzx ecx, dh
push ecx
movzx ecx, word [esp + 0x38]
mov dword [esp + 0x3c], edx
movzx edx, dl
push edx
push eax
push ecx
push esi
push str._08X__04X__04X__02X_02X__02X_02X_02X_02X_02X_02X
lea edx, [esp + 0x60]
push 0x104
push edx
mov dword [esp + 0x5c], ebx
call fcn.00413314
add esp, 0x38
lea eax, [esp + 0x10]
push eax
push str.CLSIDCAA2D3B1_4BB5_4a45_A17A_122773379D99
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x409549
lea ecx, [esp + 0x10]
push ecx
push str.CLSIDCAA2D3B1_4BB5_4a45_A17A_122773379D99
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x409549
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, ebp
call fcn.0041277f
mov esp, ebp
pop ebp
ret 0x10
lea edx, [esp + 0x30]
push edx
mov esi, 1
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x10]
inc eax
push eax
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x18]
push esi
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40957c
xor esi, esi
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x13c]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041277f
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4095a0
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x35c
mov eax, dword [str._u]
push ebx
mov ebx, dword [ebp + 8]
xor eax, ebp
push esi
push edi
mov dword [esp + 0x364], eax
xor eax, eax
test ebx, ebx
mov ecx, 0x82
lea edi, [esp + 0x151]
mov byte [esp + 0x150], 0
rep stosd dword es:[edi], eax
je 0x409720
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
call esi
test eax, eax
jle 0x409720
push ebx
call esi
cmp eax, 0x209
jbe 0x409615
mov eax, 0x6f
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x358]
xor ecx, ebp
call fcn.0041277f
mov esp, ebp
pop ebp
ret
push ebx
lea eax, [esp + 0x154]
push str._s.
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
je 0x409709
lea esp, [esp]
mov edi, 0x41d8a4
lea esi, [esp + 0x3c]
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4096d0
mov edi, 0x41d8a0
lea esi, [esp + 0x3c]
mov ecx, 3
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4096d0
lea eax, [esp + 0x3c]
push eax
push ebx
lea ecx, [esp + 0x158]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esp + 0x20]
add esp, 0x10
cmp eax, 0x10
jne 0x4096af
lea edx, [esp + 0x150]
push edx
call fcn.004095a0
add esp, 4
jmp 0x4096d0
push 0x80
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x150]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x409650
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x409650
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x358]
xor ecx, ebp
call fcn.0041277f
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x364]
pop edi
pop esi
xor ecx, ebp
or eax, 0xffffffff
pop ebx
call fcn.0041277f
mov esp, ebp
pop ebp
ret

Function at 0x409740
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x110
mov eax, dword [str._u]
push esi
xor eax, ebp
push edi
mov dword [esp + 0x114], eax
xor eax, eax
push 0x104
mov byte [esp + 0xc], 0
mov ecx, 0x41
lea edi, [esp + 0xd]
rep stosd dword es:[edi], eax
push edx
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea ecx, [esp + 8]
push 0x5c
push ecx
call fcn.00412d4c
mov esi, eax
add esp, 8
test esi, esi
je 0x4097c1
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ebx, [ebx]
push 0
lea edx, [esp + 0xc]
push edx
mov byte [esi], 0
call edi
mov byte [esi], 0x5c
push 0x5c
inc esi
push esi
call fcn.00412d4c
mov esi, eax
add esp, 8
test esi, esi
jne 0x4097a0
mov ecx, dword [esp + 0x114]
pop edi
xor ecx, ebp
pop esi
call fcn.0041277f
mov esp, ebp
pop ebp
ret
Function at 0x409860
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push ebx
mov ebx, dword [esp + 0x5c]
push esi
mov eax, ebx
push edi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409870
mov edi, dword [esp + 0x68]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409884
sub eax, esi
add eax, edx
lea eax, [eax + eax + 4]
push eax
call fcn.00412749
mov esi, eax
add esp, 4
test esi, esi
je 0x409909
push edi
push ebx
push str.__s___s
push esi
call fcn.00412cf4
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
add esp, 0x10
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x20], 0x44
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
xor edx, edx
mov dword [esp + 0xc], edx
lea eax, [esp + 0xc]
push eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
lea ecx, [esp + 0x20]
push ecx
push edx
push edx
push edx
push edx
push edx
push edx
push esi
push edx
mov dword [esp + 0x40], edx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
push esi
jne 0x409914
call fcn.00412bc8
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x54
ret 0x10
call fcn.00412bc8
mov eax, dword [esp + 0x70]
add esp, 4
test eax, eax
je 0x409941
mov edx, dword [esp + 0xc]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0xc]
push eax
call esi
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x54
ret 0x10

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

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
push esi
call fcn.004095a0
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 4
xor edi, edi
nop
push esi
call ebp
cmp eax, 0xffffffff
je 0x4099ae
push 0x3e8
call ebx
push esi
call fcn.004095a0
add esp, 4
inc edi
cmp edi, 0xa
jl 0x409990
push esi
call ebp
inc eax
pop edi
neg eax
pop esi
sbb eax, eax
pop ebp
inc eax
pop ebx
ret 4
Function at 0x40a090
Capabilities:
Read .ini file

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
push ebp
push 0x64
push str.Space
push str.SYSTEM
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov dword [ecx], eax
mov dword [ecx + 4], 0
mov eax, dword [esi]
mov ebx, dword [eax - 4]
mov edx, dword [eax - 8]
sub eax, 0x10
mov ecx, 1
sub ecx, ebx
mov ebx, 0x400
sub edx, ebx
or ecx, edx
jge 0x40a0e1
push ebx
mov ecx, esi
call fcn.00403690
mov edi, dword [esi]
cmp dword [edi - 8], ebx
jge 0x40a0f2
push 0x80070057
call fcn.00403340
mov eax, dword [esi]
push ebp
push ebx
push edi
push 0x41d45d
mov dword [eax - 0xc], ebx
mov ecx, dword [esi]
push str.Path
push str.SYSTEM
mov byte [ecx + 0x400], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, dword [esi]
test ecx, ecx
jne 0x40a122
xor edi, edi
jmp 0x40a134
mov eax, ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a127
sub eax, edi
mov edi, eax
js 0x40a139
cmp edi, dword [ecx - 8]
jle 0x40a143
push 0x80070057
call fcn.00403340
mov edx, dword [esi]
mov dword [edx - 0xc], edi
mov eax, dword [esi]
mov esi, dword [esp + 0x20]
mov byte [edi + eax], 0
mov eax, dword [esi]
mov edx, dword [eax - 4]
sub eax, 0x10
mov ecx, 1
sub ecx, edx
mov edx, dword [eax + 8]
sub edx, ebx
or ecx, edx
jge 0x40a172
push ebx
mov ecx, esi
call fcn.00403690
mov edi, dword [esi]
cmp dword [edi - 8], ebx
jge 0x40a183
push 0x80070057
call fcn.00403340
mov eax, dword [esi]
push ebp
push ebx
push edi
push str.Setup.exe
mov dword [eax - 0xc], ebx
mov ecx, dword [esi]
push 0x41d8e0
push str.SYSTEM
mov byte [ecx + 0x400], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov eax, dword [esi]
test eax, eax
jne 0x40a1b3
xor edi, edi
jmp 0x40a1c3
mov edi, eax
lea edx, [edi + 1]
mov cl, byte [edi]
inc edi
test cl, cl
jne 0x40a1b8
sub edi, edx
js 0x40a1c8
cmp edi, dword [eax - 8]
jle 0x40a1d2
push 0x80070057
call fcn.00403340
mov edx, dword [esi]
push ebp
push 1
mov dword [edx - 0xc], edi
mov eax, dword [esi]
push str.Delete
push str.SYSTEM
mov byte [edi + eax], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov dword [ecx], eax
mov eax, dword [esi]
mov ecx, dword [eax - 4]
sub eax, 0x10
mov eax, dword [eax + 8]
mov edx, 1
sub edx, ecx
sub eax, ebx
or edx, eax
jge 0x40a21a
push ebx
mov ecx, esi
call fcn.00403690
mov edi, dword [esi]
cmp dword [edi - 8], ebx
jge 0x40a22b
push 0x80070057
call fcn.00403340
mov ecx, dword [esi]
push ebp
push ebx
push edi
push 0x41d45d
mov dword [ecx - 0xc], ebx
mov edx, dword [esi]
push 0x41d8d8
push str.SYSTEM
mov byte [edx + 0x400], 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, dword [esi]
test ecx, ecx
jne 0x40a25b
xor edi, edi
jmp 0x40a26d
mov eax, ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a260
sub eax, edi
mov edi, eax
js 0x40a272
cmp edi, dword [ecx - 8]
jle 0x40a27c
push 0x80070057
call fcn.00403340
mov eax, dword [esi]
mov dword [eax - 0xc], edi
mov ecx, dword [esi]
mov byte [edi + ecx], 0
pop edi
pop esi
pop ebp
pop ebx
ret 0x18
Function at 0x40a640
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ebx, ebx
push eax
mov esi, ecx
mov dword [esp + 0x10], ebx
call edi
cmp eax, 0xffffffff
je 0x40a701
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40a671
mov esi, 1
jmp 0x40a6ad
push eax
push 0x41d38c
add esi, 0x84
lea ecx, [esp + 0x20]
push esi
push ecx
mov ebx, 3
call fcn.0040a300
add esp, 0xc
push eax
lea edx, [esp + 0x1c]
push edx
call fcn.0040a300
mov eax, dword [eax]
add esp, 0xc
push eax
call edi
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov esi, ecx
test bl, 2
je 0x40a6d5
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
and ebx, 0xfffffffd
lea edx, [eax + 0xc]
mov ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a6d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, 1
je 0x40a6f8
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a6f8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
mov eax, esi
pop esi
pop ebx
pop ecx
ret 8
pop edi
pop esi
xor eax, eax
pop ebx
pop ecx
ret 8
Function at 0x40a780
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Get file attributes
Set file attributes

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov eax, dword [esi]
mov ebx, dword [eax - 4]
mov edx, dword [eax - 8]
sub eax, 0x10
mov ebp, ecx
mov ecx, 1
sub ecx, ebx
mov ebx, 0x400
sub edx, ebx
or ecx, edx
push edi
jge 0x40a7af
push ebx
mov ecx, esi
call fcn.00403690
mov edi, dword [esi]
cmp dword [edi - 8], ebx
jge 0x40a7c0
push 0x80070057
call fcn.00403340
mov eax, dword [esi]
mov dword [eax - 0xc], ebx
mov ecx, dword [esi]
push edi
push ebx
mov byte [ecx + 0x400], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x40a825
mov edx, dword [esi]
test edx, edx
jne 0x40a7e4
xor edi, edi
jmp 0x40a7fd
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a7f0
sub eax, edi
mov edi, eax
js 0x40a802
cmp edi, dword [edx - 8]
jle 0x40a80c
push 0x80070057
call fcn.00403340
mov edx, dword [esi]
mov dword [edx - 0xc], edi
mov eax, dword [esi]
push 7
push str.C:Temp
mov ecx, esi
mov byte [edi + eax], 0
call fcn.00403e60
mov edx, dword [esi]
test edx, edx
jne 0x40a82f
xor edi, edi
jmp 0x40a841
mov eax, edx
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a834
sub eax, edi
mov edi, eax
js 0x40a846
cmp edi, dword [edx - 8]
jle 0x40a850
push 0x80070057
call fcn.00403340
mov ecx, dword [esi]
mov dword [ecx - 0xc], edi
mov edx, dword [esi]
mov byte [edi + edx], 0
mov eax, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
call edi
cmp eax, 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
je 0x40a875
test al, 0x10
jne 0x40a88b
mov edx, dword [esi]
call fcn.00409740
mov eax, dword [esi]
push 0
push eax
call ebx
test eax, eax
je 0x40a90d
push 0x41d38c
mov ecx, esi
call fcn.0040a290
push 1
push 0x41d38c
mov ecx, esi
call fcn.00403dd0
mov eax, dword [ebp + 0xa4]
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, esi
call fcn.00403dd0
push 3
push 0x41d900
mov ecx, esi
call fcn.00403dd0
mov eax, dword [esi]
push eax
call edi
cmp eax, 0xffffffff
je 0x40a8f1
mov edx, dword [esi]
push edx
call fcn.004095a0
mov eax, dword [esi]
add esp, 4
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [esi]
call fcn.00409740
mov edx, dword [esi]
push 0
push edx
call ebx
mov esi, dword [esi]
push esi
call edi
cmp eax, 0xffffffff
je 0x40a90d
test al, 0x10
jne 0x40a916
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret 4