joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46cab0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
test edi, edi
je 0x46cb41
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x10]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareByteSnapFoenixCodingSettings
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x46cb41
mov ebx, dword [esp + 0xc]
test ebx, ebx
je 0x46cb3a
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46cb07
mov esi, dword [ebp + 8]
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
push edx
push edi
push 1
push 0
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [esp + 0x10]
push edi
mov edx, esi
call fcn.0046d260
mov ebx, dword [esp + 0xc]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x46cb50
Capabilities:
Set registry value

Disassembly:
sub esp, 8
mov dword [esp], 0
test esi, esi
jne 0x46cb74
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x46cbf3
lea ecx, [esp + 4]
push ecx
lea edx, [esp + 4]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareByteSnapFoenixCodingSettings
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x46cbdf
push edi
mov edi, dword [esp + 4]
test edi, edi
je 0x46cbd7
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46cbb0
mov ecx, dword [esp + 0x10]
sub eax, edx
sar eax, 1
add eax, eax
push eax
push esi
push 1
push 0
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, dword [esp + 4]
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46cbff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add esp, 8
ret 4

Function at 0x46ccd0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
cmp dword [0x4ee82c], 0
jne 0x46cd0c
lea eax, [esp + 8]
push eax
push 0x4ee82c
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareByteSnapFoenixCodingSettings
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp dword [0x4ee82c], 0
je 0x46cd58
push esi
push 0x400
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x400
call fcn.00490828
add esp, 4
mov esi, eax
lea edx, [esp + 4]
push edx
push esi
xor ecx, ecx
lea eax, [esp + 0x10]
push eax
push ecx
mov word [esi], cx
mov ecx, dword [esp + 0x24]
mov edx, dword [0x4ee82c]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, esi
pop esi
add esp, 0xc
ret 4
xor eax, eax
add esp, 0xc
ret 4
Function at 0x475330
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x1f0
push ebx
mov bl, al
push esi
push edi
test bl, bl
jbe 0x47536e
movzx eax, byte [esp + 0x200]
mov edx, eax
shl edx, 4
sub edx, eax
mov eax, dword [0x4ec5c0]
lea eax, [eax + edx*2]
lea ecx, [esp + 0x10c]
movzx edx, bl
movzx esi, byte [eax]
mov dword [ecx], esi
inc eax
add ecx, 4
sub edx, 1
jne 0x475360
mov dl, byte [esp + 0x204]
test dl, dl
jbe 0x47538a
movzx edi, bl
movzx ecx, dl
lea edi, [esp + edi*4 + 0x10c]
xor eax, eax
rep stosd dword es:[edi], eax
test bl, bl
jbe 0x475520
push ebp
movzx eax, bl
movzx ebp, dl
lea ecx, [eax + ebp]
lea esi, [ecx - 1]
lea ecx, [esp + ecx*4 + 0x10c]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
jmp 0x4753c0
mov bl, byte [esp + 0x110]
xor cl, cl
test esi, esi
jle 0x4753e7
xor eax, eax
nop
mov edi, dword [esp + eax*4 + 0x114]
inc cl
mov dword [esp + eax*4 + 0x110], edi
movzx eax, cl
cmp eax, esi
jl 0x4753d0
mov eax, dword [esp + 0x1c]
movzx ecx, bl
mov bl, byte [ecx*4 + 0x4cecc8]
mov dword [eax], 0
test dl, dl
jbe 0x475514
lea edi, [ebp - 2]
xor ecx, ecx
mov esi, ebp
lea ebx, [ebx]
cmp edi, 0x1a
ja case.0x475420.1
movzx edx, byte [edi + 0x4755a4]
jmp dword [edx*4 + 0x47555c]
movzx eax, byte [ecx + 0x4cf4c8]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf4cc]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf4d4]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf4dc]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf4e4]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf4ec]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf4f8]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf508]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf518]
jmp 0x4754c4
movzx eax, byte [ecx + str.xhkmf]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf538]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf54c]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf560]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf574]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf58c]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf5a4]
jmp 0x4754c4
movzx eax, byte [ecx + 0x4cf5c0]
movzx edx, bl
add eax, edx
mov dword [esp + ecx*4 + 0x20], eax
mov eax, dword [esp + ecx*4 + 0x20]
cmp eax, 0xff
jbe 0x4754e9
mov ebp, 0xff
xor edx, edx
div ebp
mov ebp, dword [esp + 0x14]
mov dword [esp + ecx*4 + 0x20], edx
mov eax, dword [esp + ecx*4 + 0x20]
mov eax, dword [eax*4 + 0x4cf0c8]
xor dword [esp + ecx*4 + 0x110], eax
mov dword [esp + ecx*4 + 0x20], eax
inc ecx
sub esi, 1
jne 0x475410
mov dl, byte [esp + 0x208]
mov esi, dword [esp + 0x18]
sub dword [esp + 0x10], 1
jne 0x4753c0
pop ebp
test dl, dl
jbe 0x475552
movzx eax, byte [esp + 0x200]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [0x4ec5b4]
lea ecx, [eax + ecx*2]
lea eax, [esp + 0x10c]
movzx esi, dl
mov dl, byte [eax]
mov byte [ecx], dl
add eax, 4
inc ecx
sub esi, 1
jne 0x475545
pop edi
pop esi
pop ebx
add esp, 0x1f0
ret

