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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4145b8
push 0x409e9a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x28], ecx
xor eax, eax
mov esi, dword [ebp + 8]
mov edi, esi
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x2c]
push eax
push 0x20019
push ebx
push str.SOFTWAREMacromediaFlashPlayer
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp edi, ebx
jne 0x40f42a
lea ecx, [ebp - 0x28]
push ecx
push esi
lea edx, [ebp - 0x24]
push edx
push ebx
push str.CurrentVersion
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp edi, ebx
jne 0x40f42a
mov eax, esi
mov dword [ebp - 0x1c], eax
mov esi, dword [sym.imp.MSVCRT.dll_strchr]
push 0x2c
push eax
call esi
add esp, 8
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x40f42a
mov byte [eax], 0x2e
jne 0x40f416
mov dword [ebp - 4], 0xffffffff
call fcn.0040f451
xor eax, eax
test edi, edi
sete al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40f460
Capabilities:
Get disk information

Disassembly:
sub esp, 0x68
mov ecx, 0x1b
xor eax, eax
push ebp
mov ebp, dword [esp + 0x70]
push edi
mov edi, ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
push eax
push 0x68
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
test eax, eax
jne 0x40f48b
pop edi
pop ebp
add esp, 0x68
ret
push ebx
push esi
mov dword [esp + 0x7c], 0
lea ebx, [esp + 0x10]
cmp byte [ebx], 0
je 0x40f4e4
push ebx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
jne 0x40f4d3
mov ecx, dword [ebp]
mov edi, ebx
xor eax, eax
lea edx, [ebp + ecx*4 + 4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
inc dword [ebp]
mov eax, dword [esp + 0x7c]
add ebx, 4
inc eax
cmp eax, 0x1a
mov dword [esp + 0x7c], eax
jb 0x40f499
pop esi
pop ebx
pop edi
mov eax, 1
pop ebp
add esp, 0x68
ret
Function at 0x40f500
Capabilities:
Compare security identifiers

Disassembly:
sub esp, 0x414
push ebx
push ebp
push esi
lea eax, [esp + 0x18]
push edi
push eax
push 8
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push 0x400
push edx
push 2
push eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x10]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
push edx
mov byte [esp + 0x3c], bl
mov byte [esp + 0x3d], bl
mov byte [esp + 0x3e], bl
mov byte [esp + 0x3f], bl
mov byte [esp + 0x40], bl
mov byte [esp + 0x41], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov eax, dword [esp + 0x24]
xor esi, esi
cmp eax, ebx
jbe 0x40f5a9
mov ebp, dword [sym.imp.ADVAPI32.dll_EqualSid]
lea edi, [esp + 0x28]
mov eax, dword [edi]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call ebp
test eax, eax
jne 0x40f5a4
mov eax, dword [esp + 0x24]
inc esi
add edi, 8
cmp esi, eax
jb 0x40f588
jmp 0x40f5a9
mov ebx, 1
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x414
ret

Function at 0x40f5d0
Capabilities:
Enumerate processes

Disassembly:
sub esp, 0x150
push ebx
push ebp
push esi
push edi
mov eax, 0x419af4
push 0
push 2
mov dword [esp + 0x20], str.KSafeTray.exe
mov dword [esp + 0x24], 0x419ad8
mov dword [esp + 0x28], str.360Tray.exe
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], str.360tray.exe
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], str.QQPCTray.exe
mov dword [esp + 0x3c], 0x419aa4
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
lea ecx, [esp + 0x38]
mov dword [esp + 0x14], eax
push ecx
push eax
mov dword [esp + 0x40], 0x128
mov dword [esp + 0x18], 0
call sub.KERNEL32.dll_Process32First
mov ebp, dword [esp + 0x164]
mov esi, dword [esp + 0x168]
test eax, eax
je 0x40f6c4
xor edi, edi
lea ebx, [esp + 0x18]
mov edx, dword [ebx]
lea eax, [esp + 0x5c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x40f674
inc edi
add ebx, 8
cmp edi, 4
jb 0x40f657
jmp 0x40f6a7
mov edi, dword [esp + edi*8 + 0x1c]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push edi
call ebx
lea ecx, [eax + esi + 1]
mov eax, dword [esp + 0x16c]
cmp ecx, eax
jge 0x40f6bc
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebp
call ebx
mov esi, eax
mov byte [esi + ebp], 0x7c
mov byte [esi + ebp + 1], 0
inc esi
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x38]
push edx
push eax
call sub.KERNEL32.dll_Process32Next
test eax, eax
je 0x40f6c4
jmp 0x40f651
mov dword [esp + 0x10], 1
cmp byte [esi + ebp - 1], 0x7c
jne 0x40f6d0
mov byte [esi + ebp - 1], 0
mov ecx, dword [esp + 0x10]
xor eax, eax
pop edi
pop esi
test ecx, ecx
pop ebp
pop ebx
sete al
add esp, 0x150
ret
Function at 0x40f800
Capabilities:
Get common file path

Disassembly:
sub esp, 0x50c
push esi
push edi
xor edx, edx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], dl
mov byte [esp + 0x110], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x111]
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLongPathNameA]
lea ecx, [esp + 0xc]
push 0x104
lea edx, [esp + 0x10]
push ecx
push edx
call esi
mov edi, dword [sym.imp.MSVCRT.dll__mbsupr]
lea eax, [esp + 0xc]
push eax
call edi
add esp, 4
lea ecx, [esp + 0x110]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edx, [esp + 0x110]
push 0x104
lea eax, [esp + 0x114]
push edx
push eax
call esi
lea ecx, [esp + 0x110]
push ecx
call edi
add esp, 4
lea edx, [esp + 0x110]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
lea edi, [esp + 0xc]
lea esi, [esp + 0x110]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
pop edi
pop esi
jne 0x40f8d6
mov eax, 1
add esp, 0x50c
ret
lea ecx, [esp + 0x30c]
lea edx, [esp + 0x40c]
push ecx
lea eax, [esp + 0x210]
push edx
lea ecx, [esp + 8]
push eax
lea edx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__splitpath]
add esp, 0x14
lea eax, [esp + 0x20c]
push 0x4190ac
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
neg eax
sbb eax, eax
and al, 0xfe
add eax, 2
add esp, 0x50c
ret

Function at 0x40f930
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
sub esp, 0x21c
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x24]
xor edi, edi
push 0x104
push eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], str.wscript.exe
mov dword [esp + 0x20], str.cscript.exe
mov dword [esp + 0x24], str.jscript.dll
mov dword [esp + 0x28], str.vbscript.dll
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 0x24]
push str.System32_
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x24]
push str.msvbvm60.dll
push edx
lea eax, [esp + 0x130]
push str._s_s
push eax
call ebx
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x10
lea ecx, [esp + 0x128]
push ecx
call ebp
cmp eax, 0xffffffff
jne 0x40f9bf
mov dword [esp + 0x10], 1
lea esi, [esp + 0x14]
mov edx, dword [esi]
lea eax, [esp + 0x24]
push edx
push eax
lea ecx, [esp + 0x130]
push str._s_s
push ecx
call ebx
add esp, 0x10
lea edx, [esp + 0x128]
push edx
call ebp
cmp eax, 0xffffffff
je 0x40fa04
inc edi
add esi, 4
cmp edi, 4
jb 0x40f9c3
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret
cmp edi, 4
jae 0x40f9f5
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
or al, 2
pop ebx
add esp, 0x21c
ret
Function at 0x40fa20
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4145c8
push 0x409e9a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push esi
push edi
mov edx, dword [ebp + 0xc]
mov ecx, edx
xor eax, eax
mov ebx, dword [ebp + 8]
mov edi, ebx
mov esi, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
xor edi, edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x28], edx
mov dword [ebp - 4], edi
lea eax, [ebp - 0x20]
push eax
push 0x20019
push edi
push str.CLSIDB54F3741_5B07_11cf_A4B0_00AA004A55E8InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
neg esi
sbb esi, esi
neg esi
mov dword [ebp - 0x1c], esi
jne 0x40faa9
lea ecx, [ebp - 0x28]
push ecx
push ebx
lea edx, [ebp - 0x24]
push edx
push edi
push edi
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 4], 0xffffffff
call fcn.0040fad0
xor eax, eax
test esi, esi
sete al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40fde0
Capabilities:
Connect to wmi namespace via wbemlocator

