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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x45aa58]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor ebx, ebx
push str.kernel32.dll
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], ebx
xor esi, esi
call edi
push str.GetUserDefaultUILanguage
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x4405dc
call eax
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ebx, 0x3ff
mov edi, 0xfc00
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, ebx
movzx ecx, cx
and eax, edi
or eax, ecx
push eax
mov dword [ebp - 0x1c], ecx
call esi
push dword [ebp - 0x1c]
mov dword [ebp - 0x3c], eax
call esi
push str.GetSystemDefaultUILanguage
push dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, ebx
movzx ebx, cx
and eax, edi
or eax, ebx
push eax
call esi
push ebx
mov dword [ebp - 0x34], eax
call esi
mov dword [ebp - 0x30], eax
push 4
xor ebx, ebx
jmp 0x4406de
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x44068c
lea eax, [ebp - 0x1c]
push eax
push 0x20019
push ebx
push str.Control_PanelDesktopResourceLocale
push closesocket
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4406df
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push dword [ebp - 0x1c]
mov dword [ebp - 0x20], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x440681
cmp dword [ebp - 0x24], 1
jne 0x440681
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push 0x44ae6c
push eax
call fcn.00422fdf
add esp, 0xc
cmp eax, 1
jne 0x440681
mov eax, dword [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, 0x3ff
movzx edi, cx
and eax, 0xfc00
or eax, edi
push eax
call esi
push edi
mov dword [ebp - 0x3c], eax
call esi
push 2
mov dword [ebp - 0x38], eax
pop esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4406df
push str.ntdll.dll
call edi
cmp eax, ebx
je 0x4406df
lea ecx, [ebp - 0x18]
push ecx
push 0x440524
push 1
push 0x10
push eax
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_EnumResourceLanguagesA]
cmp word [ebp - 0x18], bx
je 0x4406df
movzx eax, word [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ecx, eax
and ecx, 0x3ff
movzx edi, cx
and eax, 0xfc00
or eax, edi
push eax
call esi
push edi
mov dword [ebp - 0x3c], eax
call esi
mov dword [ebp - 0x38], eax
push 2
pop esi
mov dword [ebp + esi*4 - 0x3c], 0x800
inc esi
xor edi, edi
cmp esi, ebx
jle 0x440705
push dword [ebp + edi*4 - 0x3c]
push dword [ebp + 8]
call fcn.004404a5
cmp eax, ebx
pop ecx
pop ecx
jne 0x440707
inc edi
cmp edi, esi
jl 0x4406ee
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.00422a60
leave
ret 4
Function at 0x440716
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push edi
xor edi, edi
mov dword [ecx + 0x9c], edi
cmp dword [str.SoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer], edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
mov ebx, 0x459f34
je 0x4407d2
push esi
lea eax, [ebp - 4]
push eax
push 1
push edi
push dword [ebx]
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4407ba
mov esi, dword [ebx + 4]
jmp 0x4407b4
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4407a4
cmp dword [ebp - 0xc], 4
jne 0x4407a4
cmp dword [ebp - 8], edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 4]
je 0x44079c
or dword [eax + 0x9c], ecx
jmp 0x4407a4
not ecx
and dword [eax + 0x9c], ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
add esi, 8
mov eax, dword [esi]
cmp eax, edi
jne 0x440768
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add ebx, 8
cmp dword [ebx], edi
mov dword [ebp - 4], edi
jne 0x44074b
pop esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
inc eax
pop ebx
leave
ret