Function at 0x477b80
Capabilities:
Print debug messages

Disassembly:
mov ecx, dword [esp + 4]
lea eax, [esp + 8]
push eax
push ecx
push 0xfb8
push 0x4ec5c8
call fcn.004a01b1
add esp, 0x10
cmp eax, 0xffffffff
jne 0x477baa
xor edx, edx
mov word [0x4f1416], dx
push 0x4ec5c8
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
ret
Function at 0x477df0
Capabilities:
Check if file exists
Get file attributes
Get file size

Disassembly:
sub esp, 8
xor eax, eax
jmp 0x477e00
movzx ecx, word [eax + str.SoftwareByteSnapFoenixCodingSettings]
mov word [eax + 0x4ee840], cx
add eax, 2
test cx, cx
jne 0x477e00
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0
push 0
cmp eax, 0xffffffff
jne 0x477e2a
push 2
jmp 0x477e2c
push 3
push 0
push 0
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x4e5250], eax
cmp eax, 0xffffffff
jne 0x477e4c
or eax, eax
add esp, 8
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x477e7d
mov eax, 0xfeff
xor ecx, ecx
lea edx, [esp]
mov word [esp], ax
mov word [esp + 2], cx
call fcn.004782c0
mov edx, str.Windows_Registry_Editor_Version_5.00_r_n_n
call fcn.004782c0
jmp 0x477e90
mov edx, dword [0x4e5250]
push 2
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 4]
push eax
push 0x20019
push 0
push 0x4ee840
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x477ed1
push str.HKEY_CURRENT_USER
mov edx, 0x4ee538
call fcn.0040a1c0
mov ecx, dword [esp + 8]
push 0x4ee840
push ecx
call fcn.00477ef0
add esp, 0xc
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x4e5250]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
add esp, 8
ret
Function at 0x477ef0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Write file on windows

Disassembly:
sub esp, 0x630
mov eax, dword [0x4e3f80]
xor eax, esp
mov dword [esp + 0x62c], eax
mov eax, dword [esp + 0x638]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x640]
push edi
push eax
push 0x4ee538
push str._r_n__s_s__r_n
lea edx, [esp + 0x440]
mov dword [esp + 0x28], eax
call fcn.0040a1c0
mov edx, dword [0x4e5250]
add esp, 0xc
cmp edx, 0xffffffff
je 0x477f7a
lea eax, [esp + 0x434]
lea edi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x477f50
sub eax, edi
push 0
sar eax, 1
lea ecx, [esp + 0x18]
push ecx
add eax, eax
push eax
lea ecx, [esp + 0x440]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x477f8f
lea edx, [esp + 0x434]
push edx
push 0x4c6210
call fcn.00477b80
add esp, 8
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x1c]
push edx
push 0
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x240]
push ecx
push 0
mov ebp, 0x208
push esi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x38], ebp
mov edi, 1
call ebx
cmp eax, 0x103
je 0x478055
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
push eax
lea ecx, [esp + 0x234]
call fcn.00478120
mov eax, dword [0x4e5250]
add esp, 8
cmp eax, 0xffffffff
je 0x47800f
push 0
lea ecx, [esp + 0x24]
push ecx
push 4
push 0x4d044c
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x478021
push 0x4d044c
push 0x4c6210
call fcn.00477b80
add esp, 8
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x1c]
push edx
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x240]
mov eax, edi
push edx
push eax
push esi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x38], ebp
inc edi
call ebx
cmp eax, 0x103
jne 0x477fd5
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
push 0
push 0
push 0
push 0
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x38]
push ecx
push 0
push esi
mov dword [esp + 0x30], ebp
call ebx
mov edi, 1
cmp eax, 0x103
je 0x478104
test eax, eax
jne 0x4780e2
lea edx, [esp + 0x14]
push edx
push 0x20019
push eax
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4780e2
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x24]
push ecx
push edx
lea eax, [esp + 0x234]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x23c]
push ecx
push edx
call fcn.00477ef0
mov eax, dword [esp + 0x2c]
add esp, 0x18
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x38]
push edx
push edi
push esi
mov dword [esp + 0x30], ebp
call ebx
inc edi
cmp eax, 0x103
jne 0x478086
mov ecx, dword [esp + 0x63c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0049dc2a
add esp, 0x630
ret
Function at 0x4782c0
Capabilities:
Write file on windows

Disassembly:
push ecx
push edi
mov edi, dword [0x4e5250]
cmp edi, 0xffffffff
je 0x4782f8
mov eax, edx
push esi
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4782d3
sub eax, esi
push 0
sar eax, 1
lea ecx, [esp + 0xc]
push ecx
add eax, eax
push eax
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
pop edi
pop ecx
ret
push edx
push 0x4c6210
call fcn.00477b80
add esp, 8
pop edi
pop ecx
ret

Function at 0x478310
Capabilities:
Set registry value

Disassembly:
push ecx
push ebx
push esi
mov esi, eax
mov ebx, reloc.SHELL32.dll_SHChangeNotifyRegister
mov ecx, str.HKEY_CURRENT_USER
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x478346
test dx, dx
je 0x478342
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x478346
add eax, 4
add ecx, 4
test dx, dx
jne 0x478320
xor eax, eax
jmp 0x47834b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x478359
mov ebx, reloc.WS2_32.dll_accept
jmp 0x478407
mov ecx, str.HKEY_LOCAL_MACHINE
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x478386
test dx, dx
je 0x478382
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x478386
add eax, 4
add ecx, 4
test dx, dx
jne 0x478360
xor eax, eax
jmp 0x47838b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x478407
mov ecx, str.HKEY_CLASSES_ROOT
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4783bc
test dx, dx
je 0x4783b8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4783bc
add eax, 4
add ecx, 4
test dx, dx
jne 0x478396
xor eax, eax
jmp 0x4783c1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4783cc
mov ebx, SHChangeNotifyRegister
jmp 0x478407
mov ecx, str.HKEY_USERS
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4783f9
test dx, dx
je 0x4783f5
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4783f9
add eax, 4
add ecx, 4
test dx, dx
jne 0x4783d3
xor eax, eax
jmp 0x4783fe
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x478407
mov ebx, reloc.WS2_32.dll_closesocket
mov edx, dword [esi + 0x400]
cmp edx, 0x16
jne 0x478474
mov eax, dword [0x4ee7b8]
test eax, eax
je 0x47842c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x4ee7b8], 0
push 0x4ee7b8
push 0
push 0
add esi, 0x200
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4784a4
lea eax, [esp + 8]
push eax
push 0x4ee7b8
push 0
push 0xf003f
push 0
push 0
push 0
push esi
push ebx
mov dword [0x4ee7b8], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
pop esi
pop ebx
pop ecx
ret
lea ecx, [esi + 0x408]
cmp edx, 4
je 0x478485
lea ecx, [esi + 0x40c]
mov eax, dword [esi + 0x404]
push eax
push ecx
mov ecx, dword [0x4ee7b8]
push edx
push 0
add esi, 0x200
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop esi
pop ebx
pop ecx
ret
Function at 0x478b80
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
push ebp
mov ebp, dword [esp + 0x14]
push esi
push edi
push 0x400
call fcn.00490828
add esp, 4
mov esi, eax
xor eax, eax
push eax
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x18]
push edx
push ebp
mov word [esi], ax
mov dword [0x4ee7bc], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x478c3a
jmp 0x478bc0
mov dx, word [esp + 0xc]
mov eax, 0xfeff
cmp dx, ax
je 0x478c21
cmp dword [esp + 0x10], 2
jne 0x478c3a
cmp dx, 0xa
je 0x478c03
cmp dx, 0xd
je 0x478c03
mov eax, esi
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x478be7
sub eax, edi
sar eax, 1
xor ecx, ecx
mov word [esi + eax*2], dx
mov word [esi + eax*2 + 2], cx
jmp 0x478c21
mov eax, esi
lea edx, [eax + 2]
jmp 0x478c10
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x478c10
sub eax, edx
sar eax, 1
jne 0x478c44
push 0
lea edx, [esp + 0x14]
push edx
push 2
lea eax, [esp + 0x18]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x478bc0
mov dword [0x4ee7bc], 1
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0xc
ret
Function at 0x478c50
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
mov eax, dword [0x4e3f80]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
je 0x478ca9
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x478ce7
cmp eax, 2
jne 0x478cc3
push str.Key_not_found._n
call fcn.004a01ce
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0049dc2a
mov esp, ebp
pop ebp
ret
push str.Error_opening_key._n
call fcn.004a01ce
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0049dc2a
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [esi + eax*2 - 2], 0x5c
lea edi, [esi + eax*2]
je 0x478d09
mov ecx, 0x5c
mov word [edi], cx
add edi, 2
xor edx, edx
mov word [edi], dx
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x34]
push edx
push 0
push eax
mov dword [esp + 0x34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x478d87
jmp 0x478d40
lea eax, [esp + 0x20]
mov edx, edi
call fcn.00477d90
push esi
push ebx
call fcn.00478c50
add esp, 8
test eax, eax
je 0x478d87
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x14]
push 0
push 0
push 0
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x34]
push eax
push 0
push ecx
mov dword [esp + 0x34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x478d40
xor edx, edx
mov word [edi - 2], dx
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov ecx, dword [esp + 0x22c]
pop edi
neg eax
pop esi
sbb eax, eax
pop ebx
xor ecx, esp
inc eax
call fcn.0049dc2a
mov esp, ebp
pop ebp
ret

Function at 0x478dc0
Capabilities:
Create thread

Disassembly:
cmp dword [esi + 0x20000], 0
jne 0x478dfe
push 0
push 0
push esi
push 0x478e10
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x20000], eax
cmp eax, 0xffffffff
jne 0x478df2
mov dword [esi + 0x20000], 0
xor eax, eax
cmp dword [esi + 0x20000], eax
setne al
ret
xor eax, eax
ret
Function at 0x4792e0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x10
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
push str.IMG1:
mov esi, eax
call edi
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x479321
push str._IMG1__Open_device_failed_r_n
call fcn.00477b80
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10
ret
push ebx
push ebx
push 3
push ebx
push ebx
push SHChangeNotifyRegister
push esi
mov dword [esp + 0x34], ebx
call edi
mov edi, eax
cmp edi, 0xffffffff
jne 0x479358
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Flash_Open_file___s__failed___u._r_n
call fcn.00477b80
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10
ret
push ebp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
push ebp
push esi
push str.Flash_File___s___u_bytes_r_n
call fcn.00477b80
push 2
push str.Flash_partition___d_r_n
lea esi, [ebp + 0x100008]
call fcn.00477b80
add esi, 4
push esi
call fcn.0049f632
mov esi, eax
add esp, 0x18
mov dword [esp + 0x14], esi
test esi, esi
jne 0x4793a6
push str.Flash_Cannot_allocate_memory__r_n
call fcn.00477b80
add esp, 4
jmp 0x479410
mov dword [esi], 2
add esi, 4
mov dword [esi], ebp
add esi, 4
mov dword [esi], ebp
add esi, 4
lea esp, [esp]
push 0
lea eax, [esp + 0x14]
push eax
push 0x40000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
add ebx, eax
push ebx
push str.Flash__u_bytes_read_r_n
add esi, eax
call fcn.00477b80
add esp, 8
cmp dword [esp + 0x10], 0x40000
je 0x4793c0
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x20]
push ecx
push ebp
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [esp + 0x14]
push esi
call fcn.0049e328
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push edi
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
pop ebp
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x10
ret
Function at 0x479440
Capabilities:
Write file on windows

Disassembly:
push ecx
push edi
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push str.IMG1:
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x479477
push str._IMG1__Open_device_failed_r_n
call fcn.00477b80
add esp, 4
xor eax, eax
pop edi
pop ecx
ret 0xc
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x10]
push eax
lea edx, [esp + 0x1c]
mov dword [esp + 0xc], 0
call fcn.00479540
mov esi, eax
test esi, esi
je 0x479518
push ebx
mov ebx, dword [esp + 0x1c]
push ebx
push str.Flashing__u_bytes..._r_n
call fcn.00477b80
add esp, 8
push 0
lea ecx, [esp + 0x10]
push ecx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [0x4ee750]
test eax, eax
je 0x4794df
push 0
push str.UPGRADEFIRMWARE_PERCENT
call fcn.0046c980
mov ecx, dword [0x4ee750]
push 0x64
jmp 0x4794e1
push 2
push str.UPGRADEFIRMWARE_RESULTS
call fcn.0046c980
push 0
mov eax, 0x4c3af8
mov ebx, 0x12
call fcn.0040dea0
push esi
call fcn.0049081d
add esp, 4
pop ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, 1
pop edi
pop ecx
ret 0xc
push str.Failed_to_read_in_.bin_file__r_n
call fcn.00477b80
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, 1
pop edi
pop ecx
ret 0xc
Function at 0x4799a0
Capabilities:
Create thread

Disassembly:
push edi
push 0x1000
mov dword [esi + 0xc], 0x1000
call fcn.004907ee
xor edi, edi
add esp, 4
push edi
push edi
push esi
push 0x479bf0
push edi
push edi
mov dword [esi], eax
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0x20], edi
mov dword [esi + 0x18], 0xffffffff
mov dword [esi + 0x28], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x24], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
push edi
push edi
push edi
mov dword [esi + 0x20], eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0x2c], eax
mov eax, esi
pop edi
ret
Function at 0x479c00
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x38
push esi
push edi
xor edi, edi
push pe_nt_image_headers32
mov esi, eax
mov dword [esp + 0x10], edi
call fcn.00490828
add esp, 4
mov dword [esp + 0x10], eax
cmp dword [esi + 0x24], edi
jne 0x479dbe
push ebx
push ebp
lea esp, [esp]
cmp dword [esi + 0x28], edi
jne 0x479c42
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x479db3
mov ebp, dword [sym.imp.KERNEL32.dll_CreateEventW]
push edi
push edi
push edi
push edi
call ebp
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x18]
mov dword [esp + 0x48], eax
mov eax, dword [esi + 0x18]
push edx
push eax
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_WaitCommEvent]
mov eax, dword [esp + 0x44]
push 0x1f4
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi + 0x18]
cmp eax, 0xffffffff
je 0x479dac
test byte [esp + 0x14], 0x80
je 0x479cac
push edi
lea ecx, [esp + 0x20]
push ecx
push eax
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_ClearCommError]
test byte [esp + 0x14], 1
je 0x479db3
mov edx, dword [esi + 0x2c]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x479d9c
push edi
push edi
push edi
push edi
call ebp
mov ebp, dword [esp + 0x18]
mov edx, dword [esi + 0x18]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x14]
push ecx
push pe_nt_image_headers32
push ebp
push edx
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], edi
mov dword [esi + 0x1c], edi
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x479d83
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x479d92
mov edx, dword [esi + 0x18]
push edi
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x28]
push ecx
push edx
mov ebp, pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x479d73
lea esp, [esp]
cmp ebp, edi
jle 0x479d6c
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esi + 0x18]
push edi
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x28]
push ecx
push edx
sub ebp, 0x14
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x479d40
cmp ebp, edi
jg 0x479d73
push ebx
call dword [sym.imp.KERNEL32.dll_CancelIo]
mov eax, dword [esp + 0x10]
cmp eax, edi
jbe 0x479d92
push eax
mov eax, dword [esp + 0x1c]
push eax
jmp 0x479d8d
mov eax, dword [esp + 0x10]
cmp eax, edi
jbe 0x479d92
push eax
push ebp
call fcn.00488ae0
mov ecx, dword [esi + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test byte [esp + 0x14], 4
je 0x479db3
mov dword [esi + 0x1c], 1
jmp 0x479db3
push ebx
call dword [sym.imp.KERNEL32.dll_CancelIo]
cmp dword [esi + 0x24], edi
je 0x479c30
pop ebp
pop ebx
mov edx, dword [esp + 0x10]
push edx
call fcn.0049081d
add esp, 4
mov dword [esi + 0x20], edi
pop edi
xor eax, eax
pop esi
add esp, 0x38
ret