joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100c6eb
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
lea eax, [ebp - 0x14]
push eax
xor ebx, ebx
push ebx
push 0x1001d3c
push dword [ebp + 0xc]
xor esi, esi
inc esi
mov dword [ebp - 4], esi
call dword [sym.imp.UPDSPAPI.dll_UpdSpFindFirstLineA]
test eax, eax
je 0x100c823
push ebx
push 0x80
push 4
push ebx
push esi
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
je 0x100c805
push edi
push 2
push ebx
push ebx
push eax
mov dword [ebp + 8], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x1001d0c
mov edi, 0x106f8a0
push edi
mov byte [0x106f8a0], bl
call dword [sym.imp.ntdll.dll_sprintf]
pop ecx
mov esi, eax
pop ecx
add esi, edi
push ebx
push 0x1000
push 0x106e760
push ebx
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpGetLineTextA]
test eax, eax
je 0x100c79c
push 0x106e760
push 0x1001d04
push esi
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0xc
add esi, eax
jmp 0x100c7b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x102dc68
push 0x1001cc0
call fcn.01015c5a
add esp, 0xc
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x14]
push eax
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpFindNextLine]
test eax, eax
jne 0x100c768
push ebx
lea eax, [ebp + 8]
push eax
sub esi, edi
push esi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
pop edi
jne 0x100c7fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x102dc68
push 0x1001c80
call fcn.01015c5a
add esp, 0xc
mov dword [ebp - 4], ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100c846
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
push 0x102dc68
push 0x1001c40
call fcn.01015c5a
add esp, 0x10
jmp 0x100c843
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe0000102
je 0x100c846
push eax
push 0x102dc68
push 0x1001bd0
call fcn.01015c5a
add esp, 0xc
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret 8
Function at 0x100ca74
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
lea eax, [ebp - 8]
push eax
push 0x2001f
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
je 0x100cab1
cmp eax, 1
jle 0x100cb57
cmp eax, 3
jg 0x100cb57
xor eax, eax
jmp 0x100cb57
push esi
mov dword [ebp - 4], ebx
mov esi, 0x102c7c0
push edi
push 0x104
push esi
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, eax
test edi, edi
jne 0x100cae9
push esi
push dword [ebp - 8]
call fcn.0100ca74
test eax, eax
je 0x100cabb
inc ebx
cmp dword [ebp - 4], edi
jne 0x100cabb
mov dword [ebp - 4], eax
jmp 0x100cabb
cmp edi, 1
jle 0x100cafb
cmp edi, 3
jle 0x100cb13
cmp edi, 0x103
je 0x100cb13
push edi
push esi
push 0x1001e10
call fcn.01015c5a
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x100cb13
mov dword [ebp - 4], edi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
test esi, esi
pop edi
je 0x100cb53
cmp esi, 1
jle 0x100cb39
cmp esi, 3
jle 0x100cb53
push esi
push dword [ebp + 0xc]
push 0x1001dd4
call fcn.01015c5a
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x100cb53
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret 8

Function at 0x100d6a3
Capabilities:
Copy file
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov eax, esi
push edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100d6b2
sub eax, edx
lea eax, [eax + esi - 4]
cmp eax, esi
jbe 0x100d6fb
mov eax, dword [eax]
or eax, 0x20202000
cmp eax, 0x6261632e
jne 0x100d6fb
push 0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x100d746
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 0xc]
push esi
push 0x1002068
call fcn.01015c5a
add esp, 0x10
jmp 0x100d742
push 0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.UPDSPAPI.dll_UpdSpDecompressOrCopyFileA]
mov edi, eax
test edi, edi
je 0x100d746
cmp edi, 0x20
jne 0x100d72a
push dword [ebp + 0xc]
push 0x1002008
call fcn.01015cdc
pop ecx
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x100d742
push edi
push dword [ebp + 0xc]
push esi
push 0x1001fa0
call fcn.01015c5a
add esp, 0x10
push edi
call fcn.0100d556
xor eax, eax
jmp 0x100d757
push 0x80
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
ret 8
Function at 0x100f99b
Capabilities:
Pause service
Start service

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x294c
call sub.ntdll.dll__chkstk
mov eax, dword [0x102c22c]
push esi
mov esi, dword [0x102c908]
push edi
xor edi, edi
cmp esi, edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2928], eax
mov dword [ebp - 0x2920], edi
mov dword [ebp - 0x2930], edi
jne 0x100f9dc
xor eax, eax
jmp 0x100fc02
push 8
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, edi
mov dword [ebp - 0x292c], eax
jne 0x100f9fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100fc02
mov edi, dword [sym.imp.ntdll.dll_sprintf]
push ebx
mov ebx, 0x107f8a0
cmp dword [esi + 0xc], 0
je 0x100fa2d
push 0
push dword [esi + 0x10]
push dword [esi]
push dword [ebp - 0x292c]
call fcn.01017d5a
test eax, eax
mov dword [ebp - 0x2920], eax
jne 0x100fc01
cmp dword [ebp + 0xc], 0
jne 0x100fbe4
cmp dword [esi + 8], 1
je 0x100fbe4
push 0xe0000000
push dword [esi]
push dword [ebp - 0x292c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
push 0x208
mov dword [ebp - 0x2924], eax
lea eax, [ebp - 0x20c]
push eax
push 0xf0b1
push 0
call fcn.0100e2c5
push dword [esi + 4]
lea eax, [ebp - 0x20c]
push eax
push ebx
call edi
add esp, 0xc
cmp dword [ebp - 0x2928], 0
je 0x100fab3
push 0x10017c8
push 0x413
push dword [ebp - 0x2928]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
push ebx
push 0x413
push dword [ebp - 0x2928]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
push ebx
call fcn.01015c42
cmp dword [ebp - 0x2924], 0
je 0x100fbe4
push 0
push 0
push dword [ebp - 0x2924]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x100fae0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x102c910]
lea eax, [ebp - 0x294c]
push 4
push eax
push dword [ebp - 0x2924]
call fcn.01017c5a
cmp dword [ebp - 0x2948], 4
mov dword [ebp - 0x2920], eax
jne 0x100fb1a
and dword [ebp - 0x2920], 0
mov dword [ebp - 0x2930], 1
cmp dword [ebp - 0x2930], 0
jne 0x100fbbd
push 0x1388
lea eax, [ebp - 0x1594]
push eax
push 0xf060
push 0
call fcn.0100e2c5
push dword [esi + 4]
lea eax, [ebp - 0x1594]
push eax
lea eax, [ebp - 0x291c]
push eax
call edi
add esp, 0xc
push 0x1388
lea eax, [ebp - 0x1594]
push eax
push 0xf00f
push 0
call fcn.0100e2c5
lea eax, [ebp - 0x291c]
push eax
call fcn.01015c42
push dword [ebp - 0x2920]
push 0x100296c
push 0x108f8a0
call edi
add esp, 0xc
push 0x108f8a0
call fcn.01015c42
cmp dword [0x102c8d0], 0
jne 0x100fbbd
push 0
lea eax, [ebp - 0x1594]
push eax
lea eax, [ebp - 0x291c]
push eax
push dword [ebp - 0x2928]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp dword [esi + 8], 7
jne 0x100fbd8
lea eax, [ebp - 0x294c]
push eax
push 2
push dword [ebp - 0x2924]
call dword [sym.imp.ADVAPI32.dll_ControlService]
push dword [ebp - 0x2924]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [esi + 0x18]
test esi, esi
jne 0x100fa07
push dword [ebp - 0x292c]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x2920]
pop ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.0101439a
leave
ret 8
Function at 0x101439a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x102c22c]
jne 0x10143ab
test ecx, 0xffff0000
jne 0x10143ab
ret
jmp fcn.010143b5
Function at 0x1014b89
Capabilities:
Access the windows event log

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
push 0xa
pop eax
cmp dword [ebp + 0x18], eax
jbe 0x1014b9c
mov dword [ebp + 0x18], eax
push esi
push edi
xor edi, edi
xor eax, eax
cmp dword [ebp + 0x18], edi
jbe 0x1014bb9
lea ecx, [ebp + 0x18]
add ecx, 4
mov edx, dword [ecx]
mov dword [ebp + eax*4 - 0x28], edx
inc eax
cmp eax, dword [ebp + 0x18]
jb 0x1014baa
push dword [ebp + 0x14]
push edi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
cmp esi, edi
je 0x1014bec
push edi
lea eax, [ebp - 0x28]
push eax
push edi
push dword [ebp + 0x18]
push dword [ebp + 0x10]
push dword [ebp + 8]
push edi
push dword [ebp + 0xc]
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov eax, edi
pop edi
pop esi
leave
ret

Function at 0x1014dd5
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [ebp + 8]
push ebx
push esi
lea edx, [eax + 1]
xor ebx, ebx
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1014de7
sub eax, edx
inc eax
push eax
call sub.msvcrt.dll_malloc
mov esi, eax
cmp esi, ebx
pop ecx
mov dword [ebp - 4], esi
jne 0x1014e1b
push 8
pop esi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x1014e14
mov dword [eax], esi
xor eax, eax
jmp 0x1014eb9
mov eax, dword [ebp + 8]
mov edx, esi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x1014e22
push edi
push 0x11
xor eax, eax
pop ecx
lea edi, [ebp - 0x58]
rep stosd dword es:[edi], eax
xor edi, edi
inc edi
cmp dword [ebp + 0xc], ebx
mov dword [ebp - 0x58], 0x44
je 0x1014e4d
mov dword [ebp - 0x2c], edi
mov word [ebp - 0x28], bx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x58]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x1014e81
push esi
call sub.msvcrt.dll_free
mov esi, dword [ebp + 0x10]
cmp esi, ebx
pop ecx
je 0x1014e7d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
xor eax, eax
jmp 0x1014eb8
push 0xffffffffffffffff
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [ebp + 0x10], ebx
je 0x1014e9d
push dword [ebp + 0x10]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x10]
call esi
push dword [ebp - 4]
call sub.msvcrt.dll_free
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x10151ae
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 2
push 0
push 0x1004c14
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x10151fe
cmp dword [ebp + 8], eax
push 4
setne al
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
push 4
push esi
push 0x1004bfc
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
pop esi
leave
ret 4

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x102c22c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x114], eax
mov eax, dword [ebp + 0x18]
push esi
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
mov dword [ebp - 0x110], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x10c], eax
mov ecx, edi
jne 0x1015251
mov ecx, 0x102d630
lea edx, [ebp - 0x108]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x1015257
test ebx, ebx
mov esi, 0x104
je 0x1015279
push esi
lea eax, [ebp - 0x108]
push eax
push ebx
push eax
call fcn.01015121
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1015290
xor eax, eax
inc eax
jmp 0x10152f5
xor eax, eax
cmp dword [ebp + 0x24], eax
je 0x101529b
xor eax, eax
jmp 0x10152f5
push eax
push esi
push dword [ebp - 0x10c]
push dword [ebp + 0x1c]
push eax
push ebx
push edi
push dword [ebp - 0x110]
push eax
push dword [ebp - 0x114]
call dword [sym.imp.UPDSPAPI.dll_UpdSpPromptForDiskA]
sub eax, 0
je 0x10152db
dec eax
je 0x10152d4
dec eax
je 0x10152d0
push 8
call fcn.0100d556
jmp 0x1015297
push 2
jmp 0x10152f4
push 0x4c7
jmp 0x10152c9
mov eax, dword [ebp - 0x10c]
mov edx, 0x102d630
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x10152e8
push 4
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0101439a
leave
ret 0x20
Function at 0x10155ad
Capabilities:
Check if file exists
Get file attributes
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
lea eax, [ebp - 4]
push eax
push 0x20019
xor ebx, ebx
push ebx
push dword [ebp + 8]
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x10155db
xor eax, eax
jmp 0x1015754
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp + 8], ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10155e5
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
sub eax, esi
lea ecx, [ebp + 8]
push ecx
push ebx
neg eax
lea ecx, [ebp - 8]
push ecx
sbb eax, eax
and eax, dword [ebp + 0xc]
push ebx
push eax
push dword [ebp - 4]
call edi
cmp eax, ebx
je 0x101561e
cmp eax, 0xea
je 0x101561e
xor eax, eax
jmp 0x1015752
mov eax, dword [ebp + 8]
inc eax
push eax
call sub.msvcrt.dll_malloc
mov esi, eax
cmp esi, ebx
pop ecx
jne 0x1015636
xor esi, esi
jmp 0x1015747
lea eax, [ebp + 8]
push eax
push esi
lea eax, [ebp - 8]
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp - 4]
call edi
cmp eax, ebx
mov ecx, dword [ebp + 8]
mov byte [ecx + esi], bl
push esi
jne 0x1015728
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x101569d
cmp dword [ebp - 8], 2
jne 0x101569d
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push ebx
push ebx
push esi
call edi
cmp eax, ebx
mov dword [ebp + 0xc], eax
je 0x101569d
push eax
call sub.msvcrt.dll_malloc
cmp eax, ebx
pop ecx
mov dword [ebp - 0xc], eax
je 0x101569d
push dword [ebp + 0xc]
push eax
push esi
call edi
test eax, eax
je 0x101569d
push esi
call sub.msvcrt.dll_free
mov esi, dword [ebp - 0xc]
pop ecx
push 0x2c
push esi
call sub.ntdll.dll_strchr
cmp eax, ebx
pop ecx
pop ecx
je 0x10156ad
mov byte [eax], bl
push 0x3b
push esi
call sub.ntdll.dll_strchr
cmp eax, ebx
pop ecx
pop ecx
je 0x10156bd
mov byte [eax], bl
cmp esi, ebx
je 0x101571b
cmp byte [esi], 0x22
jne 0x101571b
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10156cb
sub eax, edx
cmp byte [eax + esi - 1], 0x22
jne 0x101571b
mov eax, esi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10156e0
sub eax, edi
lea ecx, [esi + 1]
mov byte [eax + esi - 1], bl
mov eax, ecx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x10156f5
sub eax, edi
push eax
push ecx
push esi
call sub.msvcrt.dll_memmove
mov eax, esi
add esp, 0xc
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x101570e
sub eax, ecx
mov byte [eax + esi - 1], bl
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1015733
push esi
call sub.msvcrt.dll_free
pop ecx
jmp 0x101562f
test al, 0x10
jne 0x1015747
push 0x5c
push esi
call sub.ntdll.dll_strrchr
cmp eax, ebx
pop ecx
pop ecx
je 0x1015747
mov byte [eax], bl
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x1015a19
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
xor esi, esi
push esi
push esi
push 3
push esi
push 3
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x1015a82
push esi
lea eax, [ebp + 8]
push eax
push 0xc
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1015a7b
cmp dword [ebp + 8], 0xc
jne 0x1015a7b
cmp dword [ebp - 4], 0x66626473
jne 0x1015a7b
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
xor ecx, ecx
or ecx, eax
mov eax, dword [ebp + 0xc]
or edx, esi
mov dword [eax], ecx
mov dword [eax + 4], edx
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
leave
ret 8

Function at 0x1015aaf
Capabilities:
Write file on windows

Disassembly:
push 0x82c
push 0x1004c78
call fcn.010145b0
mov eax, dword [0x102c22c]
mov dword [ebp - 0x1c], eax
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
cmp dword [0x102dc48], 0
je 0x1015bf1
mov eax, dword [ebp + 8]
cmp eax, dword [0x102c240]
jg 0x1015bf1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x824], eax
and dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x830], eax
sub eax, dword [0x102dc4c]
mov dword [ebp - 0x83c], eax
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x828], eax
mov dword [ebp - 0x838], edx
push edx
push eax
push 0x1004c6c
lea eax, [ebp - 0x81c]
push eax
call sub.ntdll.dll_sprintf
mov esi, eax
mov dword [ebp - 0x82c], esi
push ebx
push edi
mov eax, 0x7fe
sub eax, esi
push eax
lea eax, [ebp + esi - 0x81c]
push eax
call sub.ntdll.dll__vsnprintf
add esp, 0x20
mov dword [ebp - 0x820], eax
test eax, eax
jge 0x1015b70
mov dword [ebp - 0x820], 0x7fd
jmp 0x1015b76
add dword [ebp - 0x820], esi
mov eax, dword [ebp - 0x820]
lea eax, [ebp + eax - 0x81c]
cmp byte [eax - 1], 0xa
jne 0x1015b9e
cmp byte [eax - 2], 0xd
je 0x1015bb6
mov byte [eax - 1], 0xd
mov byte [eax], 0xa
inc dword [ebp - 0x820]
jmp 0x1015bb6
mov byte [eax], 0xd
mov eax, dword [ebp - 0x820]
mov byte [ebp + eax - 0x81b], 0xa
add dword [ebp - 0x820], 2
push 0
lea eax, [ebp - 0x834]
push eax
push dword [ebp - 0x820]
lea eax, [ebp - 0x81c]
push eax
push dword [0x102dc48]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1015be1
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x824]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x1c]
call fcn.0101439a
call fcn.010145eb
ret 0xc
Function at 0x1016034
Capabilities:
Extract resource via kernel32 functions
Get file version info

Disassembly:
push 0x2c
push 0x1004e80
call fcn.010145b0
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov edi, dword [ebp + 0xc]
cmp edi, ebx
jne 0x1016059
xor eax, eax
jmp 0x10161e0
mov dword [edi], ebx
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
je 0x10161a1
push ebx
push ebx
push ebx
push 2
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x10161a1
push ebx
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov dword [ebp - 0x20], eax
cmp eax, ebx
je 0x10161a1
mov esi, eax
or esi, 1
mov dword [ebp - 4], ebx
push 0x10
push 1
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x30], eax
cmp eax, ebx
jne 0x1016110
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
mov dword [ebp - 0x38], esi
cmp esi, ebx
jne 0x10160f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1016157
push 0x714
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1016157
push esi
call sub.msvcrt.dll_malloc
pop ecx
mov dword [edi], eax
cmp eax, ebx
je 0x1016157
push eax
push esi
push ebx
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x1016157
jmp 0x1016150
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
mov dword [ebp - 0x3c], esi
cmp esi, ebx
je 0x1016157
movzx eax, word [esi]
mov ecx, eax
shr ecx, 1
add ecx, eax
push ecx
push 1
call sub.msvcrt.dll_calloc
pop ecx
pop ecx
mov dword [edi], eax
cmp eax, ebx
je 0x1016157
movzx ecx, word [esi]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x24], 1
or dword [ebp - 4], 0xffffffff
jmp 0x10161a1
cmp dword [ebp - 0x28], ebx
je 0x10161af
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], ebx
je 0x10161bd
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], ebx
je 0x10161cb
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edi, dword [edi]
cmp edi, ebx
je 0x10161dd
cmp dword [ebp - 0x24], ebx
jne 0x10161dd
push edi
call sub.msvcrt.dll_free
pop ecx
mov eax, dword [ebp - 0x24]
call fcn.010145eb
ret 8
Function at 0x1016306
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4c
push esi
push edi
mov eax, dword [0x102c22c]
push 0xa
pop ecx
mov esi, 0x1004f28
lea edi, [ebp - 0x3c]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x1004f1c
lea edi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 4], eax
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x40]
push eax
push 0x20019
push 0
movsw word es:[edi], word [esi]
lea eax, [ebp - 0x3c]
push eax
push 0x80000002
movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x101638b
push 4
pop esi
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x44]
push eax
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x40]
mov dword [ebp - 0x48], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x40]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x101638b
cmp dword [ebp - 0x44], esi
jne 0x101638b
mov eax, dword [ebp - 0x4c]
jmp 0x101638d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.0101439a
leave
ret

Function at 0x101639e
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
lea eax, [ebp - 4]
push eax
push 0x20019
xor edi, edi
push edi
push dword [ebp + 8]
xor ebx, ebx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x10163cb
xor eax, eax
jmp 0x101642e
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp + 8]
push eax
push edi
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp + 0xc]
mov dword [ebp + 8], edi
push dword [ebp - 4]
call esi
cmp eax, edi
je 0x10163f2
cmp eax, 0xea
jne 0x1016420
push dword [ebp + 8]
call sub.msvcrt.dll_malloc
mov ebx, eax
cmp ebx, edi
pop ecx
je 0x1016422
lea eax, [ebp + 8]
push eax
push ebx
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp - 4]
call esi
test eax, eax
je 0x1016420
push ebx
call sub.msvcrt.dll_free
pop ecx
jmp 0x1016422
mov edi, ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop esi
pop edi
pop ebx
leave
ret 8