joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407870
Capabilities:
Create directory
Get disk information
Query environment variable

Disassembly:
mov eax, 0x4004
call fcn.0040b890
mov eax, dword [0x432010]
xor eax, esp
mov dword [esp + 0x4000], eax
mov eax, dword [esp + 0x4008]
push edi
push 0
push 0
push eax
call fcn.00408910
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4078c8
push str.LOADER:_failed_to_convert_runtime_tmpdir_to_a_wide_string._n
call fcn.00402570
add esp, 4
xor eax, eax
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040b6a3
add esp, 0x4004
ret
push esi
push 0x1000
lea eax, [esp + 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
mov esi, eax
call fcn.004103f1
add esp, 4
test esi, esi
jne 0x40790f
push str.LOADER:_failed_to_expand_environment_variables_in_the_runtime_tmpdir._n
call fcn.00402570
add esp, 4
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040b6a3
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.004087d0
add esp, 4
test eax, eax
je 0x4079a6
cmp word [esp + 0xc], 0x5c
je 0x407946
lea edi, [esp + 8]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x407933
mov eax, dword [0x4261b8]
mov dword [edi], eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jg 0x407982
push eax
lea eax, [esp + 0xc]
push eax
push str.LOADER:_runtime_tmpdir_points_to_non_existent_drive__ls__type:__d___n
call fcn.00402570
add esp, 0xc
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040b6a3
add esp, 0x4004
ret
lea eax, [esp + 8]
push eax
call fcn.0041284e
add esp, 4
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040b6a3
add esp, 0x4004
ret
push 0x1000
lea eax, [esp + 0xc]
push eax
push 0
call fcn.00412cb5
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4079e6
push str.LOADER:_failed_to_obtain_the_absolute_path_of_the_runtime_tmpdir._n
call fcn.00402570
add esp, 4
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040b6a3
add esp, 0x4004
ret
push 0x5c
push esi
call fcn.0040cc97
mov edi, eax
add esp, 8
test edi, edi
je 0x407a46
nop word [eax + eax]
mov ecx, edi
lea eax, [esp + 0x2008]
push esi
sub ecx, esi
sar ecx, 1
push ecx
push str._.s
push 0x1000
push eax
call fcn.00402470
add esp, 0x14
lea eax, [esp + 0x2008]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [edi + 2]
push 0x5c
push eax
call fcn.0040cc97
mov edi, eax
add esp, 8
test edi, edi
jne 0x407a00
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x407a99
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x407a99
push esi
push str.LOADER:_failed_to_create_runtime_tmpdir_path__ls__n
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateDirectory
call fcn.004028a0
push esi
call fcn.004103f1
add esp, 0x14
xor eax, eax
pop esi
pop edi
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040b6a3
add esp, 0x4004
ret
mov ecx, dword [esp + 0x4008]
mov eax, esi
pop esi
pop edi
xor ecx, esp
call fcn.0040b6a3
add esp, 0x4004
ret
Function at 0x407ac0
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
mov eax, 0x2254
call fcn.0040b890
mov eax, dword [0x432010]
xor eax, esp
mov dword [esp + 0x2250], eax
push ebx
push ebp
mov ebp, dword [esp + 0x2260]
lea eax, [esp + 0x258]
push esi
push edi
push ebp
push 0x426490
push 0x1000
push eax
call fcn.00402470
mov ebx, eax
add esp, 0x10
cmp ebx, 0x1000
jge 0x407c40
lea eax, [esp + 0x10]
mov esi, 0x1001
push eax
lea eax, [esp + 0x264]
sub esi, ebx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x407c40
mov edx, 0x42649c
lea ecx, [esp + 0x3c]
nop word [eax + eax]
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x407b66
test ax, ax
je 0x407b62
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
jne 0x407b66
add ecx, 4
add edx, 4
test ax, ax
jne 0x407b40
xor eax, eax
jmp 0x407b6b
sbb eax, eax
or eax, 1
test eax, eax
je 0x407c17
mov ecx, 0x4264a0
lea eax, [esp + 0x3c]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407ba6
test dx, dx
je 0x407ba2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407ba6
add eax, 4
add ecx, 4
test dx, dx
jne 0x407b80
xor eax, eax
jmp 0x407bab
sbb eax, eax
or eax, 1
test eax, eax
je 0x407c17
lea eax, [esp + 0x3c]
push eax
push 0x4264a8
lea eax, [esp + ebx*2 + 0x266]
push esi
push eax
call fcn.00402470
add esp, 0x10
cmp eax, esi
jge 0x407c17
mov eax, dword [esp + 0x10]
test al, 0x10
je 0x407c09
test eax, 0x400
je 0x407bf7
cmp dword [esp + 0x34], 0xa000000c
jne 0x407bf7
lea eax, [esp + 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x407c17
lea eax, [esp + 0x260]
push eax
call fcn.00407ac0
add esp, 4
jmp 0x407c17
lea eax, [esp + 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x407b31
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebp
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
dec eax
neg eax
sbb eax, eax
jmp 0x407c43
or eax, 0xffffffff
mov ecx, dword [esp + 0x2260]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040b6a3
add esp, 0x2254
ret
Function at 0x407d60
Capabilities:
Create directory
Get common file path

Disassembly:
mov eax, 0x2028
call fcn.0040b890
mov eax, dword [0x432010]
xor eax, esp
mov dword [esp + 0x2024], eax
push ebx
mov ebx, dword [esp + 0x2030]
push ebp
xor ebp, ebp
mov dword [esp + 8], ebx
push esi
push edi
cmp dword [ebx + 0x3038], ebp
je 0x407df7
push 0x426370
call fcn.00407f20
push dword [ebx + 0x3038]
mov ebp, eax
call fcn.00407870
mov edi, eax
add esp, 8
test edi, edi
jne 0x407dc2
push ebp
call fcn.004103f1
add esp, 4
or eax, 0xffffffff
jmp 0x407efb
push edi
push 0x426374
call fcn.00412fa9
push edi
mov esi, eax
call fcn.004103f1
add esp, 0xc
test esi, esi
je 0x407df7
push str.LOADER:_failed_to_set_the_TMP_environment_variable._n
call fcn.00402570
push ebp
call fcn.004103f1
add esp, 8
or eax, 0xffffffff
jmp 0x407efb
lea eax, [esp + 0x34]
push eax
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call sub.KERNEL32.dll_GetCurrentProcessId
push eax
push str._MEI_d
lea eax, [esp + 0x1c]
push 0x10
push eax
call fcn.004023b0
add esp, 0x10
xor esi, esi
jmp 0x407e29
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.004137ad
add esp, 8
mov edi, eax
push dword [ebx + 0x301c]
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x407e62
push edi
call fcn.004103f1
inc esi
add esp, 4
or ebx, 0xffffffff
cmp esi, 5
jl 0x407e25
jmp 0x407e98
push 0x1000
lea eax, [ebx + 0x2012]
push eax
push edi
call fcn.00408990
add esp, 0xc
test eax, eax
jne 0x407e8d
push str.LOADER:_length_of_teporary_directory_path_exceeds_maximum_path_length__n
call fcn.00402570
add esp, 4
or ebx, 0xffffffff
jmp 0x407e8f
xor ebx, ebx
push edi
call fcn.004103f1
add esp, 4
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x3038], 0
je 0x407ef9
push 0
push 0
push 0x426370
call fcn.00408910
test ebp, ebp
je 0x407ee3
push 0
push 0
push ebp
mov edi, eax
call fcn.00408910
mov esi, eax
push esi
push edi
call fcn.00412fa9
push edi
call fcn.004103f1
push esi
call fcn.004103f1
push ebp
call fcn.004103f1
add esp, 0x2c
jmp 0x407ef9
mov esi, eax
push 0x4260ac
push esi
call fcn.00412fa9
push esi
call fcn.004103f1
add esp, 0x18
mov eax, ebx
mov ecx, dword [esp + 0x2034]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040b6a3
add esp, 0x2028
ret

Function at 0x407f20
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x4004
call fcn.0040b890
mov eax, dword [0x432010]
xor eax, esp
mov dword [esp + 0x4000], eax
mov eax, dword [esp + 0x4008]
push 0
push 0
push eax
call fcn.00408910
add esp, 0xc
lea ecx, [esp]
push 0x1000
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, 0x1000
jae 0x407fb3
test eax, eax
je 0x407fb3
push 0x1000
lea eax, [esp + 0x2004]
push eax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 0x1000
jae 0x407fb3
test eax, eax
je 0x407fb3
push 0
lea eax, [esp + 0x2004]
push 0
push eax
call fcn.00408990
add esp, 0xc
mov ecx, dword [esp + 0x4000]
xor ecx, esp
call fcn.0040b6a3
add esp, 0x4004
ret
mov ecx, dword [esp + 0x4000]
xor eax, eax
xor ecx, esp
call fcn.0040b6a3
add esp, 0x4004
ret
Function at 0x408500
Capabilities:
Enumerate process modules

Disassembly:
mov eax, 0x4014
call fcn.0040b890
mov eax, dword [0x432010]
xor eax, esp
mov dword [esp + 0x4010], eax
push ebx
push esi
mov esi, dword [esp + 0x4020]
mov dword [esp + 8], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ebx, eax
lea eax, [esp + 8]
push eax
push 0
push 0
push ebx
mov dword [esp + 0x1c], ebx
call sub.KERNEL32.dll_K32EnumProcessModules
test eax, eax
je 0x408689
mov eax, dword [esp + 8]
test eax, eax
je 0x408689
push ebp
push 1
push eax
call fcn.004103e6
mov ebp, eax
add esp, 8
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x408688
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x10]
push ebp
push ebx
call sub.KERNEL32.dll_K32EnumProcessModules
test eax, eax
je 0x40867f
push 0x1000
lea eax, [esp + 0x20]
push eax
lea eax, [esi + 0x2012]
push eax
call fcn.00408910
add esp, 0xc
test eax, eax
je 0x40867f
lea esi, [esp + 0x1c]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4085b2
mov eax, dword [esp + 0xc]
sub esi, ecx
shr eax, 2
xor ebx, ebx
push edi
sar esi, 1
xor edi, edi
mov dword [esp + 0x18], eax
test eax, eax
je 0x40867e
nop dword [eax]
push 0x1000
lea eax, [esp + 0x2024]
push eax
push dword [ebp + edi*4]
push dword [esp + 0x20]
call sub.KERNEL32.dll_K32GetModuleFileNameExW
test eax, eax
je 0x408621
push esi
lea eax, [esp + 0x2024]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.0041293b
add esp, 0xc
test eax, eax
jne 0x408621
mov eax, dword [ebp + edi*4]
mov dword [ebp + ebx*4], eax
inc ebx
inc edi
cmp edi, dword [esp + 0x18]
jl 0x4085e0
test ebx, ebx
jle 0x40867e
mov edi, ebp
mov ebp, dword [esp + 0x14]
push 0x1000
lea eax, [esp + 0x2024]
push eax
push dword [edi]
push ebp
call sub.KERNEL32.dll_K32GetModuleFileNameExW
test eax, eax
je 0x408672
push dword [edi]
mov esi, 1
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
je 0x408672
nop dword [eax]
cmp esi, 0x20
jge 0x408672
push dword [edi]
inc esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
jne 0x408660
add edi, 4
sub ebx, 1
jne 0x408632
mov ebp, dword [esp + 0x1c]
pop edi
push ebp
call fcn.004103f1
add esp, 4
pop ebp
mov ecx, dword [esp + 0x4018]
pop esi
pop ebx
xor ecx, esp
call fcn.0040b6a3
add esp, 0x4014
ret
Function at 0x415f1c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00415d92

Function at 0x41a831
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041a384
Function at 0x401f10
Capabilities:
Get disk information
Inspect load icon resource
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x148
push ebx
push esi
push edi
push 0x65
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
lea ecx, [esp + 0xc]
call fcn.00401000
lea ecx, [esp + 0x50]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x50]
lea ecx, [esp + 0xc]
push edx
call fcn.004012b0
test eax, eax
je 0x402021
lea eax, [esp + 0x50]
push 0x404030
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x402084
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x10]
call fcn.00401290
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
sub eax, 8
push 0
push eax
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea edx, [esp + 0x24]
push 8
push edx
call ebx
mov eax, dword [esp + 0x2c]
push 0
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x48]
push 0x38
push ecx
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x50]
add esp, 0x3c
test eax, eax
mov eax, dword [esp + 0x10]
push edx
push eax
jne 0x401ffe
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401800
jmp 0x402084
sub esp, 0x38
mov ecx, 0xe
lea esi, [esp + 0x58]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x50]
call fcn.00401a90
jmp 0x402084
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov edi, eax
mov esi, 1
xor ebx, ebx
test edi, esi
je 0x40206a
mov dl, bl
lea ecx, [esp + 0x10]
add dl, 0x41
push edx
call sub.MFC42.DLL_CString::operator_1
push 0x40412c
lea ecx, [esp + 0x14]
call fcn.004020e2
lea ecx, [esp + 0xc]
mov eax, dword [esp + 0x10]
push eax
push 0
call fcn.00401cf0
add esi, esi
inc ebx
cmp ebx, 0x1a
jl 0x402039
lea ecx, [esp + 0xc]
call fcn.00401040
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0xc]
call fcn.00401030
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x148
ret 0x10

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

Disassembly:
call 0x42e00c
nop
pop eax
nop
nop
nop
nop
nop
add eax, 0x403ac5
sub eax, 0x403a6b
nop
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
nop
jl 0x42e030
nop
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x42e01e
nop
nop
popal
nop
nop
nop
jmp loc.00401219
Function at 0x430006
Capabilities:
Encode data using xor

Disassembly:
mov eax, section..text
nop
nop
nop
nop
push 4
nop
nop
nop
pop edi
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x430072
nop
nop
mov ebx, 0x408f6c
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x264826f1
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
loop 0x430060
nop
nop
nop
nop
mov eax, section..data
nop
nop
cmp eax, 0
nop
nop
nop
je 0x4300d2
nop
nop
mov ebx, 0x42e3d0
nop
nop
nop
nop
nop
mov ecx, ebx
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x6ac84281
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
loop 0x4300c0
nop
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp 0x401219
Function at 0x401190
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push edi
mov ecx, 0xa2
xor eax, eax
mov edi, 0x40ea70
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov dword [0x40ecf8], eax
push 0x40ebf4
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
call fcn.00401050
test eax, eax
jne 0x401248
push 0x80
push 0x40ea70
push 1
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x80
push 0x40eaf0
push 2
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
mov word [0x40eb72], 0
push 0x100
lea eax, [ebp - 0x100]
push eax
push 3
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
je 0x401248
lea edx, [ebp - 0x104]
push edx
push 0x40c030
lea eax, [ebp - 0x100]
push eax
call fcn.00403ca4
add esp, 0xc
cmp eax, 1
jne 0x401248
mov cx, word [ebp - 0x104]
mov word [0x40eb72], cx
push 0x80
push 0x40eb74
push 4
call fcn.00401270
add esp, 0xc
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x4013b0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
push edi
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4013db
xor eax, eax
jmp 0x40146b
mov edx, dword [ebp - 8]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
mov edi, dword [ebp - 0x10]
add edi, 8
mov ecx, 0x40
mov esi, dword [ebp - 4]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x14], 0x40c044
mov ecx, dword [ebp - 0x10]
add ecx, 8
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
mov al, byte [edx]
mov byte [ebp - 0x19], al
mov ecx, dword [ebp - 0x14]
cmp al, byte [ecx]
jne 0x401454
cmp byte [ebp - 0x19], 0
je 0x40144b
mov edx, dword [ebp - 0x18]
mov al, byte [edx + 1]
mov byte [ebp - 0x1a], al
mov ecx, dword [ebp - 0x14]
cmp al, byte [ecx + 1]
jne 0x401454
add dword [ebp - 0x18], 2
add dword [ebp - 0x14], 2
cmp byte [ebp - 0x1a], 0
jne 0x401417
mov dword [ebp - 0x20], 0
jmp 0x40145c
sbb edx, edx
sbb edx, 0xffffffff
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
xor eax, eax
cmp dword [ebp - 0x24], 0
sete al
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x401cc0
Capabilities:
Delete file
Set current directory

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0
je 0x401ce5
mov ecx, 0x40ed08
call fcn.00403040
and eax, 0xff
neg eax
sbb eax, eax
add eax, 2
mov dword [ebp - 4], eax
jmp 0x401cec
mov dword [ebp - 4], 0
call fcn.004035e0
push eax
mov eax, dword [ebp - 4]
push eax
push 0x40ef2c
mov ecx, dword [ebp + 8]
push ecx
call fcn.004028d0
add esp, 0x10
push 0
push 0
push 0x40eeec
mov edx, dword [ebp + 8]
push edx
call fcn.004028d0
add esp, 0x10
push 0
push 0
push 0x40ef2c
mov eax, dword [ebp + 8]
push eax
call fcn.004028d0
add esp, 0x10
mov ecx, 0x40ed08
call fcn.00403060
xor ecx, ecx
cmp eax, 2
sete cl
test ecx, ecx
je 0x401d64
push 0
xor edx, edx
cmp dword [ebp + 0xc], 0
setne dl
push edx
push str.USBVID_05A9PID_0509
mov eax, dword [ebp + 8]
push eax
call fcn.004028d0
add esp, 0x10
mov ecx, 0x40ed08
call fcn.00403040
and eax, 0xff
test eax, eax
je 0x401d9e
mov ecx, 0x40ed08
call fcn.00403140
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push str.drvidx.bin
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push str.drvdata.bin
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esp, ebp
pop ebp
ret