Disassembly:
mov ecx, dword [esp + 0x14]
sub esp, 0x124
xor eax, eax
push esi
mov esi, dword [esp + 0x138]
push edi
mov edi, esi
rep stosd dword es:[edi], eax
xor edi, edi
push edi
push edi
call dword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
jl 0x40ff0f
push edi
push edi
push edi
push 3
push edi
push edi
push edi
push 0xffffffffffffffff
push edi
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
cmp eax, edi
jge 0x40fe2b
cmp eax, 0x80010119
jne 0x40ff09
lea eax, [esp + 8]
mov dword [esp + 8], edi
push eax
push 0x415684
push 1
push edi
push 0x415754
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40ff09
mov eax, dword [esp + 8]
lea edx, [esp + 0xc]
push edx
mov edx, dword [esp + 0x134]
push edi
push edi
push edi
push edi
push edi
mov dword [esp + 0x24], edi
mov ecx, dword [eax]
push edi
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x40feff
mov edx, dword [esp + 0xc]
push edi
push edi
push 3
push 3
push edi
push edi
push 0xa
push edx
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
test eax, eax
jge 0x40feb6
mov eax, dword [esp + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 8]
push eax
mov edx, dword [eax]
call dword [edx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
xor eax, eax
pop esi
add esp, 0x124
ret
mov eax, dword [esp + 0x134]
lea ecx, [esp + 0x2c]
push eax
push str.SELECT__FROM__s
push ecx
mov dword [esp + 0x1c], edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esp + 0x18]
add esp, 0xc
lea ecx, [esp + 0x10]
mov edx, dword [eax]
push ecx
push edi
lea ecx, [esp + 0x34]
push 0x30
push ecx
push 0x419c24
push eax
call dword [edx + 0x50]
test eax, eax
jge 0x40ff1a
mov eax, dword [esp + 0xc]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [esp + 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
xor eax, eax
pop esi
add esp, 0x124
ret
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], edi
cmp eax, edi
je 0x40ff95
push ebx
mov ebx, dword [esp + 0x13c]
push ebp
mov ebp, dword [sym.imp.OLEAUT32.dll_VariantCopy]
cmp edi, dword [esp + 0x148]
jae 0x40ff93
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x24]
push ecx
push 1
push 0xffffffffffffffff
push eax
call dword [edx + 0x10]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40ff93
mov eax, dword [esp + 0x20]
push 0
lea ecx, [esp + 0x28]
push 0
mov edx, dword [eax]
push ecx
push 0
push ebx
push eax
call dword [edx + 0x10]
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x24]
mov dword [esi], edx
push eax
inc edi
add esi, 4
call ebp
mov eax, dword [esp + 0x20]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40ff35
pop ebp
pop ebx
mov eax, dword [esp + 0xc]
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [esp + 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x10]
push eax
mov edx, dword [eax]
call dword [edx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
mov eax, 1
pop esi
add esp, 0x124
ret
Function at 0x410220
Capabilities:
Encrypt data using blowfish

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x40
push ebx
push ebp
mov ebp, ecx
mov ebx, dword [esp + 0x50]
mov ecx, dword [eax]
cmp ebx, 1
mov dword [ebp], ecx
mov edx, dword [eax + 4]
mov dword [ebp + 4], edx
mov ecx, dword [eax]
mov dword [ebp + 8], ecx
mov edx, dword [eax + 4]
mov dword [ebp + 0xc], edx
jae 0x410261
lea eax, [esp + 0x54]
push 0x4170c0
push eax
mov dword [esp + 0x5c], str.Incorrect_key_length
call sub.MSVCRT.dll__CxxThrowException
cmp ebx, 0x38
jbe 0x41026b
mov ebx, 0x38
mov ecx, ebx
push esi
mov esi, dword [esp + 0x50]
mov edx, ecx
push edi
lea edi, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp + 0x10]
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x12
mov esi, 0x4145e4
mov edi, edx
mov dword [esp + 0x58], 0x12
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x58]
mov ecx, 0x400
mov esi, 0x41462c
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x18]
mov esi, edx
xor edx, edx
mov dword [esp + 0x5c], 4
mov edi, edx
xor edx, edx
mov dl, byte [ecx]
shl edi, 8
or edx, edi
inc ecx
inc eax
cmp eax, ebx
jne 0x4102d6
xor eax, eax
lea ecx, [esp + 0x18]
mov edi, dword [esp + 0x5c]
dec edi
mov dword [esp + 0x5c], edi
jne 0x4102bf
mov edi, dword [esi]
add esi, 4
xor edi, edx
mov edx, dword [esp + 0x58]
mov dword [esi - 4], edi
dec edx
mov dword [esp + 0x58], edx
jne 0x4102b5
xor edi, edi
lea esi, [ebp + 0x10]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
call fcn.00410380
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [esi], ecx
add esi, 4
inc edi
mov dword [esi], edx
inc edi
add esi, 4
cmp edi, 0x12
jb 0x410303
lea eax, [ebp + 0x58]
mov dword [esp + 0x5c], 4
mov ebx, eax
xor edi, edi
mov esi, ebx
lea eax, [esp + 0x10]
mov ecx, ebp
push eax
call fcn.00410380
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov dword [esi], ecx
add esi, 4
inc edi
mov dword [esi], edx
inc edi
add esi, 4
cmp edi, 0x100
jl 0x410339
mov eax, dword [esp + 0x5c]
add ebx, 0x400
dec eax
mov dword [esp + 0x5c], eax
jne 0x410335
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 0xc
Function at 0x4020e1
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x414
mov eax, dword [0x42f114]
xor eax, esp
mov dword [esp + 0x410], eax
movzx eax, word [esp + 0x41c]
sub eax, 0x3ef
push esi
mov esi, ecx
mov ecx, dword [esp + 0x41c]
je 0x402154
sub eax, 1
jne 0x40212d
push edi
mov edi, dword [sym.imp.USER32.dll_GetDlgItem]
push 0x104
lea eax, [esp + 0x214]
push eax
push 0x3f0
push ecx
call edi
push eax
call dword [sym.imp.USER32.dll_GetWindowTextW]
test eax, eax
jne 0x402147
mov ecx, dword [esi + 8]
push eax
push 0x3024
push ecx
call edi
push eax
call dword [sym.imp.USER32.dll_EnableWindow]
pop edi
mov ecx, dword [esp + 0x414]
pop esi
xor ecx, esp
xor eax, eax
call fcn.004153dc
add esp, 0x414
ret 0xc
mov edx, dword [esi + 8]
push 1
push 0x3024
push edx
jmp 0x402123
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0xe]
push ecx
mov word [esp + 0x10], ax
call fcn.00415440
add esp, 0xc
lea edx, [esp + 4]
push edx
lea eax, [esp + 0x210]
push eax
mov ecx, esi
call fcn.00402000
test eax, eax
je 0x40212d
mov edx, dword [esi + 4]
lea ecx, [esp + 0x20c]
push ecx
push 0x3f0
push edx
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp 0x40212d
Function at 0x4024b0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x42590e
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x42f114]
xor eax, esp
mov dword [esp + 0x214], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42f114]
xor eax, esp
push eax
lea eax, [esp + 0x22c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x23c]
push 4
mov dword [esp + 0x20], eax
xor esi, esi
call fcn.00414f91
add esp, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x234], esi
test eax, eax
je 0x40251c
mov ecx, eax
call fcn.00412cc0
mov ebp, eax
jmp 0x40251e
xor ebp, ebp
mov dword [esp + 0x234], 0xffffffff
test ebp, ebp
je 0x402652
push 0
push 0
push 0
mov edi, 1
push edi
push 0xa
push 0
mov ecx, ebp
mov dword [esp + 0x2c], edi
call fcn.00412ce0
mov esi, eax
test esi, esi
jbe 0x40263d
push esi
call fcn.00415793
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x402615
push 0
push esi
push ebx
push edi
push 0xa
push 0
mov ecx, ebp
call fcn.00412ce0
mov edi, eax
test edi, edi
je 0x40260c
mov ecx, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push str._sKmSFX.zip
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4025f8
push 0
lea ecx, [esp + 0x1c]
push ecx
push edi
push ebx
push esi
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4025ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_error___ld_n
call fcn.0040d550
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40260c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Open_error___ld_n
call fcn.0040d550
add esp, 8
push ebx
call fcn.00414f1c
add esp, 4
mov eax, dword [esp + 0x14]
push 0
inc eax
push 0
movzx edi, ax
push 0
push edi
push 0xa
push 0
mov ecx, ebp
mov dword [esp + 0x2c], eax
call fcn.00412ce0
mov esi, eax
test esi, esi
ja 0x402556
mov esi, dword [esp + 0x14]
mov ecx, ebp
dec esi
call fcn.00412cd0
push ebp
call fcn.00414f1c
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x22c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.004153dc
add esp, 0x224
ret 4
Function at 0x402830
Capabilities:
Get common file path