Function at 0x440b8b
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, 0x444b1b
call fcn.00422a70
sub esp, 0x11c
mov eax, dword [0x45aa58]
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x124]
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, eax
test esi, esi
jne 0x440c84
push 0x104
lea eax, [ebp - 0x11c]
push eax
push 0
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov esi, eax
test esi, esi
jne 0x440c58
and dword [ebp - 4], eax
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x120]
call fcn.004042b0
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x124]
mov byte [ebp - 4], 1
call fcn.00440b8b
mov ecx, dword [ebp - 0x120]
mov esi, eax
test esi, esi
setne bl
add ecx, 0xfffffff0
mov byte [ebp - 4], 0
call fcn.00401ef0
test bl, bl
jne 0x440c58
or dword [ebp - 4], 0xffffffff
jmp 0x440bc9
cmp esi, 0x103
je 0x440c68
cmp esi, 0x3f2
jne 0x440c78
mov eax, dword [ebp + 0xc]
push dword [eax]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
mov eax, esi
call fcn.00422a60
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x4410e7
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x44111c
cmp edi, dword [esi + 0xc]
jge 0x44111c
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x44111c
cmp edi, dword [eax + 8]
jge 0x44111c
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x44111e
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x441222
Capabilities:
Allocate thread local storage

Disassembly:
xor eax, eax
push esi
mov esi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x18], 4
mov dword [esi + 4], eax
mov dword [esi + 8], 1
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x441256
jmp fcn.0042e3c8
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret

Function at 0x4412c7
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x1c]
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
jle 0x4413c0
cmp eax, dword [edi + 0xc]
jge 0x4413c0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x441318
mov ecx, dword [ebp + 8]
cmp ecx, dword [esi + 8]
jl 0x4413a9
cmp dword [ebp + 0xc], ebx
je 0x4413a9
jmp 0x441342
push 0x10
call fcn.00440fb3
cmp eax, ebx
je 0x44132e
mov ecx, eax
call fcn.00441219
mov esi, eax
jmp 0x441330
xor esi, esi
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x18]
mov dword [esi + eax], ecx
mov dword [edi + 0x14], esi
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x441359
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x441369
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, ebx
jne 0x44137b
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.0042e3c8
mov ecx, dword [esi + 8]
mov dword [esi + 0xc], eax
mov edx, dword [edi + 0xc]
sub edx, ecx
shl edx, 2
push edx
lea eax, [eax + ecx*4]
push ebx
push eax
call fcn.00422a90
mov eax, dword [edi + 0xc]
add esp, 0xc
push esi
mov dword [esi + 8], eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x4413bb
cmp ecx, dword [esi + 8]
jge 0x4413bb
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
push dword [ebp - 4]
jmp 0x4413c1
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x441480
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4414ae
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4414cc
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004413ea
jmp 0x4414cc
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4414cc
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.004413ea
test edi, edi
mov eax, edi
jne 0x4414b6
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x460778]
test ecx, ecx
je 0x44157f
jmp 0x44147f
ret 8
Function at 0x1000a210
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, dword [esp + 8]
push edi
push ebx
push ebp
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x1000a229
pop edi
pop ebp
ret 4
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x1000a25a
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, esi
and edi, 0xf
jbe 0x1000a256
cmp esi, eax
jae 0x1000a25a
sub edi, 1
movzx ecx, word [esi]
lea esi, [esi + ecx*2 + 2]
jne 0x1000a246
cmp esi, eax
jb 0x1000a262
pop esi
pop edi
xor eax, eax
pop ebp
ret 4
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebp
ret 4

Function at 0x10019164
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x10039b68]
jne 0x1001916e
repz ret
jmp fcn.1001e629

