joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402b38
Capabilities:
Check mutex on windows
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x8fc
xor edi, edi
mov esi, ecx
push edi
push 0x409180
mov ebx, edx
mov dword [0x409164], esi
call sub.msvcrt.dll_memset
push 0x32c
push edi
push 0x408940
call sub.msvcrt.dll_memset
push 0x104
push edi
push 0x409060
call sub.msvcrt.dll_memset
add esp, 0x24
xor eax, eax
inc eax
mov edx, 0x409194
mov ecx, 0x401248
mov dword [0x40942c], eax
push 0x7f
call fcn.00404538
test eax, eax
je 0x402d81
cmp eax, 0x80
ja 0x402d81
push edi
xor eax, eax
inc eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push eax
mov dword [0x4085cc], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 4
mov edx, 0x409a74
mov ecx, 0x401250
call fcn.00404538
test eax, eax
jne 0x402c0b
xor eax, eax
mov edx, 0x4b1
push eax
push 0x10
push eax
push eax
xor ecx, ecx
call fcn.00404327
mov dword [0x409a88], 0x80070714
jmp 0x402d94
test byte [0x409a74], 0xc0
je 0x402cad
push 0x104
lea edx, [ebp - 0x108]
mov ecx, 0x40125c
call fcn.00404538
test eax, eax
je 0x402be9
lea eax, [ebp - 0x108]
push eax
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x4085c8], eax
test eax, eax
je 0x402cad
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402cad
xor ecx, ecx
test byte [0x409a74], 0x80
je 0x402c78
push ecx
push 0x10
push ecx
push 0x409194
mov edx, 0x54b
call fcn.00404327
jmp 0x402c92
push 4
push 0x20
push 0
push 0x409194
mov edx, 0x524
call fcn.00404327
cmp eax, 6
je 0x402cad
push dword [0x4085c8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x409a88], 0x800700b7
jmp 0x402d94
and dword [0x409a84], edi
mov ecx, ebx
call fcn.00405b88
test eax, eax
jne 0x402cc8
mov edx, 0x520
jmp 0x402d86
cmp byte [0x40895a], 0
je 0x402ce0
mov ecx, 0x40895a
call fcn.004021e7
jmp 0x402d94
push 0xa
push 0x40126c
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x402cfc
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
cmp dword [0x4081f8], 0
je 0x402d0b
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
cmp dword [0x408944], 0
je 0x402d19
xor eax, eax
inc eax
jmp 0x402d96
mov ecx, edi
call fcn.00403587
test eax, eax
je 0x402d94
mov ax, word [0x409a80]
xor ebx, ebx
inc ebx
cmp ax, bx
je 0x402d3e
cmp ax, 2
je 0x402d3e
cmp ax, 3
jne 0x402d7d
test dword [0x409a74], 0x100
je 0x402d7d
test byte [0x408958], 1
jne 0x402d7d
call fcn.004016b6
test eax, eax
jne 0x402d7d
push 0x83e
push 0x547
push 0x401800
push eax
mov edx, 0x7d6
call fcn.004063e1
cmp eax, 0x83d
jne 0x402d94
mov eax, ebx
jmp 0x402d96
mov edx, 0x4b1
xor eax, eax
xor ecx, ecx
push eax
push 0x10
push eax
push eax
call fcn.00404327
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406c20
mov esp, ebp
pop ebp
ret 4
Function at 0x402dae
Capabilities:
Get common file path
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
cmp word [0x408958], 0
push ebx
push esi
push edi
jne 0x402dfc
cmp dword [0x408944], 0
jne 0x402df3
call fcn.0040508f
test eax, eax
jne 0x402de9
xor eax, eax
jmp 0x402f3d
cmp word [0x408958], 0
jne 0x402dfc
call fcn.00403884
test eax, eax
je 0x402de2
call fcn.00405009
test eax, eax
je 0x402de2
call fcn.00405467
test eax, eax
je 0x402de2
mov esi, 0x105
lea eax, [ebp - 0x10c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x401114
mov edx, esi
lea ecx, [ebp - 0x10c]
call fcn.004064e7
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x402e76
push 0x401278
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x402e76
mov esi, esp
mov ecx, ebx
push 0
push 0x409224
call dword [0x40a290]
call ebx
cmp esi, esp
je 0x402e76
mov ecx, 4
int 0x29
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [0x408944], 0
jne 0x402e9c
cmp dword [0x409a70], 0
jne 0x402e9c
call fcn.004060d0
test eax, eax
je 0x402de2
push 0x409224
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x402ecb
push eax
push 0x10
push eax
push eax
mov edx, 0x4bc
xor ecx, ecx
call fcn.00404327
call fcn.0040613c
mov dword [0x409a88], eax
jmp 0x402de2
cmp dword [0x40894c], 0
jne 0x402ee1
call fcn.00403970
test eax, eax
je 0x402de2
test byte [0x408c68], 0xc0
jne 0x402efd
mov cx, word [0x409a80]
call fcn.004023ce
mov dword [0x409a7c], eax
jmp 0x402f04
and dword [0x409a7c], 0
mov eax, dword [0x408944]
test eax, eax
jne 0x402f27
cmp dword [0x409a70], eax
jne 0x402f27
call fcn.004039f1
test eax, eax
je 0x402de2
mov eax, dword [0x408944]
cmp word [0x408958], 0
jne 0x402f3a
test eax, eax
jne 0x402f3a
call fcn.00403fc9
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406c20
mov esp, ebp
pop ebp
ret
Function at 0x403e45
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor esi, esi
mov ebx, ecx
inc esi
xor eax, eax
push edi
test ebx, ebx
je 0x403f60
lea edi, [ebp - 0x21c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x21c]
push eax
push edx
xor edi, edi
push edi
push edi
push 0x20
push edi
push edi
push edi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x403f1a
push 0xffffffffffffffff
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [ebp - 0x20c]
cmp dword [0x408948], edi
jne 0x403ee7
mov eax, dword [0x409a6c]
test al, 1
je 0x403ee7
test al, 2
jne 0x403ee7
mov eax, ecx
and eax, 0xff000000
cmp eax, 0xaa000000
jne 0x403ee7
mov dword [0x409a6c], ecx
call fcn.00403f76
push dword [ebp - 0x218]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test dword [0x409a74], 0x400
je 0x403f5e
cmp dword [ebp - 0x20c], edi
jge 0x403f5e
jmp 0x403f5c
call fcn.0040613c
push edi
mov dword [0x409a88], eax
lea eax, [ebp - 0x208]
push 0x200
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push edi
push 0x10
lea eax, [ebp - 0x208]
mov edx, 0x4c4
push eax
push ebx
xor ecx, ecx
call fcn.00404327
mov esi, edi
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406c20
mov esp, ebp
pop ebp
ret
Function at 0x404088
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
push str.SHELL32.DLL
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x404216
push str.SHBrowseForFolder
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 8], eax
test eax, eax
je 0x404208
push 0xc3
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x404208
push str.SHGetPathFromIDList
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x404208
xor ebx, ebx
cmp byte [0x409060], bl
jne 0x40414a
push 0x409060
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ecx, 0x409060
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404111
sub ecx, edx
lea eax, [ecx + 0x409060]
push eax
push 0x409060
call dword [sym.imp.USER32.dll_CharPrevA]
mov dword [ebp - 4], eax
cmp byte [eax], 0x5c
jne 0x40414a
push eax
push 0x409060
call dword [sym.imp.USER32.dll_CharPrevA]
cmp byte [eax], 0x3a
je 0x40414a
mov eax, dword [ebp - 4]
mov byte [eax], bl
lea eax, [ebp - 0x30]
mov byte [0x4087e0], bl
mov dword [ebp - 0x30], esi
mov esi, esp
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov ebx, dword [ebp - 8]
mov ecx, ebx
push eax
mov dword [ebp - 0x24], 0x4085d8
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], 0x404060
mov dword [ebp - 0x18], 0x409060
call dword [0x40a290]
call ebx
cmp esi, esp
je 0x404193
mov ecx, 4
int 0x29
mov dword [ebp - 8], eax
test eax, eax
je 0x4041f4
mov ebx, dword [ebp - 0xc]
mov esi, esp
push 0x409060
push eax
mov ecx, ebx
call dword [0x40a290]
call ebx
cmp esi, esp
je 0x4041ba
mov ecx, 4
int 0x29
cmp byte [0x409060], 0
je 0x4041d7
push 0x409060
mov edx, 0x104
mov ecx, 0x4087e0
call fcn.00401485
mov ebx, dword [ebp - 0x10]
mov esi, esp
push dword [ebp - 8]
mov ecx, ebx
call dword [0x40a290]
call ebx
cmp esi, esp
je 0x4041f4
mov ecx, 4
int 0x29
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
cmp byte [0x4087e0], al
setne al
jmp 0x40422b
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, 0x4c1
jmp 0x40421b
mov edx, 0x4c2
xor ebx, ebx
mov ecx, esi
push ebx
push 0x10
push ebx
push ebx
call fcn.00404327
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x404538
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0xa
mov edi, ecx
mov ebx, edx
push edi
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, dword [ebp + 8]
ja 0x4045a3
test ebx, ebx
je 0x4045a3
test esi, esi
jne 0x40456b
xor eax, eax
jmp 0x4045a3
push 0xa
push edi
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x404567
push esi
push edi
push dword [ebp + 8]
push ebx
call fcn.00406f15
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x40464a
Capabilities:
Set file attributes

Disassembly:
mov edi, edi
push esi
push edi
xor esi, esi
mov edi, ecx
inc esi
call fcn.004064c8
test eax, eax
je 0x4046ae
cmp dword [0x40921c], 0
jne 0x4046a2
test byte [0x408958], 1
jne 0x4046a2
push 6
push 0
push 0x4032e0
push dword [0x4085c0]
mov edx, 0x7d3
mov dword [0x409444], edi
call fcn.004063e1
sub eax, 6
je 0x4046a2
dec eax
je 0x4046b3
sub eax, 0x832
jne 0x4046a2
mov dword [0x40921c], esi
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
mov eax, esi
pop esi
ret
xor esi, esi
jmp 0x4046ae

Function at 0x4047ea
Capabilities:
Create directory

Disassembly:
mov edi, edi
push edi
mov edi, ecx
mov al, byte [edi]
test al, al
je 0x40484f
push ebx
push esi
lea esi, [edi + 1]
xor ebx, ebx
mov cl, byte [esi]
cmp cl, 0x3a
jne 0x40480e
cmp byte [edi + 2], 0x5c
jne 0x40480e
lea esi, [edi + 3]
jmp 0x404848
cmp al, 0x5c
jne 0x404848
cmp cl, al
jne 0x404848
push 2
lea esi, [edi + 2]
pop ebx
jmp 0x404848
cmp byte [esi], 0x5c
jne 0x40483f
cmp byte [esi - 1], 0x3a
je 0x40483f
test ebx, ebx
je 0x404830
dec ebx
jmp 0x40483f
push 0
push edi
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [esi], 0x5c
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
cmp byte [esi], 0
jne 0x40481e
pop esi
pop ebx
pop edi
ret
Function at 0x404e80
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebx
push esi
xor ebx, ebx
mov esi, 0x40131c
push ebx
xor edx, edx
mov ecx, esi
call fcn.00404538
push 0xa
push esi
push ebx
mov dword [0x409184], eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [0x409180], eax
test eax, eax
je 0x405001
mov eax, dword [0x4085c0]
test eax, eax
je 0x404ef7
push ebx
push 0x842
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 5
push 0x841
push dword [0x4085c0]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.00404da8
test eax, eax
jne 0x404f1c
mov ecx, dword [0x4085c0]
mov edx, 0x4ba
push ebx
push 0x10
push ebx
push ebx
call fcn.00404327
mov esi, ebx
jmp 0x404fa7
push edi
push 0x409188
push 1
push 0x404ac0
push fcn.00404a60
push 0x4049c0
push 0x404940
push fcn.00404860
push 0x404bc0
push 0x404ba0
call dword [sym.imp.Cabinet.dll_FDICreate]
mov edi, eax
add esp, 0x24
test edi, edi
je 0x404f88
push 0x409180
push ebx
push 0x404be0
push ebx
push 0x401111
push str.MEMCAB
push edi
call dword [sym.imp.Cabinet.dll_FDICopy]
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x404fa6
push edi
call dword [sym.imp.Cabinet.dll_FDIDestroy]
pop ecx
test eax, eax
jne 0x404fa6
mov edx, dword [0x409188]
mov ecx, dword [0x4085c0]
push ebx
push 0x10
push ebx
push ebx
lea edx, [edx + 0x514]
call fcn.00404327
mov esi, ebx
pop edi
mov eax, dword [0x409180]
test eax, eax
je 0x404fbd
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [0x409180], ebx
test esi, esi
jne 0x404fda
cmp dword [0x409218], ebx
jne 0x404fda
push ebx
push 0x10
push ebx
push ebx
mov edx, 0x4f8
xor ecx, ecx
call fcn.00404327
test byte [0x408958], 1
jne 0x404fff
test byte [0x409a74], 1
jne 0x404fff
push ebx
push esi
push 0xfa1
push dword [0x4085c0]
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, esi
pop esi
pop ebx
ret
Function at 0x405165
Capabilities:
Delete file
Set current directory
Set file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [0x409220]
push edi
jmp 0x4051bd
cmp dword [0x408944], 0
jne 0x4051ab
cmp dword [0x409a70], 0
jne 0x4051ab
push 0x80
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [edi]
mov esi, dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, esi
test esi, esi
jne 0x405184
mov eax, dword [0x408940]
pop edi
pop esi
test eax, eax
je 0x405226
cmp dword [0x408944], 0
jne 0x405226
cmp dword [0x409a70], 0
jne 0x405226
push ecx
push 0x409224
push ecx
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.0040158c
test byte [0x409a74], 0x20
je 0x40520b
lea ecx, [ebp - 0x108]
call fcn.0040654a
push 0x4011cc
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [ebp - 0x108]
call fcn.004021e7
mov eax, dword [0x408940]
cmp word [0x409a80], 1
je 0x405239
test eax, eax
je 0x405239
call fcn.00401e1d
mov ecx, dword [ebp - 4]
and dword [0x408940], 0
xor ecx, ebp
call fcn.00406c20
mov esp, ebp
pop ebp
ret