Disassembly:
sub esp, 0x824
mov eax, dword [0x42f114]
xor eax, esp
mov dword [esp + 0x820], eax
push esi
mov esi, dword [esp + 0x82c]
push edi
xor eax, eax
push 0x206
mov edi, ecx
push eax
lea ecx, [esp + 0x21a]
push ecx
mov word [esp + 0x21c], ax
call fcn.00415440
mov ecx, dword [edi + 0x28c828]
add esp, 0xc
push 0
push 0x104
lea edx, [esp + 0x218]
push edx
call fcn.00411b40
push 0x104
lea eax, [esp + 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x104
lea ecx, [esp + 0x624]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea edx, [esp + 8]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push esi
push str.wszString____s__n
call fcn.0040d640
push str._TEMP_
push esi
call fcn.004154e6
add esp, 0x10
test eax, eax
je 0x4028f4
mov ecx, dword [edi + 0x28c828]
lea eax, [edi + 0x28c20c]
push eax
push str._TEMP_
push esi
call fcn.00411950
push str._PROGRAMFILES_
push esi
call fcn.004154e6
add esp, 8
test eax, eax
je 0x40291f
lea ecx, [esp + 0x210]
push ecx
mov ecx, dword [edi + 0x28c828]
push str._PROGRAMFILES_
push esi
call fcn.00411950
push str._WINDOWS_
push esi
call fcn.004154e6
add esp, 8
test eax, eax
je 0x40294a
mov ecx, dword [edi + 0x28c828]
lea edx, [esp + 0x418]
push edx
push str._WINDOWS_
push esi
call fcn.00411950
push str._SYSTEM_
push esi
call fcn.004154e6
add esp, 8
test eax, eax
je 0x402975
mov ecx, dword [edi + 0x28c828]
lea eax, [esp + 0x620]
push eax
push str._SYSTEM_
push esi
call fcn.00411950
push str._CURRENT_
push esi
call fcn.004154e6
add esp, 8
test eax, eax
je 0x4029c6
lea eax, [esp + 8]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402990
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 6], 0x5c
jne 0x4029c6
lea eax, [esp + 8]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4029b0
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [esp + eax*2 + 6], cx
mov ecx, dword [edi + 0x28c828]
lea edx, [esp + 8]
push edx
push str._CURRENT_
push esi
call fcn.00411950
mov ecx, dword [esp + 0x828]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.004153dc
add esp, 0x824
ret 4
Function at 0x402a40
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x42594e
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x42f114]
xor eax, esp
mov dword [esp + 0x214], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42f114]
xor eax, esp
push eax
lea eax, [esp + 0x22c]
mov dword fs:[0], eax
mov edi, ecx
xor ebp, ebp
push 4
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], ebp
call fcn.00414f91
add esp, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x234], ebp
cmp eax, ebp
je 0x402aab
mov ecx, eax
call fcn.00412cc0
mov ebx, eax
jmp 0x402aad
xor ebx, ebx
push ebp
push ebp
push ebp
push str.PRJ_FILE
push 0xa
push ebp
mov ecx, ebx
mov dword [esp + 0x24c], 0xffffffff
call fcn.00412ce0
mov esi, eax
cmp esi, ebp
je 0x402bf0
push esi
call fcn.00415793
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x402bf0
push 0
push esi
push ebp
push str.PRJ_FILE
push 0xa
push 0
mov ecx, ebx
call fcn.00412ce0
mov esi, eax
test esi, esi
je 0x402be7
push esi
push str.Size___d_n
call fcn.0040d550
add edi, 0x28c20c
push edi
lea eax, [esp + 0x2c]
push str._sKmSFX.pfw
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x402bd3
push str.File_opend_n
call fcn.0040d550
add esp, 4
push 0
lea edx, [esp + 0x18]
push edx
push esi
push ebp
push edi
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402b8f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_error___ld_n
call fcn.0040d550
add esp, 8
mov eax, dword [esp + 0x14]
push eax
push str.Write___d_n
call fcn.0040d550
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x28]
add edx, 0x28c004
mov ecx, eax
add esp, 8
sub edx, ecx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x402bb3
push edi
mov dword [esp + 0x1c], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402be7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Open_error___ld_n
call fcn.0040d550
add esp, 8
push ebp
call fcn.0041579e
add esp, 4
test ebx, ebx
je 0x402c04
mov ecx, ebx
call fcn.00412cd0
push ebx
call fcn.00414f1c
add esp, 4
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x22c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.004153dc
add esp, 0x224
ret