Function at 0x10028efb
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.10021452
and dword [ebp - 4], 0
cmp dword [0x1003d84c], 0
mov ebx, eax
jne 0x10028fac
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x1002905d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10032a1c
push edi
call esi
test eax, eax
je 0x1002905d
push eax
call fcn.100213e0
mov dword [esp], 0x10032a0c
push edi
mov dword [0x1003d84c], eax
call esi
push eax
call fcn.100213e0
mov dword [esp], 0x100329f8
push edi
mov dword [0x1003d850], eax
call esi
push eax
call fcn.100213e0
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x1003d854], eax
call esi
push eax
call fcn.100213e0
pop ecx
mov dword [0x1003d85c], eax
test eax, eax
je 0x10028fac
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.100213e0
pop ecx
mov dword [0x1003d858], eax
mov eax, dword [0x1003d858]
cmp eax, ebx
je 0x10029004
cmp dword [0x1003d85c], ebx
je 0x10029004
push eax
call fcn.1002145b
push dword [0x1003d85c]
mov esi, eax
call fcn.1002145b
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x10029004
test edi, edi
je 0x10029004
call esi
test eax, eax
je 0x10028ffb
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x10028ffb
test byte [ebp - 0xc], 1
jne 0x10029004
or dword [ebp + 0x10], 0x200000
jmp 0x1002903d
mov eax, dword [0x1003d850]
cmp eax, ebx
je 0x1002903d
push eax
call fcn.1002145b
pop ecx
test eax, eax
je 0x1002903d
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x1002903d
mov eax, dword [0x1003d854]
cmp eax, ebx
je 0x1002903d
push eax
call fcn.1002145b
pop ecx
test eax, eax
je 0x1002903d
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x1003d84c]
call fcn.1002145b
pop ecx
test eax, eax
je 0x1002905d
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x1002905f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402180
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.SoftwareBrotherBrUtilities
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, esi
jne 0x4021de
mov edx, dword [ebp + 8]
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [ebp - 4]
push edx
lea eax, [ebp - 0xc]
push eax
push esi
push str.BrLogAPI
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [ebp - 4]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x402240
Capabilities:
Link many functions at runtime

Disassembly:
cmp dword [esi + 4], 0
jne 0x402302
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esi + 4], eax
test eax, eax
je 0x4022ff
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 0x4022ff
cmp dword [esi + 0xc], 0
je 0x4022ff
cmp dword [esi + 0x10], 0
je 0x4022ff
cmp dword [esi + 0x14], 0
je 0x4022ff
cmp dword [esi + 0x18], 0
je 0x4022ff
cmp dword [esi + 0x1c], 0
je 0x4022ff
cmp dword [esi + 0x20], 0
je 0x4022ff
test eax, eax
jne 0x402302
xor eax, eax
ret
mov eax, 1
ret
Function at 0x402440
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x59bad0]
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 0x40251f
cmp dword [ecx + 4], eax
setne al
test eax, eax
jne 0x40251f
mov ecx, 0x104
lea eax, [ebp - 0x108]
lea esp, [esp]
mov byte [eax], 0
inc eax
dec ecx
jne 0x402480
push esi
lea eax, [ebp - 0x108]
push eax
call fcn.00402180
push 0x104
lea ecx, [ebp - 0x108]
push ecx
mov esi, eax
call dword [sym.imp.SHELL32.dll_DoEnvironmentSubstA]
test esi, esi
jne 0x4024be
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x402510
mov ecx, 0x104
lea eax, [ebp - 0x108]
lea esp, [esp]
mov byte [eax], 0
inc eax
dec ecx
jne 0x4024d0
mov edx, 0x104
lea eax, [ebp - 0x108]
cmp byte [eax], 0
je 0x4024ed
inc eax
dec edx
jne 0x4024e2
jmp 0x402510
test edx, edx
je 0x402510
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
lea ecx, [ebp + ecx - 0x108]
mov edx, str.BrLogAPI.dll
call fcn.00401490
mov esi, dword [edi + 4]
lea eax, [ebp - 0x108]
call fcn.00402240
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.0051c462
mov esp, ebp
pop ebp
ret

