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

Disassembly:
push 0x208
push 0
push 0x44ba98
call fcn.0041fd10
add esp, 0xc
push 0x104
push 0x44ba98
push 0x439680
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov eax, 0x44ba98
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408021
sub eax, edx
sar eax, 1
cmp word [eax*2 + 0x44ba98], 0x5c
push esi
push edi
je 0x408058
mov edi, 0x44ba98
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x408045
mov eax, dword [0x43967c]
mov dword [edi], eax
mov edi, 0x44ba98
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x408060
mov ecx, 9
mov esi, str.__Samsung_Update_
rep movsd dword es:[edi], dword [esi]
mov edi, 0x44ba98
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x408080
mov ecx, 8
mov esi, str.DebugAppLog.txt
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
ret

Function at 0x4080a0
Capabilities:
Identify system language via api

Disassembly:
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx eax, ax
cmp eax, 0x100c
ja 0x4081b8
je case.0x4080de.1036
cmp eax, 0x80a
ja 0x40813c
je case.0x4080de.1034
cmp eax, 0x412
ja 0x4080f1
je 0x4080e5
sub eax, 0x404
cmp eax, 8
ja case.0x4080de.1029
jmp dword [eax*4 + 0x408274]
mov eax, 0x412
mov word [0x44ba90], ax
ret
cmp eax, 0x804
ja 0x408124
je 0x408117
sub eax, 0x416
je 0x408166
sub eax, 3
jne case.0x4080de.1029
mov ecx, 0x419
mov word [0x44ba90], cx
ret
mov edx, 0x804
mov word [0x44ba90], dx
ret
cmp eax, 0x807
jne case.0x4080de.1029
mov edx, 0x407
mov word [0x44ba90], dx
ret
cmp eax, 0xc0a
ja 0x408186
je case.0x4080de.1034
cmp eax, 0xc04
ja 0x408172
je case.0x4080de.1028
sub eax, 0x80c
je case.0x4080de.1036
sub eax, 0xa
jne case.0x4080de.1029
mov eax, 0x816
mov word [0x44ba90], ax
ret
cmp eax, 0xc07
je case.0x4080de.1031
mov ecx, 0x409
mov word [0x44ba90], cx
ret
cmp eax, 0x1007
ja 0x4081ae
je case.0x4080de.1031
cmp eax, 0xc0c
je case.0x4080de.1036
cmp eax, 0x1004
jne case.0x4080de.1029
mov ecx, 0x404
mov word [0x44ba90], cx
ret
cmp eax, 0x100a
jmp 0x408256
cmp eax, 0x300a
ja 0x40821c
je case.0x4080de.1034
cmp eax, 0x1c0a
ja 0x4081fe
je case.0x4080de.1034
cmp eax, 0x140c
ja 0x4081f7
je case.0x4080de.1036
sub eax, 0x1407
je case.0x4080de.1031
sub eax, 3
jmp 0x408256
mov eax, 0x40c
mov word [0x44ba90], ax
ret
cmp eax, 0x180a
jmp 0x408256
cmp eax, 0x280a
ja 0x408215
je case.0x4080de.1034
cmp eax, 0x200a
je case.0x4080de.1034
cmp eax, 0x240a
jmp 0x408256
cmp eax, 0x2c0a
jmp 0x408256
cmp eax, 0x440a
ja 0x408243
je case.0x4080de.1034
cmp eax, 0x3c0a
ja 0x40823c
je case.0x4080de.1034
cmp eax, 0x340a
je case.0x4080de.1034
cmp eax, 0x380a
jmp 0x408256
cmp eax, 0x400a
jmp 0x408256
cmp eax, 0x480a
je case.0x4080de.1034
cmp eax, 0x4c0a
je case.0x4080de.1034
cmp eax, 0x500a
je case.0x4080de.1034
mov ecx, 0x409
mov word [0x44ba90], cx
ret
mov edx, 0xc0a
mov word [0x44ba90], dx
ret
Function at 0x4082a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4082b9
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4082f4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x4082f0
lea ebx, [ebx]
cmp esi, eax
jae 0x4082f4
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x4082e0
cmp esi, eax
jb 0x4082fa
pop esi
pop edi
xor eax, eax
pop ebx
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x4089f0
Capabilities:
Delete file
Enumerate files on windows
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x43741b
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x449e30]
xor eax, esp
mov dword [esp + 0x254], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x449e30]
xor eax, esp
push eax
lea eax, [esp + 0x26c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x27c]
call fcn.00410626
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x408a4c
push 0x80004005
call fcn.00407fd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x14]
push str.DebugAppLog.txt
push ecx
mov dword [esp + 0x27c], 0
call fcn.004089d0
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x408a8d
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
jmp 0x408aff
lea ecx, [esp + 0x18]
push ecx
push 0x439694
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x408aad
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
jmp 0x408aff
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
lea ecx, [esp + 0x18]
push ecx
push esi
call edi
mov ebx, dword [esp + 0x14]
test eax, eax
je 0x408af5
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea esp, [esp]
lea edx, [esp + 0x44]
push edx
push ebx
call fcn.0041ff31
add esp, 8
test eax, eax
je 0x408ae9
lea eax, [esp + 0x44]
push eax
call ebp
lea ecx, [esp + 0x18]
push ecx
push esi
call edi
test eax, eax
jne 0x408ad0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebx - 0x10]
mov dword [esp + 0x274], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408b23
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x26c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x254]
xor ecx, esp
call fcn.0041fd8a
add esp, 0x264
ret
Function at 0x408d80
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x48
mov eax, dword [0x449e30]
xor eax, esp
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x4c]
push esi
push edi
mov edi, dword [esp + 0x58]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x408dcd
pop edi
mov eax, 6
pop esi
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.0041fd8a
add esp, 0x48
ret 8
push 0
lea eax, [esp + 0xc]
push eax
push 0x40
lea ecx, [esp + 0x18]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x4c]
mov dword [edi], edx
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0041fd8a
add esp, 0x48
ret 8
Function at 0x408ee0
Capabilities:
Read file on windows
Set current directory
Write file on windows

Disassembly:
mov eax, 0x142c
call fcn.00420c00
mov eax, dword [0x449e30]
xor eax, esp
mov dword [esp + 0x1428], eax
push esi
push 0x44bca8
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x208
lea eax, [esp + 0x228]
push 0
push eax
call fcn.0041fd10
add esp, 0xc
push 0x208
lea ecx, [esp + 0x228]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x228]
push eax
mov ecx, esi
call fcn.00408d80
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea ecx, [esp + 0x23c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x408f85
mov eax, 6
pop esi
mov ecx, dword [esp + 0x1428]
xor ecx, esp
call fcn.0041fd8a
add esp, 0x142c
ret
mov eax, dword [esp + 0xc]
test eax, eax
je 0x408f99
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0xc]
push edx
push 4
lea eax, [esp + 0x18]
push eax
push esi
call ebx
cmp dword [esp + 0xc], 0x4b43504c
je 0x408fde
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
mov eax, 4
pop esi
mov ecx, dword [esp + 0x1428]
xor ecx, esp
call fcn.0041fd8a
add esp, 0x142c
ret
push 0
lea ecx, [esp + 0xc]
push ecx
push 4
lea edx, [esp + 0x20]
push edx
push esi
call ebx
mov eax, dword [esp + 0x14]
or dword [0x44bca0], eax
push 0
lea ecx, [esp + 0xc]
push ecx
push 4
lea edx, [esp + 0x18]
push edx
push esi
call ebx
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x409035
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
mov eax, 1
pop esi
mov ecx, dword [esp + 0x1428]
xor ecx, esp
call fcn.0041fd8a
add esp, 0x142c
ret
mov dword [esp + 0x10], 0
test eax, eax
jle 0x409116
push ebp
push edi
push 0
lea eax, [esp + 0x14]
push eax
push 0x20c
lea ecx, [esp + 0x30]
push ecx
push esi
call ebx
push 0
push 0
push 2
push 0
push 1
push 0x40000000
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, dword [esp + 0x22c]
mov edi, eax
test ebp, ebp
jle 0x4090ed
cmp ebp, 0x1000
push 0
jle 0x4090b7
lea eax, [esp + 0x14]
push eax
push 0x1000
lea ecx, [esp + 0x444]
push ecx
push esi
call ebx
mov eax, dword [esp + 0x10]
push 0
lea edx, [esp + 0x24]
push edx
push eax
lea ecx, [esp + 0x444]
push ecx
jmp 0x4090dc
lea edx, [esp + 0x14]
push edx
push ebp
lea eax, [esp + 0x444]
push eax
push esi
call ebx
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x24]
push ecx
push edx
lea eax, [esp + 0x444]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub ebp, 0x1000
test ebp, ebp
jg 0x409082
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x24]
push ecx
call fcn.0040ff50
mov eax, dword [esp + 0x1c]
inc eax
add esp, 4
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x18], eax
jl 0x409047
pop edi
pop ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x1430]
pop ebx
pop esi
xor ecx, esp
xor eax, eax
call fcn.0041fd8a
add esp, 0x142c
ret
Function at 0x409140
Capabilities:
Check os version

Disassembly:
sub esp, 0x120
mov eax, dword [0x449e30]
xor eax, esp
mov dword [esp + 0x11c], eax
push esi
push edi
lea eax, [esp + 8]
push eax
mov esi, ecx
mov dword [esp + 0xc], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0xc], 6
jne 0x409197
mov eax, dword [esp + 0x10]
cmp eax, 1
jne 0x409187
mov dword [esi + 0x250], 2
jmp 0x4091a1
test eax, eax
jne 0x409197
mov dword [esi + 0x250], 1
jmp 0x4091a1
mov dword [esi + 0x250], 0
push str.IsWow64Process
add esi, 0x254
push 0x439b58
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x4091da
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
test eax, eax
jne 0x4091da
mov dword [esi], eax
mov ecx, dword [esp + 0x124]
pop edi
pop esi
xor ecx, esp
call fcn.0041fd8a
add esp, 0x120
ret

Function at 0x409200
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x134
mov eax, dword [0x449e30]
xor eax, esp
mov dword [esp + 0x130], eax
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x2c], 2
jne 0x40928b
lea ecx, [esp]
push ecx
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
lea edx, [esp + 4]
push edx
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
push 0
push 0
push 0
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
push 0
push eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov ecx, dword [esp + 0x138]
push 0
push ecx
call dword [sym.imp.USER32.dll_ExitWindowsEx]
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.0041fd8a
add esp, 0x134
ret 4
Function at 0x409d10
Capabilities:
Create process on windows
Move file
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x437708
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push esi
push edi
mov eax, dword [0x449e30]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x250], 2
jne 0x409ede
call fcn.00410626
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x409d5e
push 0x80004005
call fcn.00407fd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0xc], eax
push 0x44bca8
mov dword [esp + 0x58], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [esi + 0x254], 0
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileW]
push str.Microsoft.VC90.CRT.manifest
je 0x409dd8
push str.Microsoft.VC90.CRT_64.manifest
call esi
push str.msvcr90.dll
push str.msvcr90_64.dll
call esi
push str.Sabi.sys
push str.Sabi_64.sys
call esi
push str.SabiDrvInst.exe
push str.SabiDrvInst_64.exe
call esi
push str.WdfCoInstaller01009.dll
push str.WdfCoInstaller01009_64.dll
call esi
push str.WUDFUpdate_01009.dll
push str.WUDFUpdate_01009_64.dll
jmp 0x409e19
push str.Microsoft.VC90.CRT_32.manifest
call esi
push str.msvcr90.dll
push str.msvcr90_32.dll
call esi
push str.Sabi.sys
push str.Sabi_32.sys
call esi
push str.SabiDrvInst.exe
push str.SabiDrvInst_32.exe
call esi
push str.WdfCoInstaller01009.dll
push str.WdfCoInstaller01009_32.dll
call esi
push str.WUDFUpdate_01009.dll
push str.WUDFUpdate_01009_32.dll
call esi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x12c
call edi
push 0x44bca8
lea ecx, [esp + 0x10]
push str._sSabiDrvInst.exe
push ecx
call fcn.004089d0
push 0x38
lea edx, [esp + 0x24]
push 0
push edx
mov dword [esp + 0x28], 0x3c
call fcn.0041fd10
mov esi, dword [esp + 0x24]
mov dword [esp + 0x34], str.runas
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x208
add esp, 0x18
or eax, ecx
jge 0x409e87
push 0x208
lea ecx, [esp + 0x10]
call fcn.00408670
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0x44bca8
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
push 0x12c
call edi
push str.Success_to_Install_SABI_Driver_in_Win7
call fcn.004084b0
lea eax, [esi - 0x10]
add esp, 4
mov dword [esp + 0x54], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409ede
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x4c
ret
Function at 0x40d0c0
Capabilities:
Get file size
Read file via mapping

Disassembly:
sub esp, 0x214
mov eax, dword [0x449e30]
xor eax, esp
mov dword [esp + 0x210], eax
push esi
push 0
push 0
push 3
push 0
push 1
mov dword [esp + 0x1c], ecx
push 0x80000000
add ecx, 0xc8
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x10], esi
cmp esi, 0xffffffff
jne 0x40d118
xor eax, eax
pop esi
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.0041fd8a
add esp, 0x214
ret
push ebx
push ebp
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov ebx, eax
push ebx
push 0
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebp, eax
mov dword [esp + 0x14], ebp
cmp ebp, 0xffffffff
jne 0x40d161
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop ebx
xor eax, eax
pop esi
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.0041fd8a
add esp, 0x214
ret
push edi
push 0
push 0
push 0
push 4
push ebp
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
jne 0x40d18a
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call edi
push esi
call edi
xor eax, eax
jmp 0x40d2c0
lea ebp, [ebx - 5]
xor esi, esi
mov byte [esp + 0x13], 0
test ebp, ebp
jbe 0x40d1fa
jmp 0x40d1a0
push 5
lea eax, [esi + edi]
push str.DEVEL
push eax
call fcn.0042139e
add esp, 0xc
test eax, eax
je 0x40d1be
inc esi
cmp esi, ebp
jb 0x40d1a0
jmp 0x40d1fa
push 0x100
lea ecx, [esi + edi + 5]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.00421374
mov esi, dword [esp + 0x20]
push 4
lea eax, [esp + 0x30]
push eax
lea ecx, [esi + 0x84]
push ecx
call fcn.00421189
add esp, 0x18
xor edx, edx
mov word [esi + 0x8a], dx
mov byte [esp + 0x13], 1
lea ebp, [ebx - 0xa]
xor esi, esi
test ebp, ebp
jbe 0x40d29b
jmp 0x40d210
push 0xa
lea eax, [esi + edi]
push 0x43b2e8
push eax
call fcn.0042139e
add esp, 0xc
test eax, eax
je 0x40d22e
inc esi
cmp esi, ebp
jb 0x40d210
jmp 0x40d29b
push 0x100
lea ecx, [esi + edi + 0x1e]
push ecx
lea edx, [esp + 0x28]
push edx
call fcn.00421374
lea eax, [esp + 0x2c]
add esp, 0xc
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d250
mov esi, dword [esp + 0x14]
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esi + 4]
push ecx
call fcn.00421189
lea eax, [esp + 0x2c]
add esp, 0xc
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d280
sub eax, edx
sar eax, 1
xor edx, edx
or byte [esp + 0x13], 2
mov word [esi + eax*2 + 4], dx
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x1c]
push ecx
call esi
xor eax, eax
cmp byte [esp + 0x13], 3
sete al
mov ecx, dword [esp + 0x220]
pop edi
pop ebp
pop ebx
pop esi
xor ecx, esp
call fcn.0041fd8a
add esp, 0x214
ret
Function at 0x40e250
Capabilities:
Delete service
Stop service

Disassembly:
sub esp, 0x1c
push esi
push edi
push 0xf003f
push 0
push 0
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x40e2a5
mov eax, dword [esi + 0x38]
sub eax, 1
push 0xf01ff
je 0x40e28c
sub eax, 1
je 0x40e285
push str.ADDMEM
jmp 0x40e291
push str.SABI
jmp 0x40e291
push str.KMDFMEMIO
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x40e2ad
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
xor eax, eax
pop esi
add esp, 0x1c
ret
lea eax, [esp + 8]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop edi
mov eax, 1
pop esi
add esp, 0x1c
ret

Function at 0x40e780
Capabilities:
Interact with driver via ioctl

Disassembly:
push ecx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x3c], 0
je 0x40e7d1
push 0x11
call fcn.0041011f
mov esi, eax
mov eax, dword [esp + 0x1c]
add esp, 4
mov dword [esi + 9], eax
mov dword [esi + 0xd], 0
mov byte [esi + 8], 1
mov ecx, dword [esp + 0x14]
push 0
mov dword [esi + 4], ecx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0xc]
push ecx
push eax
mov dword [esi], edx
mov edx, dword [esp + 0x28]
mov eax, dword [edi + 0x30]
push edx
push 0x11
push esi
push 0x9c41200c
push eax
jmp 0x40e807
push 9
call fcn.0041011f
add esp, 4
push 0
mov esi, eax
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0xc]
push edx
push eax
mov dword [esi + 5], eax
mov eax, dword [esp + 0x28]
push eax
push 9
mov byte [esi + 4], 1
mov ecx, dword [esp + 0x24]
push esi
mov dword [esi], ecx
mov ecx, dword [edi + 0x30]
push 0x9c41200c
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
call fcn.0041012a
add esp, 4
pop edi
pop esi
pop ecx
ret 0x10

Function at 0x40f050
Capabilities:
Check os version

Disassembly:
sub esp, 0x124
mov eax, dword [0x449e30]
xor eax, esp
mov dword [esp + 0x120], eax
push esi
push edi
lea eax, [esp + 0xc]
push eax
mov esi, ecx
mov dword [esp + 0x10], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x10], 6
jne 0x40f0a1
mov eax, dword [esp + 0x14]
cmp eax, 1
jne 0x40f094
mov dword [esi + 0x38], 2
jmp 0x40f0a8
test eax, eax
jne 0x40f0a1
mov dword [esi + 0x38], 1
jmp 0x40f0a8
mov dword [esi + 0x38], 0
push str.IsWow64Process
push 0x439b58
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
xor eax, eax
mov dword [esp + 8], eax
test edi, edi
je 0x40f0dd
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
test eax, eax
jne 0x40f0f7
pop edi
mov dword [esi + 0x3c], eax
pop esi
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.0041fd8a
add esp, 0x124
ret
mov edx, dword [esp + 8]
mov ecx, dword [esp + 0x128]
pop edi
mov dword [esi + 0x3c], edx
pop esi
xor ecx, esp
call fcn.0041fd8a
add esp, 0x124
ret
Function at 0x40f580
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x437ae9
mov eax, dword fs:[0]
push eax
sub esp, 0x210
mov eax, dword [0x449e30]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x449e30]
xor eax, esp
push eax
lea eax, [esp + 0x224]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x14], ebx
call fcn.00410626
xor ecx, ecx
xor ebp, ebp
cmp eax, ebp
setne cl
cmp ecx, ebp
jne 0x40f5dd
push 0x80004005
call fcn.00407fd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebx], eax
lea ecx, [ebx + 4]
mov dword [esp + 0x22c], ebp
call fcn.004107be
push 0x208
lea ecx, [esp + 0x1c]
push ebp
push ecx
mov byte [esp + 0x238], 1
mov dword [ebx + 0x38], 2
mov dword [ebx + 0x3c], ebp
call fcn.0041fd10
add esp, 0xc
push 0x104
lea edx, [esp + 0x1c]
push edx
push 0x439680
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [esp + 0x18]
lea edx, [eax + 2]
jmp 0x40f640
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x40f640
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x18], 0x5c
je 0x40f673
lea edi, [esp + 0x18]
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x40f660
mov eax, dword [0x43967c]
mov dword [edi], eax
lea edi, [esp + 0x18]
add edi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x40f680
mov ecx, 9
mov esi, str.__Samsung_Update_
rep movsd dword es:[edi], dword [esi]
lea edi, [esp + 0x18]
add edi, 0xfffffffe
nop
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x40f6a0
mov edx, dword [ebx + 4]
mov edx, dword [edx + 0x20]
mov ecx, 9
mov esi, str.DebugDriverLog.txt
rep movsd dword es:[edi], dword [esi]
push ebp
lea ecx, [ebx + 4]
push 0x7001
lea eax, [esp + 0x20]
push eax
movsw word es:[edi], word [esi]
call edx
mov ecx, ebx
mov dword [ebx + 0x30], 0xffffffff
call fcn.0040f050
mov dword [ebx + 0x34], ebp
mov dword [ebx + 0x40], ebp
mov eax, ebx
mov ecx, dword [esp + 0x224]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0041fd8a
add esp, 0x21c
ret

Function at 0x40f710
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x437b33
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x449e30]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0xc], esi
mov eax, dword [esi + 4]
mov edx, dword [eax + 0x4c]
lea edi, [esi + 4]
mov ecx, edi
mov dword [esp + 0x18], 1
call edx
mov eax, dword [esi + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, edi
mov byte [esp + 0x18], 0
call fcn.00410bf7
mov eax, dword [esi]
sub eax, 0x10
mov dword [esp + 0x18], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f78a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x10
ret