Function at 0x405253
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get common file path
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10c], ecx
mov edi, edx
xor esi, esi
push ebx
push 0x401348
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00401524
add esp, 0x10
mov edx, 0x104
mov ecx, edi
inc ebx
push dword [ebp - 0x10c]
call fcn.00401485
lea eax, [ebp - 0x108]
mov edx, 0x104
push eax
mov ecx, edi
call fcn.004064e7
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405312
cmp ebx, 0x190
jl 0x405277
push edi
push 0
push 0x401354
push dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x4052fd
xor esi, esi
push edi
inc esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406c20
mov esp, ebp
pop ebp
ret 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
xor esi, esi
test eax, eax
je 0x4052d2
inc esi
mov dword [0x408940], esi
jmp 0x4052fd
Function at 0x40578f
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x40579f
sub edx, ecx
lea esi, [edx + 0x14]
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x4057e0
xor esi, esi
mov edx, 0x4b5
push esi
push 0x10
push esi
push esi
xor ecx, ecx
call fcn.00404327
call fcn.0040613c
mov dword [0x409a88], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
mov edx, esi
mov ecx, ebx
call fcn.00401485
push 0x401388
mov edx, esi
mov ecx, ebx
call fcn.004064e7
xor esi, esi
push esi
push 0x4000080
push 1
push esi
push esi
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 4]
cmp eax, 0xffffffff
je 0x4057cd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4057cd
test al, 0x10
je 0x4057cd
xor eax, eax
mov dword [0x409a88], esi
inc eax
jmp 0x4057d9
Function at 0x4060d0
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x40611a
push eax
push 0x10
push eax
push eax
mov edx, 0x4f0
xor ecx, ecx
call fcn.00404327
call fcn.0040613c
mov dword [0x409a88], eax
xor eax, eax
jmp 0x406129
push 2
pop edx
push edx
lea ecx, [ebp - 0x108]
call fcn.00405849
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406c20
mov esp, ebp
pop ebp
ret

