joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4b10ce
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
lea esp, [esp - 0x10]
mov dword [esp + 0xc], edx
lea esp, [esp + 0xc]
sub esp, 4
mov dword [esp], 0x8b92e34e
mov dword [esp], edi
push esi
mov eax, dword [ebp + 8]
and ax, 0xf001
dec eax
cmp word [eax], 0x5a4d
jne 0x4b10f0
mov ebx, dword [eax + 0x3c]
cmp ebx, 0xf08
ja 0x4b10f0
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x4b10f0
ret
cmp word [ebx + 4], 0x14c
jne 0x4b10f0
test word [ebx + 0x16], 2
je 0x4b10f0
test word [ebx + 0x16], 0x100
je 0x4b10f0
cmp word [ebx + 0x18], 0x10b
jne 0x4b10f0
mov edx, dword [ebx + 0x78]
cmp edx, 0
je 0x4b10f0
lea edx, [eax + edx]
mov edx, dword [edx + 0xc]
push 0xe1641d81
call 0x4b117c
adc al, 0xbd
mov dl, 3
cmp byte [ecx + 0x75ac5ffe], 0xa
jnp 0x4b1110
int1
salc
push edi
inc esp
add esp, 8
lea edx, [edx + eax]
mov ebx, eax
push edx
call fcn.0049805b
xchg ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x4b10f0
sub esp, 0x3e
mov esi, dword [esp + 0x3e]
add esp, 0x42
pop edi
mov edx, dword [esp]
add esp, 4
pop ecx
pop ebx
leave
ret 8

Function at 0x4b117c
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
lea esp, [esp - 0x10]
mov dword [esp + 0xc], edx
lea esp, [esp + 0xc]
sub esp, 4
mov dword [esp], 0x8b92e34e
mov dword [esp], edi
push esi
mov eax, dword [ebp + 8]
and ax, 0xf001
dec eax
cmp word [eax], 0x5a4d
jne 0x4b10f0
mov ebx, dword [eax + 0x3c]
cmp ebx, 0xf08
ja 0x4b10f0
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x4b10f0
ret
cmp word [ebx + 4], 0x14c
jne 0x4b10f0
test word [ebx + 0x16], 2
je 0x4b10f0
test word [ebx + 0x16], 0x100
je 0x4b10f0
cmp word [ebx + 0x18], 0x10b
jne 0x4b10f0
mov edx, dword [ebx + 0x78]
cmp edx, 0
je 0x4b10f0
lea edx, [eax + edx]
mov edx, dword [edx + 0xc]
push 0xe1641d81
call 0x4b117c
adc al, 0xbd
mov dl, 3
cmp byte [ecx + 0x75ac5ffe], 0xa
jnp 0x4b1110
int1
salc
push edi
inc esp
add esp, 8
lea edx, [edx + eax]
mov ebx, eax
push edx
call fcn.0049805b
xchg ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x4b10f0
sub esp, 0x3e
mov esi, dword [esp + 0x3e]
add esp, 0x42
pop edi
mov edx, dword [esp]
add esp, 4
pop ecx
pop ebx
leave
ret 8
Function at 0x4b1233
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x4b128c
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x4b1233
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x4b1242
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x8b6ee5
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x4b1293
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.00498109
cmp eax, dword [ebp + 0xc]
pop eax
je 0x4b1332
add edi, 4
add eax, 2
dec ecx
jne 0x4b1278
call 0x4b12df
loope 0x4b12d5
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x4b132f
mov dh, pe_nt_image_headers32
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x4b1340
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x4b12f3
cmp eax, ecx
ja 0x4b12f3
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x4b137d
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x4b1373
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.004985e8
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x4b1242
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x4b128c
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x4b1233
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x4b1242
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x8b6ee5
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x4b1293
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.00498109
cmp eax, dword [ebp + 0xc]
pop eax
je 0x4b1332
add edi, 4
add eax, 2
dec ecx
jne 0x4b1278
call 0x4b12df
loope 0x4b12d5
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x4b132f
mov dh, pe_nt_image_headers32
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x4b1340
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x4b12f3
cmp eax, ecx
ja 0x4b12f3
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x4b137d
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x4b1373
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.004985e8
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]

Function at 0x43b670
Capabilities:
Encode data using xor

