joyce8/EMBER2024-capa huggingface dataset:
Function at 0x413e42
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x41e584]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x413e8b
call ebp
mov esi, eax
cmp esi, ebx
je 0x413e71
mov dword [0x41e584], 1
jmp 0x413e90
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x413e86
push 2
pop eax
mov dword [0x41e584], eax
jmp 0x413e8b
mov eax, dword [0x41e584]
cmp eax, 1
jne 0x413ee8
cmp esi, ebx
jne 0x413ea3
call ebp
mov esi, eax
cmp esi, ebx
jne 0x413ea3
xor eax, eax
jmp 0x413f8f
cmp word [esi], bx
mov eax, esi
je 0x413eb8
inc eax
inc eax
cmp word [eax], bx
jne 0x413eaa
inc eax
inc eax
cmp word [eax], bx
jne 0x413eaa
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.0040fb69
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x413edb
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x413f8f
push ebp
push esi
push edi
call fcn.00410050
add esp, 0xc
jmp 0x413ecd
cmp eax, 2
je 0x413ef1
cmp eax, ebx
jne 0x413e9c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x413e9c
cmp byte [ebp], bl
mov esi, ebp
je 0x413f27
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x413e9c
push esi
add edi, eax
call fcn.0040ffc0
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x413f04
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.0040fb69
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x413fa0
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x413f81
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x10]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x413f96
push edi
call fcn.0040ffc0
push esi
lea edi, [edi + eax + 1]
call fcn.0040faac
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x413f47
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x10]
call fcn.0040f1f9
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x413e9c
Function at 0x413fac
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x41e588]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x413fec
call esi
test eax, eax
je 0x413fd1
mov dword [0x41e588], 1
jmp 0x413ff1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x413fe8
mov dword [0x41e588], 2
jmp 0x413ffa
xor eax, eax
jmp 0x414048
cmp eax, 1
jne 0x413ff5
call esi
jmp 0x414048
cmp eax, 2
jne 0x413fe8
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebp
push ebp
push 0xffffffffffffffff
mov ebx, eax
push ebx
push 1
push ebp
call edi
mov esi, eax
cmp esi, ebp
je 0x414040
lea eax, [esi + esi]
push eax
call fcn.0040fb69
mov ebp, eax
test ebp, ebp
pop ecx
je 0x414040
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x414044
push ebp
call fcn.0040f1f9
pop ecx
xor eax, eax
jmp 0x414046
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret

Function at 0x41453a
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.0040fb80
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4145d5
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x41e32c]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x4145d5
cmp eax, 1
je 0x4145f6
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4145d5
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4145a2
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4145d1
xor eax, eax
inc eax
jmp 0x414615
cmp edi, eax
jae 0x4145d9
xor eax, eax
jmp 0x414615
cmp eax, esi
jae 0x4145e0
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x41e32c]
jmp 0x4145f9
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4156f1
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x41d170]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x415722
xor eax, eax
jmp 0x4158ab
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x41f980]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x41575e
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00416c8c
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x415839
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x415877
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x4157c2
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4157b3
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x415793
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415802
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x41580b
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x415784
jmp 0x41580d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x4158a6
cmp dword [ebp - 0x6c], edi
je 0x415877
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x41586c
call fcn.004154fd
mov dword [eax], 9
call fcn.00415506
mov dword [eax], esi
jmp 0x4158a1
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x415861
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x41580d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x41580d
push dword [ebp - 0x6c]
call fcn.0041550f
pop ecx
jmp 0x4158a1
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x41588f
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x41588f
xor eax, eax
jmp 0x4158a9
call fcn.004154fd
mov dword [eax], 0x1c
call fcn.00415506
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x4158a9
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.004103e0
add ebp, 0x3a0
leave
ret
Function at 0x41657d
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x41e614], ebx
push esi
push edi
jne 0x4165fd
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x416638
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x41e614], eax
je 0x416638
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x41e618], eax
call esi
cmp dword [0x41e32c], 2
mov dword [0x41e61c], eax
jne 0x4165fd
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x41e624], eax
je 0x4165fd
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x41e620], eax
mov eax, dword [0x41e620]
test eax, eax
je 0x416642
call eax
test eax, eax
je 0x416629
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x41e624]
test eax, eax
je 0x416629
test byte [ebp - 8], 1
jne 0x416642
cmp dword [0x41e338], 4
jb 0x41663c
or byte [ebp + 0x12], 0x20
jmp 0x416661
xor eax, eax
jmp 0x416671
or byte [ebp + 0x12], 4
jmp 0x416661
mov eax, dword [0x41e618]
test eax, eax
je 0x416661
call eax
mov ebx, eax
test ebx, ebx
je 0x416661
mov eax, dword [0x41e61c]
test eax, eax
je 0x416661
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x41e614]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4034a0
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x23c
mov edx, dword [0x42d290]
mov eax, dword [0x42c17c]
push ebx
xor ebx, ebx
cmp edx, ebx
push esi
mov dword [esp + 0x240], eax
push edi
jne 0x403501
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
push 0x1c
lea ecx, [esp + 0x20]
mov dword [esp + 0x30], eax
push ecx
mov dword [esp + 0x38], eax
push 0x42d290
mov dword [esp + 0x28], ebx
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov edx, dword [esp + 0x20]
mov dword [0x42d290], edx
xor eax, eax
mov word [esp + 0x38], bx
mov ecx, 0x81
lea edi, [esp + 0x3a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [esp + 0x3c]
push eax
push edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x3c]
push edx
mov dword [esp + 0x20], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
cmp esi, ebx
je 0x403559
lea eax, [esi + esi]
push eax
call fcn.004155f2
mov edi, eax
add esp, 4
cmp edi, ebx
jne 0x40356e
xor eax, eax
mov ecx, dword [esp + 0x244]
call fcn.0041575b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push esi
push ebx
lea ecx, [esp + 0x44]
push ecx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x4035f2
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
push eax
push 0x423688
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x4035f2
mov eax, dword [esp + 0x10]
mov esi, dword [eax + 0x30]
push esi
mov esi, dword [eax + 0x2c]
push esi
mov esi, dword [eax + 0x28]
push esi
mov esi, dword [eax + 0x24]
push esi
mov esi, dword [eax + 0x20]
mov ecx, dword [eax + 0xc]
push esi
mov esi, dword [eax + 0x18]
mov edx, dword [eax + 8]
push esi
mov esi, dword [eax + 0x1c]
push esi
mov esi, dword [eax]
push esi
mov esi, dword [eax + 0x14]
push esi
mov esi, dword [eax + 0x10]
push esi
push ecx
push edx
movzx esi, cx
push esi
shr ecx, 0x10
push ecx
movzx ecx, dx
push ecx
shr edx, 0x10
push edx
push str.FileVersion_:__d._d._d._d___FileVersionMS_:_0x_08x__FileVersionLS_:_0x_08x__ProductVersionMS_:_0x_08x__ProductVersionLS_:_0x_08x__Signature_:_0x_08x__FileFlags_:_0x_08x__FileFlagsMask_:_0x_08x__FileOS_:_0x_08x__FileType_:_0x_08x__FileSubType_:_0x_08x__FileDateMS_:_0x_08x__FileDateLS_:_0x_08x__
push 0x168
push 0x42d298
call fcn.0041651d
add esp, 0x4c
push edi
call fcn.0041599c
mov ax, word [0x42d298]
mov ecx, dword [esp + 0x248]
add esp, 4
neg ax
sbb eax, eax
and eax, 0x42d298
call fcn.0041575b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4037d0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov eax, dword [0x42c17c]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [esp + 0x11c], eax
xor eax, eax
test esi, esi
mov byte [esp + 0x10], 0
mov ecx, 0x40
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x403890
mov al, byte [esi + 1]
test al, al
lea ecx, [esi + 1]
mov dword [esp + 0xc], ecx
je 0x403876
mov ebx, ecx
sub ebx, esi
lea ecx, [ecx]
cmp al, 0x5c
jne 0x403869
mov ecx, ebx
mov eax, ecx
shr ecx, 2
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
mov byte [esp + ebx + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x403851
test al, 0x10
jne 0x403862
push 0
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x403890
mov esi, dword [ebp + 8]
mov ecx, dword [esp + 0xc]
mov al, byte [ecx + 1]
inc ecx
inc ebx
test al, al
mov dword [esp + 0xc], ecx
jne 0x403820
mov eax, 1
mov ecx, dword [esp + 0x11c]
call fcn.0041575b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x11c]
xor eax, eax
call fcn.0041575b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4038b0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x214
mov eax, dword [0x42c17c]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [esp + 0x21c], eax
xor eax, eax
test esi, esi
mov word [esp + 0x10], 0
mov ecx, 0x81
lea edi, [esp + 0x12]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
je 0x403980
mov ax, word [esi + 2]
test ax, ax
lea ecx, [esi + 2]
mov dword [esp + 0xc], ecx
je 0x403966
mov ebx, ecx
sub ebx, esi
cmp ax, 0x5c
jne 0x403953
mov eax, ebx
sar eax, 1
shl eax, 1
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [esp + eax + 0x10], 0
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40393b
test al, 0x10
jne 0x40394c
push 0
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x403980
mov ecx, dword [esp + 0xc]
mov esi, dword [ebp + 8]
mov ax, word [ecx + 2]
add ecx, 2
add ebx, 2
test ax, ax
mov dword [esp + 0xc], ecx
jne 0x403900
mov eax, 1
mov ecx, dword [esp + 0x21c]
call fcn.0041575b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x21c]
xor eax, eax
call fcn.0041575b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x407490
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x421b51
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c0
mov eax, dword [0x42c17c]
push ebx
push esi
push edi
xor edi, edi
mov dword [esp + 0x4c4], eax
mov ebx, ecx
mov dword [esp + 0x64], 7
mov dword [esp + 0x60], edi
mov word [esp + 0x50], di
lea ecx, [ebx + 0xf8]
mov eax, ecx
mov dword [esp + 0x4d4], edi
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], edi
mov byte [esp + 0x18], 0
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4074f8
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401d40
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x18]
push ecx
mov byte [esp + 0x4dc], 1
call fcn.00406f30
mov eax, dword [esp + 0x34]
add esp, 8
cmp eax, 0x10
jb 0x40753c
mov edx, dword [esp + 0x18]
push edx
call fcn.0041599c
add esp, 4
cmp dword [esp + 0x64], 8
jb 0x40754d
mov eax, dword [esp + 0x50]
mov dword [esp + 0x10], eax
jmp 0x407555
lea ecx, [esp + 0x50]
mov dword [esp + 0x10], ecx
mov edx, dword [ebp + 8]
mov word [esp + 0x68], di
xor eax, eax
mov ecx, 0x81
lea edi, [esp + 0x6a]
rep stosd dword es:[edi], eax
push edx
mov ecx, ebx
stosw word es:[edi], ax
call fcn.00403620
push eax
mov eax, dword [esp + 0x18]
push str.TSLOG
push eax
push str._s_s._s__d_..log
lea ecx, [esp + 0x7c]
push 0x104
push ecx
call fcn.0041651d
add esp, 0x1c
lea edx, [esp + 0x270]
push edx
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
xor edi, edi
mov esi, eax
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], edi
mov word [esp + 0x34], di
cmp esi, 0xffffffff
mov byte [esp + 0x4d4], 2
je 0x40766a
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0041630e
mov edx, dword [esp + 0x14]
add esp, 4
push eax
push edx
lea ecx, [esp + 0x38]
call fcn.00406560
lea eax, [esp + 0x29c]
push eax
call fcn.0041630e
add esp, 4
push eax
lea ecx, [esp + 0x2a0]
push ecx
lea ecx, [esp + 0x38]
call fcn.00406440
cmp dword [esp + 0x48], 8
mov eax, dword [esp + 0x34]
jae 0x407622
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x407651
cmp dword [esp + 0x48], 8
mov eax, dword [esp + 0x34]
jae 0x40763c
lea eax, [esp + 0x34]
push eax
call edi
push eax
call edi
push eax
push str.DeleteLogFile_Failed__ErrorCode_:__d_0x_08x___LogFilePath_:__s
push ebx
call fcn.0040b480
add esp, 0x14
lea edx, [esp + 0x270]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4075d5
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x48]
mov esi, 8
cmp eax, esi
jb 0x40768b
mov eax, dword [esp + 0x34]
push eax
call fcn.0041599c
add esp, 4
cmp dword [esp + 0x64], esi
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], edi
mov word [esp + 0x34], di
jb 0x4076af
mov ecx, dword [esp + 0x50]
push ecx
call fcn.0041599c
add esp, 4
mov ecx, dword [esp + 0x4cc]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x4c4]
call fcn.0041575b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x40aea0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [0x42e9ac]
test eax, eax
push esi
mov esi, ecx
jne 0x40af48
mov eax, dword [esi + 0x24]
cmp eax, 0xffffffff
jne 0x40af1f
push edi
push 0x11f
push 0
push str.C:TSLOG_CONFIG_
call dword [sym.imp.KERNEL32.dll_FindFirstChangeNotificationW]
cmp eax, 0xffffffff
mov dword [esi + 0x24], eax
je 0x40af17
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push str.C:TSLOG_CONFIGTSLOG.ini
call edi
cmp eax, 0xffffffff
jne 0x40af0e
push str.C:TSLOG_CONFIGTSLOG.txt
call edi
cmp eax, 0xffffffff
jne 0x40af0e
push str.C:TSLOG_CONFIGTSLOG.ini
call edi
cmp eax, 0xffffffff
jne 0x40af0e
push str.C:TSLOG_CONFIGTSLOG.txt
call edi
cmp eax, 0xffffffff
jne 0x40af0e
pop edi
xor eax, eax
pop esi
ret
push 0
mov ecx, esi
call fcn.00409e40
pop edi
mov eax, 1
pop esi
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40af4c
cmp eax, 0x102
je 0x40af48
push 0x11f
push 0
push str.C:TSLOG_CONFIG_
call dword [sym.imp.KERNEL32.dll_FindFirstChangeNotificationW]
mov dword [esi + 0x24], eax
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_FindCloseChangeNotification]
push 0
mov ecx, esi
mov dword [esi + 0x24], 0xffffffff
call fcn.00409e40
test eax, eax
je 0x40af7f
push 0x11f
push 0
push str.C:TSLOG_CONFIG_
call dword [sym.imp.KERNEL32.dll_FindFirstChangeNotificationW]
mov dword [esi + 0x24], eax
mov eax, 1
pop esi
ret
Function at 0x40b480
Capabilities:
Set thread local storage value

Disassembly:
mov eax, dword [0x42c0f0]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0
push eax
call esi
mov ecx, dword [0x42c0ec]
push 0
push ecx
call esi
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
push 0
push 0
lea edx, [esp + 0x18]
push edx
push eax
push 6
call fcn.0040af90
pop esi
ret
Function at 0x40d800
Capabilities:
Create thread

Disassembly:
push esi
mov esi, ecx
mov al, byte [esi + 0x1c]
test al, al
je 0x40d818
mov al, byte [esp + 8]
test al, al
jne 0x40d818
xor al, al
pop esi
ret 4
mov eax, dword [esi + 0x18]
test eax, eax
jge 0x40d826
mov dword [esi + 0x18], 0
mov eax, dword [esi + 0x10]
test eax, eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x40d837
push eax
call edi
mov eax, dword [esi + 4]
test eax, eax
je 0x40d841
push eax
call edi
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x10], eax
lea eax, [esi + 8]
push eax
push 0
push esi
push 0x40d7a0
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 4], eax
pop edi
mov byte [esi + 0x1c], 1
mov al, 1
pop esi
ret 4

Function at 0x40d9b0
Capabilities:
Delete service
Stop service

Disassembly:
sub esp, 0x1c
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x40d9ce
pop edi
add esp, 0x1c
ret
push esi
push 0xf01ff
push 0x426bfc
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x40d9f5
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
xor eax, eax
pop edi
add esp, 0x1c
ret
push ebx
lea eax, [esp + 0xc]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x40da10
call ebx
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x40da26
call ebx
pop ebx
pop esi
xor eax, eax
pop edi
add esp, 0x1c
ret
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
test eax, eax
je 0x40da1b
push edi
call esi
test eax, eax
je 0x40da1b
pop ebx
pop esi
mov eax, 1
pop edi
add esp, 0x1c
ret

Function at 0x40da50
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x218
mov eax, dword [0x42c17c]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [esp + 0x21c], eax
xor eax, eax
mov word [esp + 0x10], 0
mov ecx, 0x81
lea edi, [esp + 0x12]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x10]
push esi
push eax
call fcn.004172f0
add esp, 8
push esi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea ecx, [esp + 0x10]
push ecx
mov esi, eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov ecx, dword [ebp + 8]
lea edx, [esp + 0xc]
push edx
push 0x20006
push 0
lea eax, [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40dadb
mov edx, dword [esp + 0xc]
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x21c]
mov eax, 1
call fcn.0041575b
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40db00
Capabilities:
Enumerate processes

Disassembly:
sub esp, 0x230
mov eax, dword [0x42c17c]
push esi
push edi
xor edi, edi
mov dword [esp + 0x234], eax
mov eax, dword [esp + 0x240]
push edi
push 2
mov dword [eax], 0
mov dword [esp + 0x10], 0x22c
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
lea ecx, [esp + 8]
mov esi, eax
push ecx
push esi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x40db84
push ebx
mov ebx, dword [esp + 0x240]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push ebx
lea edx, [esp + 0x38]
push edx
call ebp
test eax, eax
je 0x40db70
lea eax, [esp + 0x10]
push eax
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x40db53
jmp 0x40db82
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x248]
mov edi, 1
mov dword [edx], ecx
pop ebp
pop ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x234]
mov eax, edi
pop edi
pop esi
call fcn.0041575b
add esp, 0x230
ret 8