Function at 0x401db0
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push 0x5c
mov eax, dword [ebp + 8]
push eax
call fcn.00403f41
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x401dde
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 0x110], ecx
jmp 0x401de7
mov edx, dword [ebp + 8]
mov dword [ebp - 0x110], edx
mov eax, dword [ebp - 0x110]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push str._s_s
lea edx, [ebp - 0x10c]
push edx
call fcn.00403eef
add esp, 0x10
push 0
lea eax, [ebp - 0x10c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x401e37
cmp dword [ebp + 0x10], 0
je 0x401e37
lea edx, [ebp - 0x10c]
push edx
call fcn.00402c20
add esp, 4
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x402200
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call fcn.004034d0
lea eax, [ebp - 8]
push eax
push 0
call fcn.00401010
push eax
push 0x401bf0
push 0xa000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.004031d0
add esp, 4
call fcn.00403540
mov esp, ebp
pop ebp
ret
Function at 0x402340
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [ebp + 8], 1
jne 0x402351
call fcn.00401a40
mov eax, dword [ebp + 8]
push eax
call fcn.00402090
add esp, 4
push eax
push 0x1f
call fcn.00403560
add esp, 8
cmp dword [ebp + 8], 1
jne 0x402377
mov dword [ebp - 0x10], 0x402100
jmp 0x40237e
mov dword [ebp - 0x10], 0x402120
lea ecx, [ebp - 0xc]
push ecx
push 0
call fcn.00401010
push eax
mov edx, dword [ebp - 0x10]
push edx
push 0xa000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
push eax
call fcn.004031d0
add esp, 4
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
call fcn.004035c0
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x4027e0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x350
push esi
push edi
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
push str._s.inf
lea ecx, [ebp - 0x24c]
push ecx
call fcn.00403eef
add esp, 0xc
lea edx, [ebp - 0x144]
push edx
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x148], eax
cmp dword [ebp - 0x148], 0xffffffff
jne 0x402835
mov eax, dword [ebp - 4]
jmp 0x4028c4
lea ecx, [ebp - 0x118]
push ecx
mov edx, dword [ebp + 8]
push edx
push str._s_s
lea eax, [ebp - 0x350]
push eax
call fcn.00403eef
add esp, 0x10
push 0
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x350]
push edx
call fcn.00402670
add esp, 0xc
test eax, eax
je 0x40289c
lea edi, [ebp - 0x350]
mov edx, dword [ebp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 4], 1
jmp 0x4028b4
lea ecx, [ebp - 0x144]
push ecx
mov edx, dword [ebp - 0x148]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x402835
mov eax, dword [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x402b90
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 5
push str.grpconv.exe__o
call dword [sym.imp.KERNEL32.dll_WinExec]
pop ebp
ret