Disassembly:
mov esi, 0x43b3c1
mov edx, ecx
dec ecx
call fcn.0043b68d
dec edx
xor dword [edi], esi
inc ecx
inc edi
or ecx, ecx
cmp edi, eax
jne fcn.0043b670
or edx, edx
ret
Function at 0x401a70
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x414
mov eax, dword [0x4b9b30]
xor eax, esp
mov dword [esp + 0x410], eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
cmp eax, 0xffffffff
je 0x401a9d
push esi
call edi
test eax, 0x10000
je 0x401ac3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x401ac3
mov eax, 1
pop edi
mov ecx, dword [esp + 0x410]
xor ecx, esp
call fcn.00466fd0
add esp, 0x414
ret
lea eax, [esp + 0x20c]
push eax
mov ecx, esi
call fcn.00404c60
add esp, 4
test eax, eax
je 0x401aa8
lea ecx, [esp + 4]
push ecx
mov ecx, ebx
call fcn.00404c60
add esp, 4
test eax, eax
je 0x401aa8
lea edx, [esp + 4]
push edx
lea ecx, [esp + 0x210]
call fcn.00404de0
mov ecx, dword [esp + 0x418]
dec eax
add esp, 4
neg eax
sbb eax, eax
pop edi
xor ecx, esp
neg eax
call fcn.00466fd0
add esp, 0x414
ret

Function at 0x401b20
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x21c
mov eax, dword [0x4b9b30]
xor eax, esp
mov dword [esp + 0x218], eax
push esi
push edi
mov ecx, 0x11
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
push 0x1c2
lea eax, [esp + 0x62]
push 0
push eax
movsw word es:[edi], word [esi]
call fcn.00466350
add esp, 0xc
test ebx, ebx
je 0x401bf0
push ebx
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea edx, [esp + 8]
push edx
push 1
push 0
lea eax, [esp + 0x24]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401bf0
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1c]
push eax
push 0
push str.Start
mov edi, 4
push ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 8]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x401bf0
cmp dword [esp + 0xc], edi
jne 0x401bf0
lea eax, [edi - 3]
pop edi
pop esi
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.00466fd0
add esp, 0x21c
ret
mov ecx, dword [esp + 0x220]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.00466fd0
add esp, 0x21c
ret
Function at 0x401c10
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x214
mov eax, dword [0x4b9b30]
xor eax, esp
mov dword [esp + 0x210], eax
push esi
push edi
mov ecx, 0x11
mov esi, str.SYSTEMCurrentControlSetServices_
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
push 0x1c2
lea eax, [esp + 0x5a]
push 0
push eax
mov dword [esp + 0x18], 1
movsw word es:[edi], word [esi]
call fcn.00466350
add esp, 0xc
test ebx, ebx
jne 0x401c71
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.00466fd0
add esp, 0x214
ret
push ebx
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea edx, [esp + 8]
push edx
push 2
push 0
lea eax, [esp + 0x1c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401c58
mov edx, dword [esp + 8]
push 4
lea ecx, [esp + 0x10]
push ecx
push 4
push eax
push str.Start
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x218]
xor eax, eax
test esi, esi
pop edi
sete al
pop esi
xor ecx, esp
call fcn.00466fd0
add esp, 0x214
ret
Function at 0x401f40
Capabilities:
Start service

Disassembly:
sub esp, 0x214
mov eax, dword [0x4b9b30]
xor eax, esp
mov dword [esp + 0x20c], eax
mov ecx, dword [0x49f9b4]
mov edx, dword [0x49f9b8]
mov eax, dword [str.Estdlock]
push ebx
push ebp
push esi
push edi
push 0x1f6
xor ebp, ebp
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], eax
mov eax, dword [0x49f9bc]
mov dword [esp + 0x18], ecx
mov cx, word [0x49f9c0]
lea edx, [esp + 0x26]
push ebp
push edx
mov dword [esp + 0x28], eax
mov word [esp + 0x2c], cx
call fcn.00466350
add esp, 0xc
push 0xf003f
push ebp
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
je 0x402015
push 0xf003f
lea eax, [esp + 0x14]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x401fd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x402005
xor edi, edi
push edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x401ff9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x420
jne 0x401ffe
call fcn.00402140
xor edi, edi
mov ebp, 1
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebp
mov ecx, dword [esp + 0x21c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00466fd0
add esp, 0x214
ret

Function at 0x402700
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, ecx
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x10], edx
lea edx, [esp + 0x10]
push edx
push eax
push edi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x402733
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40275e
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 8]
push eax
shl esi, 9
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40275e
cmp esi, dword [esp + 4]
jne 0x40275e
mov eax, 1
pop esi
add esp, 0xc
ret
xor eax, eax
pop esi
add esp, 0xc
ret

Function at 0x402770
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, ecx
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x10], edx
lea edx, [esp + 0x10]
push edx
push eax
push edi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4027a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4027ce
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 8]
push eax
shl esi, 9
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4027ce
cmp esi, dword [esp + 4]
jne 0x4027ce
mov eax, 1
pop esi
add esp, 0xc
ret
xor eax, eax
pop esi
add esp, 0xc
ret
Function at 0x402940
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x24]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x28]
xor edx, edx
div dword [esi + 8]
push edi
mov ebp, 1
mov dword [esp + 0x14], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x14]
push 0
push eax
call fcn.00402840
mov ecx, dword [esi + 8]
mov ebx, eax
mov eax, dword [esp + 0x3c]
xor edx, edx
div ecx
add esp, 8
sub ecx, edx
mov edi, ecx
cmp edi, ebp
jbe 0x402986
mov edi, ebp
test ebx, ebx
jne 0x4029a1
mov ecx, dword [esp + 0x30]
mov ebx, edi
shl ebx, 9
push ebx
push 0
push ecx
call fcn.00466350
add esp, 0xc
jmp 0x402a02
mov eax, dword [esp + 0x2c]
mov esi, dword [eax]
lea eax, [edx + ebx]
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x28], edx
lea edx, [esp + 0x28]
push edx
push eax
push esi
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4029d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x402a1d
mov ecx, dword [esp + 0x30]
push 0
lea eax, [esp + 0x1c]
push eax
mov ebx, edi
shl ebx, 9
push ebx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402a1d
cmp ebx, dword [esp + 0x18]
jne 0x402a1d
mov dword [esp + 0x1c], 1
add dword [esp + 0x34], edi
add dword [esp + 0x30], ebx
inc dword [esp + 0x14]
sub ebp, edi
test ebp, ebp
je 0x402a27
mov esi, dword [esp + 0x2c]
jmp 0x402960
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret

Function at 0x402a40
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x20]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
xor edx, edx
div dword [ebp + 8]
push esi
push edi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x28]
push 1
push eax
mov esi, ebp
call fcn.00402840
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x402b0b
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x30]
xor edx, edx
div edi
mov eax, dword [esp + 0x34]
sub edi, edx
cmp edi, eax
jbe 0x402a8a
mov edi, eax
mov esi, dword [ebp]
lea eax, [edx + ecx]
mov ecx, 0x200
mul ecx
push 0
mov dword [esp + 0x20], edx
lea edx, [esp + 0x20]
push edx
push eax
push esi
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x402abd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x402b0b
mov ecx, dword [esp + 0x2c]
push 0
lea eax, [esp + 0x18]
push eax
mov ebx, edi
shl ebx, 9
push ebx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402b0b
cmp ebx, dword [esp + 0x14]
jne 0x402b0b
mov eax, dword [esp + 0x34]
add dword [esp + 0x30], edi
add dword [esp + 0x2c], ebx
inc dword [esp + 0x28]
sub eax, edi
mov dword [esp + 0x34], eax
test eax, eax
jne 0x402a58
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
Function at 0x402b20
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
push 0x19000
call fcn.0044383e
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x402b4c
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push 0x19000
push 0
push ebx
call fcn.00466350
mov esi, dword [esp + 0x3c]
mov ebp, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
add esp, 0xc
test ebp, ebp
je 0x402bec
mov ecx, 0x200
mul ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
lea ecx, [ecx]
mov edi, ebp
cmp ebp, 0xc8
jbe 0x402b8f
mov edi, 0xc8
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x34]
push eax
push edx
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x402bc1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x402c2a
mov ecx, dword [esp + 0x2c]
push 0
lea eax, [esp + 0x18]
push eax
mov esi, edi
shl esi, 9
push esi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402c2a
cmp esi, dword [esp + 0x14]
jne 0x402c2a
sub ebp, edi
jne 0x402b80
mov esi, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
lea eax, [ebx + 4]
mov dword [ebx], 0xfffffff8
mov dword [eax], 0xffffffff
add eax, 4
mov ecx, 2
cmp edx, 0x6400
jbe 0x402c4c
push ebx
call fcn.00443849
add esp, 4
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call fcn.00443849
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
test edx, edx
je 0x402c5b
mov dword [eax], ecx
dec edx
add eax, 4
inc ecx
test edx, edx
jne 0x402c50
mov eax, dword [esi + 8]
mov ecx, 0xc8
cmp eax, ecx
jae 0x402c69
mov ecx, eax
mov eax, dword [esi + 0x10]
mov edi, dword [esp + 0x2c]
push ebx
call fcn.00402770
add esp, 4
test eax, eax
je 0x402c2a
push ebx
call fcn.00443849
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
Function at 0x404b40
Capabilities:
Set registry value

Disassembly:
push ecx
lea eax, [esp]
push eax
push 0x20006
push 0
push str.SoftwareLenovo_
push SysReAllocString
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x404b6c
xor eax, eax
pop ecx
ret
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push esi
push ecx
mov ecx, dword [esp + 8]
push edx
push 1
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esp + 4]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
pop esi
pop ecx
ret

Function at 0x404c60
Capabilities:
Get file version info

Disassembly:
sub esp, 0x220
mov eax, dword [0x4b9b30]
xor eax, esp
mov dword [esp + 0x21c], eax
mov eax, dword [esp + 0x224]
push esi
push edi
mov edi, ecx
push 0
push edi
mov dword [esp + 0x18], eax
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
jne 0x404ca8
pop edi
pop esi
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.00466fd0
add esp, 0x220
ret
xor ecx, ecx
mov edx, 2
mul edx
seto cl
push ebp
neg ecx
or ecx, eax
push ecx
call fcn.0044383e
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x404cfa
push ebp
push esi
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x404cf1
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x1c]
push ecx
push str.VarFileInfoTranslation
push ebp
call sub.VERSION.dll_VerQueryValueW
mov edi, eax
test edi, edi
jne 0x404d14
push ebp
call fcn.00443849
add esp, 4
pop ebp
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.00466fd0
add esp, 0x220
ret
xor esi, esi
test dword [esp + 0xc], 0xfffffffc
jbe 0x404db0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
jmp 0x404d30
mov eax, dword [esp + 0x1c]
movzx edx, word [eax + esi*4 + 2]
movzx eax, word [eax + esi*4]
push edx
push eax
lea ecx, [esp + 0x2c]
push str.StringFileInfo_04x_04x_
push ecx
call fcn.00468f04
add esp, 0x10
push 0x49f910
lea edx, [esp + 0x28]
push edx
call ebx
push 0x49f920
lea eax, [esp + 0x28]
push eax
call ebx
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x2c]
push eax
push ebp
call sub.VERSION.dll_VerQueryValueW
mov edi, eax
test edi, edi
jne 0x404d92
mov ecx, dword [esp + 0x10]
inc esi
shr ecx, 2
cmp esi, ecx
jb 0x404d30
jmp 0x404daf
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
sub edx, eax
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x404da0
pop ebx
push ebp
call fcn.00443849
mov ecx, dword [esp + 0x22c]
add esp, 4
pop ebp
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.00466fd0
add esp, 0x220
ret
Function at 0x405010
Capabilities:
Access the windows event log

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.estdisk
push 0
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
jne 0x405044
push str.Cannot_register_the_event_source.
call fcn.004693cc
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
ret
push 0
lea eax, [esp + 0x10]
push eax
push 0
push 1
push 0
push 0xc0020001
push 0
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
test eax, eax
jne 0x405072
push str.Cannot_report_the_event.
call fcn.004693cc
add esp, 4
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
ret
Function at 0x4053e0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov esi, eax
lea eax, [esp + 0x14]
push eax
push 0x20019
push 0
push str.SoftwareLenovo_
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], 0x208
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x40544f
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push esi
push 0
push 0
push str.SDiskPath
push edx
call ebx
mov edi, eax
mov eax, dword [esp + 0x14]
push eax
call ebp
xor eax, eax
test edi, edi
sete al
test eax, eax
jne 0x4054b2
lea ecx, [esp + 0x14]
push ecx
push 0x20019
xor edi, edi
push edi
push str.SoftwareLenovo_
push SysReAllocString
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
jne 0x40549e
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push esi
push edi
push edi
push str.SDiskPath
push eax
call ebx
mov ecx, dword [esp + 0x14]
push ecx
mov edi, eax
call ebp
xor edx, edx
test edi, edi
sete dl
mov edi, edx
test edi, edi
jne 0x4054b0
push esi
call fcn.00405160
add esp, 4
test eax, eax
je 0x4054b0
call fcn.00405090
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret

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

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0x14]
push edi
push ebp
call fcn.0044380f
mov edi, eax
add esp, 4
test edi, edi
jne 0x40616a
pop edi
pop ebp
pop ecx
ret
mov eax, dword [esp + 0x10]
push ebx
push 0
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [esp + 0x10]
push ecx
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
test ebx, ebx
je 0x4061b3
mov edx, dword [esp + 0x18]
push 0
push 0
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x10]
push eax
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
push edi
call fcn.00443849
add esp, 4
mov eax, ebx
pop ebx
pop edi
pop ebp
pop ecx
ret