Function at 0x403240
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x59bad0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x5a3af0], 0
jne 0x4032d5
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.BrotherWirelessSetupService
push 0
mov dword [0x5a3aec], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
mov eax, dword [0x5a3aec]
push eax
push str.BrotherWirelessSetupService
push str._s_error:__d
lea ecx, [ebp - 0x84]
push 0x80
push ecx
call fcn.0051c8cc
add esp, 0x14
lea edx, [ebp - 0x84]
mov dword [ebp - 0x8c], edx
mov dword [ebp - 0x88], edi
test esi, esi
je 0x4032d4
push 0
lea eax, [ebp - 0x8c]
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051c462
mov esp, ebp
pop ebp
ret
Function at 0x4032f0
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
mov eax, dword [0x59bad0]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x200
lea eax, [ebp - 0x204]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403341
call fcn.004035a0
push eax
push str.Brother_Wireless_Setup_Service
push str.Unable_to_install__s____s_n
call fcn.0051c90b
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051c462
mov esp, ebp
pop ebp
ret
push edi
lea ecx, [ebp - 0x204]
push ecx
push str._s__s
push 0xffffffffffffffff
lea edx, [ebp - 0x404]
push 0x200
push edx
call fcn.0051c8ea
add esp, 0x14
push 3
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x403408
push ebx
push esi
push 0
push 0
push 0x572c7a
push 0
push 0
lea eax, [ebp - 0x404]
push eax
push 1
push 3
push 0x10
push 0xf01ff
push str.Brother_Wireless_Setup_Service
push str.BrotherWirelessSetupService
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x4033e1
push str.Brother_Wireless_Setup_Service
push str._s_installed._n
call fcn.0051c90b
add esp, 8
push esi
call ebx
push edi
call ebx
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051c462
mov esp, ebp
pop ebp
ret
call fcn.004035a0
push eax
push str.CreateService_failed____s_n
call fcn.0051c90b
add esp, 8
push edi
call ebx
pop esi
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051c462
mov esp, ebp
pop ebp
ret
call fcn.004035a0
push eax
push str.OpenSCManager_failed____s_n
call fcn.0051c90b
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop edi
call fcn.0051c462
mov esp, ebp
pop ebp
ret
Function at 0x403430
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
push 1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [ebp - 4], edi
test edi, edi
je 0x403579
push esi
push 0x10024
push str.BrotherWirelessSetupService
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x403559
push 0x5a3ac4
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x403501
push ebx
push str.Brother_Wireless_Setup_Service
push str.Stopping__s.
call fcn.0051c90b
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
push 0x3e8
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
push 0x5a3ac4
push esi
call ebx
test eax, eax
je 0x4034db
cmp dword [0x5a3ac8], 3
jne 0x4034db
push 0x572cc4
call fcn.0051c90b
add esp, 4
push 0x3e8
call edi
push 0x5a3ac4
push esi
call ebx
test eax, eax
jne 0x4034b2
cmp dword [0x5a3ac8], 1
pop ebx
push str.Brother_Wireless_Setup_Service
jne 0x4034f1
push str._n_s_stopped._n
jmp 0x4034f6
push str._n_s_failed_to_stop._n
call fcn.0051c90b
mov edi, dword [ebp - 4]
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x403532
push str.Brother_Wireless_Setup_Service
push str._s_removed._n
call fcn.0051c90b
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop edi
mov esp, ebp
pop ebp
ret
call fcn.004035a0
push eax
push str.DeleteService_failed____s_n
call fcn.0051c90b
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop edi
mov esp, ebp
pop ebp
ret
call fcn.004035a0
push eax
push str.OpenService_failed____s_n
call fcn.0051c90b
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop edi
mov esp, ebp
pop ebp
ret
call fcn.004035a0
push eax
push str.OpenSCManager_failed____s_n
call fcn.0051c90b
add esp, 8
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x4073f0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5437fc
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x59bad0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov ecx, 2
mov dword [ebp - 4], ecx
lea eax, [esi + 0x30]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], cl
mov eax, dword [eax]
sub eax, 0x10
or edi, 0xffffffff
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40744d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov cl, 1
mov byte [ebp - 4], cl
lea eax, [esi + 0x1c]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], cl
mov eax, dword [eax]
sub eax, 0x10
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407478
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor cl, cl
mov byte [ebp - 4], cl
lea eax, [esi + 0x14]
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], cl
mov eax, dword [eax]
sub eax, 0x10
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4074a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], edi
lea eax, [esi + 4]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], edi
mov eax, dword [eax]
sub eax, 0x10
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x4074ca
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
mov esp, ebp
pop ebp
ret

Function at 0x4076b0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4076cb
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x407702
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x4076fe
jmp 0x4076f0
cmp esi, eax
jae 0x407702
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x4076f0
cmp esi, eax
jb 0x407709
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret