joyce8/EMBER2024-capa huggingface dataset:
Function at 0x419e70
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42d0e1
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x43f838]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x20], ecx
xor esi, esi
mov dword [ebp - 0x1c], esi
mov eax, dword [0x440620]
mov edx, dword [eax + 0xc]
mov ecx, 0x440620
mov dword [ebp - 4], esi
call edx
mov ecx, dword [ebp + 8]
add eax, 0x10
mov dword [ecx], eax
mov ebx, dword [ebp + 0x10]
mov eax, 1
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], eax
mov esi, 0x2710
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041ed8f
mov edi, eax
add esp, 4
mov dword [ebp - 0x18], edi
test edi, edi
jne 0x419f08
mov byte [ebp - 0x11], al
push 0x439bd4
lea eax, [ebp - 0x11]
push eax
call fcn.0041e4c5
mov ecx, dword [ebp + 0xc]
mov dword [edi], 0
mov eax, dword [ecx]
mov ecx, dword [ebx]
push eax
push esi
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionW]
lea edx, [esi - 2]
cmp eax, edx
je 0x419fdd
mov ecx, dword [ebp - 0x20]
push eax
push edi
lea eax, [ebp + 0xc]
push eax
call fcn.00419c00
mov edx, dword [ebp + 8]
mov eax, dword [eax]
mov esi, dword [edx]
lea ecx, [eax - 0x10]
sub esi, 0x10
mov byte [ebp - 4], 2
cmp ecx, esi
je 0x419f98
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x419f8b
mov edx, dword [ecx]
cmp edx, dword [esi]
jne 0x419f8b
push ecx
call fcn.00401110
mov dword [ebp + 0x10], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x419f7e
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
add ecx, 0x10
mov dword [edx], ecx
jmp 0x419f98
mov ecx, dword [eax - 0xc]
push ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.00401250
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x419fbb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
cmp dword [edx - 0xc], 0
sete al
cmp al, 1
jne 0x41a00e
push 0x439bd4
lea eax, [ebp - 0x12]
push eax
mov byte [ebp - 0x12], 0
call fcn.0041e4c5
push edi
call fcn.0041ec2b
add esp, 4
mov dword [ebp - 0x18], 0
add esi, 0x3e8
jmp 0x419ed3
test edi, edi
je 0x41a01b
push edi
call fcn.0041ec2b
add esp, 4
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x41a9f0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42d1c1
mov eax, dword fs:[0]
push eax
sub esp, 0x920
mov eax, dword [0x43f838]
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
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
lea eax, [ebp + 0x14]
push eax
push ecx
push edx
lea ecx, [esi + 4]
call fcn.0041b350
cmp byte [esi + 0x10], 0
je 0x41ac0f
mov eax, dword [0x440620]
mov edx, dword [eax + 0xc]
mov ecx, 0x440620
call edx
add eax, 0x10
mov dword [ebp - 0x928], eax
mov ecx, dword [ebp + 0x10]
lea eax, [ebp + 0x14]
push eax
push ecx
lea edx, [ebp - 0x890]
push 0x3ff
push edx
mov dword [ebp - 4], 0
call fcn.0041fe94
add esp, 0x10
test eax, eax
js 0x41aa92
cmp eax, 0x3ff
ja 0x41aa92
jne 0x41aa9b
xor eax, eax
mov word [ebp - 0x92], ax
jmp 0x41aa9b
xor ecx, ecx
mov word [ebp - 0x92], cx
lea eax, [ebp - 0x890]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41aaa4
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x890]
push edx
lea ecx, [ebp - 0x928]
call fcn.00401250
mov ecx, dword [ebp - 0x928]
push 3
lea eax, [ebp - 0x920]
push ecx
lea ecx, [ebp - 0x924]
mov dword [ebp - 0x924], eax
call fcn.0041a390
mov eax, dword [ebp - 0x924]
mov byte [ebp - 4], 1
test eax, eax
je 0x41abd3
mov edx, SysReAllocString
mov ecx, eax
nop
cmp byte [ecx], 0
je 0x41ab0e
inc ecx
dec edx
jne 0x41ab00
jmp 0x41abd3
test edx, edx
je 0x41abd3
push eax
lea ecx, [ebp - 0x92c]
call fcn.0041a7e0
lea edx, [ebp - 0x8a0]
push edx
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x80
lea eax, [ebp - 0x90]
push eax
push 0
lea ecx, [ebp - 0x8a0]
push ecx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTimeFormatA]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
sub esp, 0x84
mov edi, esp
push eax
push ebx
lea edx, [ebp - 0x90]
push edx
lea eax, [ebp - 0x92c]
push str._s_:__0x_X_0x_X___s
mov ecx, 0x21
lea esi, [ebp - 0x924]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0041a7c0
mov ecx, dword [ebp - 0x92c]
add esp, 0x98
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [ebp - 0x92c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41abcd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x924]
lea ecx, [ebp - 0x920]
cmp eax, ecx
je 0x41abe6
push eax
call fcn.0041ea49
add esp, 4
mov eax, dword [ebp - 0x928]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41ac0f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.0041e946
mov esp, ebp
pop ebp
ret
Function at 0x41adb0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
cmp dword [esi + 4], 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
jne 0x41ae28
mov ebx, dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 4], eax
test ebx, ebx
je 0x41ae24
test eax, eax
je 0x41ae24
push str.DebugOpen
push eax
call edi
mov dword [esi + 0xc], eax
mov eax, dword [esi + 4]
push str.DebugClose
push eax
call edi
mov ecx, dword [esi + 4]
push str.TraceWrite
push ecx
mov dword [esi + 0x10], eax
call edi
mov edx, dword [esi + 4]
push str.DumpWrite
push edx
mov dword [esi + 0x14], eax
call edi
cmp dword [esi + 0xc], 0
mov dword [esi + 0x18], eax
je 0x41ae24
cmp dword [esi + 0x10], 0
je 0x41ae24
cmp dword [esi + 0x14], 0
je 0x41ae24
test eax, eax
jne 0x41ae28
xor ebx, ebx
jmp 0x41ae2d
mov ebx, 1
cmp dword [esi + 8], 0
jne 0x41ae93
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 8], eax
test eax, eax
je 0x41ae8f
push str.DebugOpen
push eax
call edi
mov ecx, dword [esi + 8]
push str.DebugClose
push ecx
mov dword [esi + 0x1c], eax
call edi
mov edx, dword [esi + 8]
push str.TraceWrite
push edx
mov dword [esi + 0x20], eax
call edi
mov dword [esi + 0x24], eax
mov eax, dword [esi + 8]
push str.DumpWrite
push eax
call edi
cmp dword [esi + 0x1c], 0
mov dword [esi + 0x28], eax
je 0x41ae8f
cmp dword [esi + 0x20], 0
je 0x41ae8f
cmp dword [esi + 0x24], 0
je 0x41ae8f
test eax, eax
jne 0x41ae93
xor eax, eax
jmp 0x41ae98
mov eax, 1
test ebx, ebx
je 0x41ae9e
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x41aff0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x18]
push esi
lea edx, [ebp - 4]
push edx
push 0x20019
xor esi, esi
lea ecx, [eax + eax]
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp + 0x18], ecx
mov ecx, dword [ebp + 8]
push eax
push ecx
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x41b04d
mov eax, dword [ebp + 0x14]
lea edx, [ebp + 0x18]
push edx
mov edx, dword [ebp + 0x10]
push eax
mov eax, dword [ebp - 4]
lea ecx, [ebp - 8]
push ecx
push esi
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [ebp - 4]
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 0x14
Function at 0x41b060
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp dword [esi + 4], 0
jne 0x41b12f
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 4], eax
test eax, eax
je 0x41b128
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.OpenA
push eax
call edi
mov ecx, dword [esi + 4]
push str.CloseA
push ecx
mov dword [esi + 8], eax
call edi
mov edx, dword [esi + 4]
push str.TraceWriteA
push edx
mov dword [esi + 0xc], eax
call edi
mov dword [esi + 0x10], eax
mov eax, dword [esi + 4]
push str.DumpWriteA
push eax
call edi
mov ecx, dword [esi + 4]
push str.OpenW
push ecx
mov dword [esi + 0x14], eax
call edi
mov edx, dword [esi + 4]
push str.CloseW
push edx
mov dword [esi + 0x18], eax
call edi
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 4]
push str.TraceWriteW
push eax
call edi
mov ecx, dword [esi + 4]
push str.DumpWriteW
push ecx
mov dword [esi + 0x20], eax
call edi
cmp dword [esi + 8], 0
mov dword [esi + 0x24], eax
pop edi
je 0x41b128
cmp dword [esi + 0xc], 0
je 0x41b128
cmp dword [esi + 0x10], 0
je 0x41b128
cmp dword [esi + 0x14], 0
je 0x41b128
cmp dword [esi + 0x18], 0
je 0x41b128
cmp dword [esi + 0x1c], 0
je 0x41b128
cmp dword [esi + 0x20], 0
je 0x41b128
test eax, eax
jne 0x41b12f
xor eax, eax
pop esi
pop ebp
ret 4
mov eax, 1
pop esi
pop ebp
ret 4

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x43f838]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, ecx
mov ecx, dword [edi + 4]
xor eax, eax
test ecx, ecx
je 0x41bf7c
cmp dword [ecx + 4], eax
setne al
test eax, eax
jne 0x41bf7c
mov ecx, 0x208
lea eax, [ebp - 0x20c]
lea esp, [esp]
mov byte [eax], 0
inc eax
dec ecx
jne 0x41bef0
push esi
push 0x104
lea eax, [ebp - 0x20c]
push eax
push str.BrLogAPI
push str.SoftwareBrotherBrUtilities
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0041aff0
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
mov esi, eax
call dword [sym.imp.SHELL32.dll_DoEnvironmentSubstW]
test esi, esi
pop esi
jne 0x41bf43
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41bf6d
mov ecx, 0x208
lea eax, [ebp - 0x20c]
mov edi, edi
mov byte [eax], 0
inc eax
dec ecx
jne 0x41bf50
push 0x4352ac
push 0x104
lea eax, [ebp - 0x20c]
push eax
call fcn.0041b440
lea ecx, [ebp - 0x20c]
push ecx
mov ecx, dword [edi + 4]
call fcn.0041b060
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.0041e946
mov esp, ebp
pop ebp
ret

Function at 0x41e946
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x43f838]
jne 0x41e950
repz ret
jmp fcn.00421fcf
Function at 0x42812c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43f838]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.004219c0
and dword [ebp - 0x14], 0
cmp dword [0x441a64], 0
mov dword [ebp - 0x18], eax
jne 0x4281df
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x428287
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x436ea4
push ebx
call edi
test eax, eax
je 0x428287
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x441a64], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x441a68], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x441a6c], eax
call edi
push eax
call esi
mov dword [0x441a74], eax
test eax, eax
je 0x4281df
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x441a70], eax
mov eax, dword [0x441a70]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x428238
cmp dword [0x441a74], ecx
je 0x428238
push eax
call esi
push dword [0x441a74]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x428238
test ebx, ebx
je 0x428238
call edi
test eax, eax
je 0x42822f
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x42822f
test byte [ebp - 8], 1
jne 0x428238
or dword [ebp + 0x10], 0x200000
jmp 0x42826b
mov eax, dword [0x441a68]
cmp eax, dword [ebp - 0x18]
je 0x42826b
push eax
call esi
test eax, eax
je 0x42826b
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x42826b
mov eax, dword [0x441a6c]
cmp eax, dword [ebp - 0x18]
je 0x42826b
push eax
call esi
test eax, eax
je 0x42826b
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x441a64]
call esi
test eax, eax
je 0x428287
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x428289
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041e946
leave
ret
Function at 0x401201
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x5208
call fcn.0040af30
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
push 0x80
push 3
push edi
push 3
push 0xc0000000
push 0x417118
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x401304
push ebx
mov dword [ebp - 4], edi
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp - 0x5208]
push 0x5000
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ebx, eax
lea eax, [ebp - 0x208]
push 0x417114
push eax
mov word [ebp - 0x208], di
call fcn.0040a9fd
pop ecx
cmp ebx, edi
pop ecx
je 0x4012fb
mov eax, dword [ebp - 4]
push dword [ebp - 4]
shr eax, 1
mov word [ebp + eax*2 - 0x5208], di
lea eax, [ebp - 0x5208]
push eax
call fcn.00401412
mov ecx, eax
call fcn.00401033
cmp eax, edi
je 0x4012b2
mov edx, dword [eax]
lea ecx, [ebp - 0x208]
push ecx
mov ecx, eax
call dword [edx + 4]
jmp 0x4012cc
lea eax, [ebp - 0x208]
push str._9999
push eax
mov word [ebp - 0x208], di
call fcn.0040a9fd
pop ecx
pop ecx
lea eax, [ebp - 8]
push edi
push eax
lea eax, [ebp - 0x208]
push eax
mov dword [ebp - 8], edi
call fcn.0040a9e0
pop ecx
shl eax, 1
push eax
lea eax, [ebp - 0x208]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x40123e
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop ebx
pop edi
pop esi
leave
ret

Function at 0x401368
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x310
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
push edi
xor edi, edi
cmp ecx, edi
je 0x4013af
mov eax, dword [ecx]
lea edx, [ebp - 4]
push edx
lea edx, [ebp - 0x310]
push edx
call dword [eax + 8]
lea eax, [ebp - 8]
push edi
push eax
mov eax, dword [ebp - 4]
add eax, eax
mov dword [ebp - 8], edi
push eax
lea eax, [ebp - 0x310]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x4013b3
xor al, al
jmp 0x4013f4
lea eax, [ebp + 8]
push edi
push eax
lea eax, [ebp - 0x108]
push 0xfe
push eax
push dword [esi]
mov dword [ebp + 8], edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [ebp + 8]
shr eax, 1
cmp dword [ebp + 0xc], edi
mov word [ebp + eax*2 - 0x108], di
je 0x4013f2
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0xc]
call fcn.0040aa27
pop ecx
pop ecx
mov al, 1
pop edi
pop esi
leave
ret 8

Function at 0x4016a1
Capabilities:
Create directory
Delete file

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call fcn.0040258c
push dword [esp + 0x10]
push esi
push 0x417270
push esi
call fcn.0040af5f
add esp, 0x14
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4016e5
push esi
call fcn.00402535
test al, al
pop ecx
je 0x4016dc
push esi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
pop esi
ret
Function at 0x401ca2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push ebx
push esi
mov esi, ecx
call fcn.00401c96
test al, al
je 0x401d71
lea eax, [ebp - 4]
xor ebx, ebx
push eax
mov eax, dword [esi + 0x19004]
shr eax, 1
push eax
push esi
mov dword [ebp - 4], ebx
call fcn.00401b71
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
add esp, 0xc
cmp byte [eax], bl
je 0x401d71
push edi
mov edi, dword [ebp + 8]
lea eax, [edi + 0x1340]
push eax
lea eax, [ebp - 0x410]
push str._sinit.xml
push eax
call fcn.0040af5f
add esp, 0xc
lea eax, [ebp - 0x410]
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x401d3e
lea eax, [ebp + 8]
push ebx
push eax
push dword [ebp - 8]
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x401d67
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
lea eax, [ebp - 0x208]
push str.createInitXml__d
push eax
call fcn.0040af5f
add esp, 0xc
lea eax, [ebp - 0x208]
mov ecx, edi
push eax
call fcn.00401e91
push dword [ebp - 4]
call fcn.0040a7f0
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x402091
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
push esi
push edi
push 0x44
pop edi
push edi
push 0x40
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov esi, eax
mov eax, dword [ebp + 0xc]
neg eax
sbb eax, eax
mov dword [ebp - 4], 0xfffffffb
and al, 0xf6
mov dword [esi], edi
add eax, 0xa
xor edi, edi
mov word [esi + 0x30], ax
mov eax, dword [ebp + 0x14]
push str.Execute_process__WAIT_cmd:
mov dword [esi + 0x2c], 0x101
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
mov dword [esi + 0x38], edi
call fcn.004067b1
mov ecx, eax
call fcn.004067b7
push dword [ebp + 8]
call fcn.004067b1
mov ecx, eax
call fcn.004067b7
lea eax, [ebp - 0x14]
push eax
push esi
push edi
push edi
push edi
push 1
push edi
push edi
push dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.DLL_CreateProcessW]
test eax, eax
je 0x402186
push 0xc8
call dword [sym.imp.KERNEL32.DLL_Sleep]
push 0xffffffffffffffff
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
push str.End_waiting_process_:
call fcn.004067b1
mov ecx, eax
call fcn.004067b7
push dword [ebp + 8]
call fcn.004067b1
mov ecx, eax
call fcn.004067b7
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_GetExitCodeProcess]
test eax, eax
je 0x402176
cmp dword [ebp - 4], 0x103
jne 0x40217d
push 0xffffffffffffffff
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
mov dword [ebp - 4], 0xfffffffc
jmp 0x40217d
mov dword [ebp - 4], 0xfffffffe
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 4], edi
pop edi
pop esi
je 0x4021b7
push dword [ebp - 4]
lea eax, [ebp - 0x214]
push str.Exit_code_is__d
push eax
call fcn.0040af5f
add esp, 0xc
lea eax, [ebp - 0x214]
push eax
call fcn.004067b1
mov ecx, eax
call fcn.004067c8
mov eax, dword [ebp - 4]
leave
ret
Function at 0x4021bc
Capabilities:
Create pipe
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push 0xc
lea eax, [ebp - 0x18]
pop esi
push esi
push 0
push eax
call fcn.0040b380
add esp, 0xc
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], 1
push 0
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.DLL_CreatePipe]
push dword [ebp - 8]
push dword [ebp - 4]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00402091
push dword [ebp + 0x14]
mov ebx, eax
push 0
push dword [ebp + 0x10]
call fcn.0040b380
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
add esp, 0x1c
push dword [ebp - 8]
call esi
lea eax, [ebp - 0xc]
push 0
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push dword [ebp - 4]
call esi
mov eax, ebx
pop esi
pop ebx
leave
ret

Function at 0x402257
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push str.extract_resource_file
call fcn.004067b1
mov ecx, eax
call fcn.004067b7
push dword [ebp + 8]
call fcn.004067b1
mov ecx, eax
call fcn.004067b7
movzx eax, word [ebp + 0xc]
push dword [ebp + 0x10]
xor ebx, ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_FindResourceW]
mov esi, eax
cmp esi, ebx
je 0x402305
push esi
push ebx
call dword [sym.imp.KERNEL32.DLL_LoadResource]
push esi
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp + 8]
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], ebx
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4022e6
lea eax, [ebp + 0x10]
push ebx
push eax
push dword [ebp + 0xc]
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x4022dd
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x402316
push str.Cant_create_file
call fcn.004067b1
mov ecx, eax
call fcn.004067c8
call fcn.004067b1
mov ecx, eax
call fcn.004067d9
jmp 0x402316
push str.Resource_file_is_not_found
call fcn.004067b1
mov ecx, eax
call fcn.004067c8
pop edi
mov al, bl
pop esi
pop ebx
pop ebp
ret
Function at 0x40231d
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1400
call fcn.0040af30
lea eax, [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x14]
push eax
push dword [ebp + 0xc]
and word [esi], 0
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x4023c3
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x400
push eax
lea eax, [ebp - 0x400]
push eax
lea eax, [ebp + 8]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4023ba
mov eax, dword [ebp + 8]
cmp eax, 1
je 0x402385
cmp eax, 2
je 0x40238a
cmp eax, 7
je 0x402385
cmp eax, 3
jne 0x4023ba
cmp eax, 2
jne 0x4023ab
lea eax, [ebp - 0x1400]
push 0x1000
push eax
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x1400]
jmp 0x4023b1
lea eax, [ebp - 0x400]
push eax
push esi
call fcn.0040aa27
pop ecx
pop ecx
push dword [ebp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
leave
ret

Function at 0x402401
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
lea eax, [ebp + 0xc]
push esi
push eax
push esi
push 0xf003f
push esi
push esi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40244e
push dword [ebp + 0x14]
call fcn.0040a9e0
pop ecx
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0x14]
push 1
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
ret

Function at 0x402451
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
lea eax, [ebp + 0xc]
push esi
push eax
push esi
push 0xf003f
push esi
push esi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x402493
lea eax, [ebp + 0x14]
push 4
push eax
push 4
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40254c
test al, 0x10
jne 0x40254c
push 1
pop eax
ret
xor eax, eax
ret