Function at 0x406154
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x20], ecx
push esi
push 0x4013a4
lea eax, [ebp - 0x18]
mov dword [ebp - 0x1c], esi
xor ebx, ebx
push 0x14
push eax
inc ebx
call fcn.00401524
jmp 0x4061f7
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x40621b
lea edx, [edi + 8]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4061a4
sub ecx, esi
mov esi, esp
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0x20]
add eax, edx
push eax
push edx
push dword [edi + 4]
push dword [edi]
call dword [0x40a290]
call dword [ebp - 0x20]
cmp esi, esp
je 0x4061d2
mov ecx, 4
int 0x29
push edi
test eax, eax
je 0x406211
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov esi, dword [ebp - 0x1c]
lea eax, [ebp - 0x18]
inc esi
push esi
push 0x4013a4
push 0x14
push eax
mov dword [ebp - 0x1c], esi
call fcn.00401524
xor esi, esi
add esp, 0x10
lea eax, [ebp - 0x18]
push 0xa
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
jne 0x406187
jmp 0x406227
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x406227
mov dword [0x409a88], 0x80070714
mov ebx, esi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406c20
mov esp, ebp
pop ebp
ret

Function at 0x40635a
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push ecx
push 0x409224
push ecx
mov edx, 0x104
lea ecx, [ebp - 0x108]
call fcn.0040158c
mov edi, 0x4011a8
lea ecx, [ebp - 0x108]
push edi
mov edx, 0x104
call fcn.004064e7
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4063c6
test al, 0x10
jne 0x4063c6
push 8
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
jmp 0x4063cd
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.00406c20
mov esp, ebp
pop ebp
ret

Function at 0x4064c8
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4064d9
xor eax, eax
ret
shr eax, 4
not eax
and eax, 1
ret
Function at 0x40671d
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xb4
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [0x408200]
xor esi, esi
mov dword [ebp - 0xb0], 0xc
mov dword [ebp - 0xa8], esi
cmp edi, 0xfffffffe
jne 0x406845
lea eax, [ebp - 0xa4]
mov dword [0x408200], esi
push eax
mov dword [ebp - 0xa4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x40683f
xor edi, edi
inc edi
cmp dword [ebp - 0x94], edi
jne 0x40683f
cmp dword [ebp - 0xa0], 4
jne 0x40683f
cmp dword [ebp - 0x9c], 0xa
jae 0x40683f
push 0x4a
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x40683f
lea eax, [ebp - 0xac]
push eax
push 0x20019
push esi
push 0x4013b0
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40683f
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xb4]
push eax
push esi
push 0x401111
push dword [ebp - 0xac]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0xac]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x406811
mov eax, dword [0x408200]
jmp 0x406847
lea edx, [ebp - 0xa8]
lea ecx, [ebp - 0x10]
call fcn.004065e5
test eax, eax
je 0x40683f
mov eax, dword [ebp - 0xa8]
and eax, 0x3ff
cmp eax, edi
je 0x406837
cmp eax, 0xd
jne 0x40683f
mov dword [0x408200], edi
jmp 0x406845
mov edi, dword [0x408200]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00406c20
mov esp, ebp
pop ebp
ret

Function at 0x40685c
Capabilities:
Get disk size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push esi
xor esi, esi
cmp byte [ecx], 0
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
je 0x4068ab
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x4068ab
mov eax, dword [ebp - 4]
imul eax, dword [ebp - 8]
push 0x400
push dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret