joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401410
Capabilities:
Identify system language via api
Read .ini file

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ebp, [esi + 0x3c]
mov ecx, ebp
call fcn.00404477
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push eax
push 0
mov ebx, str.Startup
push str.copy
push ebx
call edi
test eax, eax
setne al
mov ecx, ebp
mov byte [esi + 6], al
call fcn.00404477
push eax
push 1
push str.engine
push ebx
call edi
neg eax
sbb al, al
and byte [esp + 0x10], 0
inc al
lea edi, [esp + 0x11]
mov byte [esi + 5], al
xor eax, eax
mov ecx, ebp
stosw word es:[edi], ax
call fcn.00404477
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push eax
lea eax, [esp + 0x14]
push 3
push eax
push 0x407430
push str.EnableLangDlg
push ebx
call edi
cmp eax, 1
jne 0x4014a2
cmp byte [esp + 0x10], 0x79
je 0x40149e
cmp byte [esp + 0x10], 0x59
jne 0x4014a2
mov byte [esi + 8], 1
mov ecx, ebp
call fcn.00404477
push eax
lea eax, [esi + 0x48]
push 0x1f4
push eax
push 0x407430
push str.AppName
push ebx
call edi
mov ecx, ebp
call fcn.00404477
push eax
push 0
mov ebx, str.Languages
push str.count
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
and dword [esp + 0x14], 0
mov dword [esi + 0x244], eax
test eax, eax
jle 0x40154e
lea eax, [esi + 0x248]
mov dword [esp + 0x18], eax
push dword [esp + 0x14]
lea eax, [esp + 0x2c]
push str.key_d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, ebp
call fcn.00404477
push eax
lea eax, [esp + 0x20]
push 0xa
push eax
lea eax, [esp + 0x34]
push 0x407430
push eax
push ebx
call edi
lea eax, [esp + 0x1e]
push eax
call fcn.004048c0
inc dword [esp + 0x18]
pop ecx
mov ecx, dword [esp + 0x18]
add dword [esp + 0x18], 2
mov word [ecx], ax
mov eax, dword [esp + 0x14]
cmp eax, dword [esi + 0x244]
jl 0x4014f4
mov ecx, ebp
call fcn.00404477
push eax
lea eax, [esp + 0x20]
push 0xa
push eax
push str.0x0409
push str.Default
push ebx
call edi
lea eax, [esp + 0x1e]
push eax
call fcn.004048c0
mov word [esi + 0x240], ax
mov ax, word [esi + 0x23c]
pop ecx
push eax
mov ecx, esi
call fcn.004015f9
test al, al
jne 0x4015dc
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
lea edi, [esi + 0x312]
push eax
mov ecx, esi
mov word [edi], ax
call fcn.004015f9
test al, al
jne 0x4015f1
mov ax, word [edi]
mov ecx, esi
and eax, 0x3ff
or ah, 4
push eax
mov word [edi], ax
call fcn.004015f9
test al, al
jne 0x4015f1
push edi
mov ecx, esi
call fcn.00401627
test al, al
jne 0x4015f1
mov ax, word [esi + 0x240]
mov word [edi], ax
jmp 0x4015f1
mov ax, word [esi + 0x23c]
mov byte [esi + 0x23e], 1
mov word [esi + 0x312], ax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
Function at 0x401c2a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
stc
inc edx
fucomp st(4)
add byte [eax + eax], al
add byte [ebx + 0x56], dl
mov esi, ecx
xor ebx, ebx
push edi
cmp byte [esi + 0x22a], bl
jne 0x401d31
mov ax, word [esi + 0x580]
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceExA]
push eax
push 0x6b
push 5
push dword [esi + 0x224]
call edi
cmp eax, ebx
jne 0x401c9b
mov ax, word [esi + 0x580]
and ax, 0x3ff
or ah, 4
push eax
push 0x6b
push 5
push dword [esi + 0x224]
call edi
cmp eax, ebx
jne 0x401c9b
push 5
push 0x6b
push dword [esi + 0x224]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, ebx
je 0x401d31
push eax
push dword [esi + 0x224]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push 0x401bb3
push ebx
push eax
push dword [esi + 0x224]
call dword [sym.imp.USER32.dll_CreateDialogIndirectParamA]
mov dword [esi + 0x540], eax
lea eax, [ebp - 0xc]
push eax
push 0x9003
mov ecx, esi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
call fcn.00403e99
test al, al
je 0x401d21
lea eax, [esi + 0x270]
lea ecx, [ebp - 0xc]
push eax
call fcn.00404477
push eax
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x400]
push eax
push 0x9102
push dword [esi + 0x540]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
lea ecx, [ebp - 0x18]
call fcn.0040114d
lea ecx, [ebp - 0xc]
call fcn.0040114d
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402d3c
Capabilities:
Copy file
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x270
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp byte [esi + 0x22f], bl
jne 0x402ec9
cmp byte [esi + 0x22b], bl
jne 0x402ec9
cmp byte [esi + 0x22e], bl
je 0x402ec9
cmp byte [esi + 0x228], bl
jne 0x402ec9
lea eax, [ebp - 0x270]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x402ec9
lea eax, [ebp - 0x16c]
push eax
push ebx
lea eax, [ebp - 0x270]
push 0x407280
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x402ec9
lea eax, [ebp - 0x16c]
push ebx
push eax
lea ecx, [esi + 0x240]
call fcn.00404477
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x402ec9
push edi
push ebx
push 0x4000000
push 3
push ebx
push 1
lea eax, [ebp - 0x16c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0x10
mov dword [ebp - 8], eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x64]
push str.__clone_of_
rep stosd dword es:[edi], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x68], 0x44
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov edi, dword [sym.imp.OLEAUT32.dll_VariantInit]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x24c]
mov dword [ebp - 0x10], ebx
push eax
mov dword [ebp - 4], eax
call edi
push eax
lea ecx, [ebp - 0x14]
push dword [ebp - 4]
call fcn.00401700
push 0x407260
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push eax
mov dword [ebp - 4], eax
call edi
push eax
lea ecx, [ebp - 0x14]
push dword [ebp - 4]
call fcn.00401700
push dword [ebp - 4]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, dword [esi + 0x234]
push esi
call edi
push eax
push esi
lea ecx, [ebp - 0x14]
call fcn.00401700
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x14]
push eax
lea eax, [ebp - 0x68]
push eax
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
call fcn.00404477
push eax
lea eax, [ebp - 0x16c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x14]
call fcn.0040114d
lea ecx, [ebp - 0x24]
call fcn.00402ecf
cmp dword [ebp - 8], 0xffffffff
pop edi
je 0x402ec5
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x402ecb
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x403f80
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
and dword [ebp - 4], 0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 4]
push edi
mov ebx, 0xf003f
push eax
push ebx
push 0
mov edi, SysReAllocStringLen
push str..DefaultControl_PaneldesktopResourceLocale
push edi
mov dword [ebp - 0xc], 0xa
call esi
test eax, eax
jne 0x403fd5
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0x407430
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x404030
and dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
push ebx
push 0
push str..DEFAULTControl_PanelInternational
push edi
call esi
mov esi, eax
xor edi, edi
cmp esi, edi
jne 0x40400a
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
push edi
push str.Locale
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
cmp dword [ebp - 8], edi
je 0x404018
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, edi
je 0x404032
cmp dword [ebp - 4], edi
je 0x40402a
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ax, 0x409
jmp 0x40404f
xor edi, edi
lea eax, [ebp - 0x18]
push eax
call fcn.004048c0
cmp dword [ebp - 4], edi
pop ecx
mov esi, eax
je 0x40404c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ax, si
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10039a5
Capabilities:
Listen for remote procedure calls
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
xor ebx, ebx
push edi
mov dword [ebp - 0x14], ebx
call fcn.01004959
mov edi, eax
cmp edi, ebx
je 0x1006e29
push esi
mov esi, dword [sym.imp.RPCRT4.dll_RpcServerUseProtseqEpA]
push edi
push 0x1003ae4
push 0xa
push 0x1003ad8
call esi
test eax, eax
jne 0x1003ac3
push edi
push 0x1003ad0
push 0xa
push 0x1003ac8
call esi
test eax, eax
jne 0x1003ac3
lea eax, [ebp - 8]
push eax
push 0x20019
push ebx
push str.SystemCurrentControlSetControlPrint
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1003a82
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push 4
pop edi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push str.SerializeRpc
push dword [ebp - 8]
mov dword [ebp - 4], edi
call esi
lea eax, [ebp - 4]
push eax
push 0x100d3f8
lea eax, [ebp - 0xc]
push eax
push ebx
push str.CallExitProcessOnShutdown
push dword [ebp - 8]
mov dword [ebp - 4], edi
call esi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
push str.MaxRpcSize
push dword [ebp - 8]
mov dword [ebp - 4], edi
call esi
test eax, eax
je 0x1003a79
mov dword [ebp - 0x10], 0x100000
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
push dword [ebp - 0x10]
push 0xa
push ebx
push ebx
push ebx
push dword [0x100d518]
call dword [sym.imp.RPCRT4.dll_RpcServerRegisterIf2]
test eax, eax
jne 0x1003ac3
cmp dword [ebp - 0x14], ebx
jne 0x1006e30
push 0x8000
call dword [sym.imp.RPCRT4.dll_RpcMgmtSetServerStackSize]
push 1
push 0x1770
push 1
call dword [sym.imp.RPCRT4.dll_RpcServerListen]
pop esi
pop edi
pop ebx
leave
ret
xor eax, eax
jmp 0x1003abe
xor eax, eax
jmp 0x1003abf
call dword [sym.imp.RPCRT4.dll_I_RpcSsDontSerializeContext]
jmp 0x1003aa4

Function at 0x100412e
Capabilities:
Create thread

Disassembly:
push 0x18
push 0x1004180
call fcn.01002e06
xor esi, esi
mov dword [ebp - 4], esi
lea eax, [ebp - 0x24]
push eax
push esi
push esi
push 0x1003daa
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x1004173
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [ebp - 0x1c], eax
or dword [ebp - 4], 0xffffffff
call fcn.01002df5
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1004166
Function at 0x100461b
Capabilities:
Parse pe header

Disassembly:
push 0x28
push 0x1004738
call fcn.01002e06
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x1004729
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1004729
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
jne 0x1006d1f
cmp dword [ecx + 0x74], 0xe
jbe 0x1004729
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edi
push 1
call dword [sym.imp.msvcrt.dll___set_app_type]
pop ecx
or dword [0x100d218], 0xffffffff
or dword [0x100d214], 0xffffffff
call dword [sym.imp.msvcrt.dll___p__fmode]
mov ecx, dword [0x100d538]
mov dword [eax], ecx
call dword [sym.imp.msvcrt.dll___p__commode]
mov ecx, dword [0x100d534]
mov dword [eax], ecx
mov eax, dword [sym.imp.msvcrt.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x100d21c], eax
call fcn.010043ff
cmp dword [0x100d524], edi
je 0x1006d44
call fcn.01004937
push 0x100d428
push 0x100d424
call sub.msvcrt.dll__initterm
mov eax, dword [0x100d530]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push dword [0x100d52c]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.msvcrt.dll___getmainargs]
mov dword [ebp - 0x34], eax
push 0x100d420
push 0x100d418
call sub.msvcrt.dll__initterm
mov eax, dword [ebp - 0x20]
mov ecx, dword [sym.imp.msvcrt.dll___initenv]
mov dword [ecx], eax
push dword [ebp - 0x20]
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call fcn.010043c1
mov dword [ebp - 0x1c], edi
jmp 0x1004673
cmp eax, 0x20b
jne 0x1004729
cmp dword [ecx + 0x84], 0xe
jbe 0x1004729
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x100466d
push fcn.010043ff
call dword [sym.imp.msvcrt.dll___setusermatherr]
pop ecx
jmp 0x10046c6
Function at 0x10047b4
Capabilities:
Create thread
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push 0x100d3e0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
call fcn.01004407
call dword [sym.imp.ADVAPI32.dll_RegDisablePredefinedCache]
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push 0x1004904
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10047fb
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
push 0x100593c
push 0x10048f4
call dword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerExW]
cmp eax, esi
mov dword [0x100d20c], eax
je 0x1006cab
push 1
call fcn.0100431c
cmp eax, 1
mov dword [0x100d208], eax
jne 0x10048b5
push ebx
push edi
mov ebx, str.Spooler_exiting
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_OpenEventW]
mov edi, 0x1f0003
push edi
call esi
test eax, eax
jne 0x1006cbe
push 0x10048cc
push eax
xor edi, edi
inc edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
xor esi, esi
cmp eax, esi
mov dword [0x100d200], eax
je 0x1006ced
call fcn.010039a5
cmp eax, esi
jne 0x10048c2
push edi
call fcn.0100431c
lea eax, [ebp - 8]
push eax
push esi
push dword [0x100d20c]
push 0x100423c
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, esi
je 0x10048ba
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.01004915
cmp eax, esi
jne 0x10048c2
push 2
call fcn.0100431c
pop edi
pop ebx
pop esi
leave
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10048a8
push esi
push eax
push edi
call fcn.01007561
jmp 0x10048b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push eax
push esi
call fcn.01007561
jmp 0x10048b5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
call fcn.0100431c
cmp eax, 1
mov dword [0x100d208], eax
jne 0x10048b3
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push 0
jmp 0x1004842
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x10080de
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x100812a
cmp word [eax], 0
je 0x100812a
push esi
push eax
call sub.SPOOLSS.DLL_AllocSplStr
mov esi, eax
test esi, esi
je 0x1008129
lea eax, [ebp + 8]
push eax
push 0
push esi
push 0x10080bc
push 0x10000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x1008123
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1008129
push esi
call sub.SPOOLSS.DLL_DllFreeSplStr
pop esi
pop ebp
ret 4
Function at 0x100acd0
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x100d520]
and dword [ebp - 0x240], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0xa
pop ecx
mov esi, 0x100ad98
lea edi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x30]
movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.msvcrt.dll_wcslen]
push eax
call esi
test ebx, ebx
pop ecx
mov edi, eax
je 0x100ad7e
push ebx
call esi
cmp eax, edi
pop ecx
jb 0x100ad7e
push 0x104
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x100ad7e
push edi
lea eax, [ebp - 0x30]
push eax
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x100ad5a
lea eax, [ebx + edi*2]
push eax
push 0x105
lea eax, [ebp - 0x23c]
push eax
call fcn.0100ac97
jmp 0x100ad6c
push ebx
push 0x105
lea eax, [ebp - 0x23c]
push eax
call fcn.01009b32
mov dword [ebp - 0x240], eax
lea eax, [ebp - 0x23c]
push eax
call sym.spoolsv.exe_YDriverUnloadComplete
mov ecx, dword [ebp - 4]
xor eax, eax
cmp dword [ebp - 0x240], eax
pop edi
pop esi
setge al
pop ebx
call fcn.01004b6f
leave
ret 4

Function at 0x100ae1b
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push 0x100ae48
push dword [eax + 0xc]
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
jne 0x100ae3f
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
xor eax, eax
pop ebp
ret 4
Function at 0x405d8e
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.00406059
test bl, 8
mov dword [ebp - 8], eax
je 0x405dcd
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x46c2e8], eax
jmp 0x405f4a
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405de7
test eax, eax
je 0x405ef8
test bl, 2
je 0x405ef8
mov esi, 0x452750
push edi
push esi
call fcn.00406682
cmp dword [ebp + 8], 0
je 0x405e06
push 0x40a59c
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x405e0c
push edi
call fcn.00405f9d
cmp word [edi], 0
jne 0x405e1c
cmp word [0x452750], 0x5c
jne 0x405e27
push 0x40a014
push edi
call sub.KERNEL32.dll_lstrcatW
push edi
call sub.KERNEL32.dll_lstrlenW
lea ebx, [edi + eax*2]
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405eed
cmp word [ebp - 0x22c], 0x2e
jne 0x405e71
cmp word [ebp - 0x22a], 0
je 0x405ed0
cmp word [ebp - 0x22a], 0x2e
jne 0x405e71
cmp word [ebp - 0x228], 0
je 0x405ed0
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.00406682
test byte [ebp - 0x258], 0x10
je 0x405e9c
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405ed0
push dword [ebp + 0xc]
push edi
call fcn.00405d8e
jmp 0x405ed0
push dword [ebp - 4]
push edi
call fcn.00405d46
test eax, eax
jne 0x405ec8
cmp dword [ebp - 4], eax
je 0x405ec0
push edi
push 0xfffffffffffffff1
call fcn.00405707
push 0
push edi
call fcn.00406442
jmp 0x405ed0
inc dword [0x46c2e8]
jmp 0x405ed0
push edi
push 0xfffffffffffffff2
call fcn.00405707
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405e49
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405ef8
and word [ebx - 2], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405f4a
cmp dword [ebp - 8], esi
jne 0x405f0c
inc dword [0x46c2e8]
jmp 0x405f4a
push edi
call fcn.004069df
test eax, eax
je 0x405f4a
push edi
call fcn.00405f51
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405d46
test eax, eax
jne 0x405f42
cmp dword [ebp - 4], esi
je 0x405f04
push edi
push 0xfffffffffffffff1
call fcn.00405707
push esi
push edi
call fcn.00406442
jmp 0x405f4a
push edi
push 0xffffffffffffffe5
call fcn.00405707
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x402e70
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x402eac
movzx eax, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x402ecc
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.00404c60
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x403164
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004049f0
test esi, esi
jne 0x40319a
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00404ae0
jmp 0x4031b8
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00403008
mov edi, eax
test esi, esi
je 0x4031b8
cmp dword [ebx], 0
je 0x4031b8
dec esi
jmp 0x4031a1
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x40396c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x485020]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403a04
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4039e4
xor eax, eax
push ebp
push 0x4039dd
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403a20
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4039e4
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x485020]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x485020], ax
mov esp, ebp
pop ebp
ret

Function at 0x404850
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x490048], 0
je 0x4048b1
cmp word [0x49021c], 0xd7b2
jne 0x404879
cmp dword [0x490224], 0
jbe 0x404879
mov eax, 0x490218
call dword [0x490234]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x4048d8
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x48502c], 0
jne 0x4048cd
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret