joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41f504
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ebx, edx
xor edx, edx
push ebp
push 0x42a9f2
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
mov dword [ebp - 8], edx
mov esi, ebx
xor ecx, ecx
cmp byte [eax + 0x6a], 0
je 0x41f553
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x88]
test edx, edx
je 0x41f572
mov ecx, edx
add ecx, ebx
jmp 0x41f572
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41f572
mov ecx, edx
add ecx, ebx
test ecx, ecx
je 0x41f5e4
mov esi, dword [ecx + 0x18]
mov eax, dword [ecx + 0x1c]
add eax, ebx
mov dword [ebp - 0x10], eax
mov edi, dword [ecx + 0x20]
add edi, ebx
mov eax, dword [ecx + 0x24]
add eax, ebx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
cmp eax, 0xffff
jbe 0x41f5cd
test esi, esi
jbe 0x41f5e4
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088f4
test eax, eax
jne 0x41f5bf
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41f5e4
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41f59c
jmp 0x41f5e4
mov edx, eax
sub edx, dword [ecx + 0x10]
cmp edx, dword [ecx + 0x14]
jae 0x41f5e4
mov eax, edx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x42a9f9
ret
Function at 0x40674b
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
cmp eax, 8
ja case.0x40675b.1
jmp dword [eax*4 + 0x406843]
push dword [ebp + 0xc]
call fcn.00406867
and dword [0x42b1c8], 0
jmp case.0x40675b.1
mov eax, dword [0x42b1c8]
xor ecx, ecx
cmp ecx, dword [ebp + 0x14]
ja case.0x40675b.1
mov esi, dword [ebp + 0x10]
jb 0x406793
cmp eax, esi
jae case.0x40675b.1
call fcn.00406c02
add dword [0x42b1c8], 0x100000
xor eax, eax
cmp eax, dword [ebp + 0x14]
jb 0x406793
ja case.0x40675b.1
cmp dword [0x42b1c8], esi
jb 0x406793
jmp case.0x40675b.1
push dword [ebp + 0xc]
call fcn.00406867
call fcn.00406c02
jmp case.0x40675b.1
call fcn.00406c02
push 0x80
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp + 0xc]
call fcn.00406915
mov esi, eax
test esi, esi
jns case.0x40675b.1
push 0x403b44
jmp 0x406831
mov eax, dword [0x42b1c8]
xor ecx, ecx
cmp ecx, dword [ebp + 0x14]
ja case.0x40675b.1
mov esi, dword [ebp + 0x10]
jb 0x406801
cmp eax, esi
jae case.0x40675b.1
call fcn.00406c02
add dword [0x42b1c8], 0x80000
xor eax, eax
cmp eax, dword [ebp + 0x14]
jb 0x406801
ja case.0x40675b.1
cmp dword [0x42b1c8], esi
jb 0x406801
call fcn.00406c30
mov esi, eax
test esi, esi
jns 0x406839
push 0x403acc
push esi
call fcn.00408ad3
pop ecx
pop ecx
mov eax, esi
pop esi
pop ebp
ret 0x14
Function at 0x4069cf
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
xor esi, esi
mov dword [ebp - 4], esi
cmp dword [0x42b160], esi
je 0x4069eb
mov eax, 0x8000ffff
jmp 0x406b4f
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
push ebx
xor ebx, ebx
inc ebx
push edi
mov dword [0x42b16c], eax
cmp eax, esi
jne 0x406af9
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x1f4
mov dword [0x42b148], eax
push eax
mov eax, 0x42b15c
call fcn.004097dc
push 0x42af60
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push esi
push esi
push esi
push esi
mov dword [0x42b154], ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [0x42b158], eax
cmp eax, esi
jne 0x406a70
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp eax, esi
jle 0x406a5d
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
cmp dword [ebp - 4], esi
jl 0x406a69
mov dword [ebp - 4], 0x80004005
push 0x403be4
jmp 0x406ab4
push esi
push esi
push esi
push 0x406c61
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x42b14c], eax
cmp eax, esi
jne 0x406ac0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp eax, esi
jle 0x406aa3
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
cmp dword [ebp - 4], esi
jl 0x406aaf
mov dword [ebp - 4], 0x80004005
push 0x403c20
push dword [ebp - 4]
call fcn.00408ad3
pop ecx
pop ecx
jmp 0x406aff
push 0xffffffffffffffff
push dword [0x42b158]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
movzx eax, word [ebp + 0xc]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
shl eax, 0x10
push eax
push esi
push 0x401
push dword [0x42b150]
call edi
push esi
push ebx
push 0x404
push dword [0x42b150]
call edi
mov dword [0x42b160], ebx
cmp dword [ebp - 4], esi
jge 0x406b4a
cmp dword [0x42b154], esi
je 0x406b1d
push 0x42af60
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [0x42b154], esi
mov eax, dword [0x42b15c]
cmp eax, esi
je 0x406b2c
push eax
call fcn.00409396
mov eax, dword [0x42b14c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, esi
je 0x406b3e
push eax
call edi
mov eax, dword [0x42b158]
cmp eax, esi
je 0x406b4a
push eax
call edi
mov eax, dword [ebp - 4]
pop edi
pop ebx
pop esi
leave
ret 8
Function at 0x407b1a
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x429050]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x24], eax
xor eax, eax
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0xf0000000
xor ebx, ebx
stosd dword es:[edi], eax
push 1
push ebx
stosd dword es:[edi], eax
push ebx
lea eax, [ebp - 0x20]
push eax
xor esi, esi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x407b88
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x407b77
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x407b7e
mov esi, 0x80004005
push 0x4043a4
jmp 0x407c4a
lea eax, [ebp - 0x14]
push eax
push 0x10
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x407bc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x407bb5
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x407bbc
mov esi, 0x80004005
push 0x4043c8
jmp 0x407c4a
mov bl, byte [ebp - 0x14]
mov edi, dword [ebp - 0x24]
and bl, 7
add bl, 9
add bl, bl
mov dword [edi], esi
mov byte [ebp - 0x15], 0
je 0x407c52
movzx eax, byte [ebp - 0x15]
and dword [ebp - 0x1c], 0
shr eax, 1
movzx eax, byte [ebp + eax - 0x14]
push eax
lea eax, [ebp - 0x1c]
push 0x4043ec
push eax
call fcn.004090c8
mov esi, eax
add esp, 0xc
test esi, esi
js 0x407c3e
cmp dword [edi], 0
jne 0x407c0f
mov eax, dword [ebp - 0x1c]
mov dword [edi], eax
jmp 0x407c2f
push 0
push dword [ebp - 0x1c]
mov eax, edi
call fcn.0040900c
mov esi, eax
test esi, esi
js 0x407c45
cmp dword [ebp - 0x1c], 0
je 0x407c2f
push dword [ebp - 0x1c]
call fcn.00409396
add byte [ebp - 0x15], 2
and dword [ebp - 0x1c], 0
cmp byte [ebp - 0x15], bl
jb 0x407bdc
jmp 0x407c52
push 0x4043f8
jmp 0x407c4a
push 0x404438
push esi
call fcn.00408ad3
pop ecx
pop ecx
xor edi, edi
cmp dword [ebp - 0x20], edi
je 0x407c63
push edi
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp dword [ebp - 0x1c], edi
je 0x407c70
push dword [ebp - 0x1c]
call fcn.00409396
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00418ef1
leave
ret 4
Function at 0x407c83
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
mov eax, dword [0x429050]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor eax, eax
lea edi, [ebp - 0xa]
stosd dword es:[edi], eax
mov ax, word [ecx]
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 8], ax
mov word [ebp - 0x80c], ax
lea eax, [ebp - 0x80a]
push eax
call fcn.0041d8a0
add esp, 0xc
mov esi, 0x400
push esi
lea eax, [ebp - 0x80c]
push eax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
jne 0x407ced
xor al, al
jmp 0x407d2b
lea eax, [ebp - 0x80c]
push esi
push eax
call fcn.00419211
lea eax, [ebp - 0x80c]
push 0x404478
push eax
call fcn.00419228
add esp, 0x10
test eax, eax
jne 0x407d29
lea eax, [ebp - 0x80c]
push 0x40448c
push eax
call fcn.00419228
pop ecx
pop ecx
test eax, eax
je 0x407ce9
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00418ef1
leave
ret
Function at 0x407ff2
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x429050]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov esi, 0x404798
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push eax
mov dword [ebp - 0x38], eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
push 6
mov dword [ebx], eax
pop ecx
xor eax, eax
xor esi, esi
lea edi, [ebp - 0x34]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push esi
mov dword [ebp - 0x40], esi
call edi
mov dword [ebp - 0x3c], eax
or eax, 1
push eax
call edi
mov eax, dword [ebx]
dec eax
dec eax
je 0x408057
dec eax
je 0x4080b1
sub eax, 3
jne 0x40807f
mov dword [ebx], 3
jmp 0x4080b1
mov eax, dword [ebp - 0x38]
mov ax, word [eax]
push esi
push esi
push 3
push esi
push 3
mov word [ebp - 0x10], ax
push SysReAllocString
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x38], eax
cmp eax, 0xffffffff
jne 0x408083
mov dword [ebx], esi
jmp 0x4080b1
push esi
lea ecx, [ebp - 0x40]
push ecx
push 0x18
lea ecx, [ebp - 0x34]
push ecx
push esi
push esi
push 0x70000
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4080a6
cmp dword [ebp - 0x2c], 0xb
je 0x4080b1
push dword [ebp - 0x38]
mov dword [ebx], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x3c]
call edi
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.00418ef1
leave
ret 4
Function at 0x4080c8
Capabilities:
Create directory
Delete directory
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
xor ebx, ebx
push ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
call edi
mov dword [ebp - 0x14], eax
or eax, 1
push eax
call edi
mov dword [ebp - 0xc], ebx
lea eax, [ebp - 4]
push eax
call fcn.00407a6e
mov esi, eax
cmp esi, ebx
jl 0x4081cb
push dword [ebp - 4]
lea eax, [ebp - 8]
push dword [ebp + 8]
push 0x4047c8
push eax
call fcn.004090c8
mov esi, eax
add esp, 0x10
cmp esi, ebx
jl 0x4081d2
push dword [ebp - 8]
lea esi, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
call fcn.00409e6e
mov esi, eax
cmp esi, ebx
jl 0x4081d9
mov esi, dword [ebp - 0x10]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x408161
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x408161
push 4
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp esi, ebx
je 0x40816b
push esi
call fcn.00409396
cmp dword [ebp - 4], ebx
je 0x408178
push dword [ebp - 4]
call fcn.00409396
cmp dword [ebp - 8], ebx
je 0x408185
push dword [ebp - 8]
call fcn.00409396
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
cmp dword [ebp - 0x10], ebx
jne 0x4081e8
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x3e8
jl 0x4080ee
xor esi, esi
inc esi
cmp dword [ebp - 4], ebx
je 0x4081b0
push dword [ebp - 4]
call fcn.00409396
cmp dword [ebp - 8], ebx
je 0x4081bd
push dword [ebp - 8]
call fcn.00409396
push dword [ebp - 0x14]
call edi
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 4
push 0x4047a8
jmp 0x4081de
push 0x4047d4
jmp 0x4081de
push 0x404800
push esi
call fcn.00408ad3
pop ecx
pop ecx
jmp 0x4081a3
xor esi, esi
jmp 0x4081bd
Function at 0x40860d
Capabilities:
Get common file path
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 4], 0
and dword [ebp - 8], 0
push edi
mov edi, dword [0x42a15c]
cmp edi, 1
jne 0x4087d9
push ebx
push esi
mov ebx, 0x104
mov eax, ebx
lea esi, [ebp - 4]
call fcn.00408d5f
mov edi, eax
test edi, edi
jns 0x40864c
push 0x404bc4
jmp 0x4087cf
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x408685
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x408674
and edi, 0xffff
or edi, 0x80070000
test edi, edi
js 0x40867b
mov edi, 0x80004005
push 0x404bec
jmp 0x4087cf
cmp eax, ebx
jbe 0x4086ab
lea esi, [ebp - 4]
mov ebx, eax
call fcn.00408d5f
mov edi, eax
test edi, edi
js 0x408642
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x40865a
cmp eax, ebx
ja 0x40865a
push dword [ebp - 4]
lea eax, [ebp - 8]
push 0x404c10
push eax
call fcn.004090c8
mov edi, eax
add esp, 0xc
test edi, edi
jns 0x4086cf
push 0x404c30
jmp 0x4087cf
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
jne 0x408709
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x4086f8
and edi, 0xffff
or edi, 0x80070000
test edi, edi
js 0x4086ff
mov edi, 0x80004005
push 0x404c60
jmp 0x4087cf
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x404c7c
push ebx
call esi
mov dword [0x42af94], eax
test eax, eax
je 0x4087a9
push 0x404c88
push ebx
call esi
mov dword [0x42af90], eax
test eax, eax
je 0x4087a9
push 0x404c98
push ebx
call esi
mov dword [0x42af8c], eax
test eax, eax
je 0x4087a9
push 0x404ca8
push ebx
call esi
mov dword [0x42af88], eax
test eax, eax
je 0x4087a9
push 0x404cbc
push ebx
call esi
mov dword [0x42af84], eax
test eax, eax
je 0x4087a9
push 0x404cc8
push ebx
call esi
mov dword [0x42af80], eax
test eax, eax
je 0x4087a9
push 0x404cdc
push ebx
call esi
mov dword [0x42af7c], eax
test eax, eax
je 0x4087a9
push 0x404cf4
push ebx
call esi
mov dword [0x42af78], eax
test eax, eax
je 0x4087a9
push 0x404d48
push 1
call fcn.00408a57
jmp 0x4087d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x4087c3
and edi, 0xffff
or edi, 0x80070000
test edi, edi
js 0x4087ca
mov edi, 0x80004005
push 0x404d0c
push edi
call fcn.00408ad3
pop ecx
pop ecx
pop esi
pop ebx
cmp dword [ebp - 4], 0
mov dword [0x42a15c], edi
je 0x4087ed
push dword [ebp - 4]
call fcn.00409396
cmp dword [ebp - 8], 0
je 0x4087fb
push dword [ebp - 8]
call fcn.00409396
mov eax, edi
pop edi
leave
ret
Function at 0x408b34
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x429050]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor edi, edi
cmp dword [0x42a150], 0xffffffff
mov eax, 0x104
mov dword [ebp - 0x424], eax
mov dword [ebp - 0x420], edi
mov dword [ebp - 0x41c], edi
mov dword [ebp - 0x418], edi
je 0x408c82
cmp dword [0x42b178], edi
je 0x408c82
push eax
lea eax, [ebp - 0x20c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, 0x208
test eax, eax
jne 0x408baa
push esi
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.0041d8a0
add esp, 0xc
push ebx
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.00409f8a
test eax, eax
jns 0x408bcd
xor ebx, ebx
jmp 0x408bd9
mov edi, dword [ebp - 0x420]
mov ebx, dword [ebp - 0x41c]
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x408c02
push esi
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.0041d8a0
add esp, 0xc
lea esi, [ebp - 0x418]
call fcn.004093bc
mov esi, eax
test esi, esi
js 0x408c5c
push dword [ebp - 0x418]
push 0x404ee4
push 1
call fcn.00408a57
movzx eax, bx
push eax
movzx eax, di
shr ebx, 0x10
push ebx
push eax
shr edi, 0x10
push edi
lea eax, [ebp - 0x20c]
push eax
push 0x404f00
push 1
call fcn.00408a57
push 0x404e90
push 0x404e9c
push 1
call fcn.00408a57
add esp, 0x34
xor edi, edi
pop ebx
cmp dword [ebp - 0x418], edi
je 0x408c72
push dword [ebp - 0x418]
call fcn.00409396
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00418ef1
leave
ret
xor esi, esi
inc esi
jmp 0x408c5f

Function at 0x408c87
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
push dword [ebp + 0xc]
xor edi, edi
push dword [ebp + 8]
lea ebx, [ebp - 4]
mov dword [ebp - 4], edi
xor esi, esi
mov dword [ebp - 8], edi
call fcn.004091d6
mov dword [ebp + 0xc], eax
cmp eax, edi
jl 0x408d20
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp + 8], eax
cmp eax, edi
jbe 0x408ce9
push edi
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 8]
sub eax, esi
push eax
mov eax, dword [ebp - 4]
add eax, esi
push eax
push dword [0x42a150]
call ebx
test eax, eax
je 0x408d37
add esi, dword [ebp - 8]
cmp esi, dword [ebp + 8]
jb 0x408cc4
cmp dword [ebp + 0x10], edi
je 0x408d20
push edi
lea eax, [ebp - 8]
push eax
push 2
push 0x404e8c
push dword [0x42a150]
call ebx
test eax, eax
jne 0x408d20
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
cmp eax, edi
jle 0x408d20
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0xc], eax
cmp dword [ebp - 4], edi
pop edi
pop esi
pop ebx
je 0x408d30
push dword [ebp - 4]
call fcn.00409396
mov eax, dword [ebp + 0xc]
leave
ret 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc], eax
cmp eax, edi
jle 0x408d51
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], edi
jl 0x408d20
mov dword [ebp + 0xc], 0x80004005
jmp 0x408d20
Function at 0x40965c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x429050]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.0041d8a0
add esp, 0xc
mov edi, 0x104
push edi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x409734
push 0x5c
pop ecx
cmp cx, word [ebp + eax*2 - 0x20e]
je 0x4096e8
lea esi, [ebp - 0x210]
lea edx, [ebp - 0x20c]
call fcn.00409767
test eax, eax
js 0x4096e2
mov ecx, dword [ebp - 0x210]
mov eax, edi
xor edx, edx
sub eax, ecx
push 0x405188
lea ecx, [ebp + ecx*2 - 0x20c]
inc edx
call fcn.00409798
mov esi, eax
test eax, eax
js 0x409755
lea esi, [ebp - 0x210]
lea edx, [ebp - 0x20c]
call fcn.00409767
test eax, eax
js 0x40971b
mov ecx, dword [ebp - 0x210]
push dword [ebp + 8]
mov eax, edi
sub eax, ecx
lea ecx, [ebp + ecx*2 - 0x20c]
mov edx, SysReAllocString
call fcn.00409798
mov esi, eax
test eax, eax
js 0x409755
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebx], eax
test eax, eax
jne 0x409755
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40974e
and esi, 0xffff
or esi, 0x80070000
test esi, esi
js 0x409755
mov esi, 0x80004005
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00418ef1
leave
ret 4

Function at 0x409842
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push ebx
push esi
push edi
push dword [ebp + 8]
lea esi, [ebp - 4]
call fcn.00409e6e
mov ebx, dword [ebp - 4]
mov edi, eax
test edi, edi
js 0x409910
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x409879
test al, 0x10
jne 0x409910
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x409910
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40990e
movzx eax, word [ebx]
xor esi, esi
mov ecx, ebx
test ax, ax
je 0x4098bb
cmp ax, 0x5c
jne 0x4098ac
mov esi, ecx
add ecx, 2
movzx eax, word [ecx]
test ax, ax
jne 0x4098a4
test esi, esi
jne 0x4098c2
mov edi, 0x80070003
jmp 0x409910
push dword [ebp + 0xc]
xor eax, eax
push ebx
mov word [esi], ax
call fcn.00409842
mov edi, eax
push 0x5c
pop eax
mov word [esi], ax
test edi, edi
js 0x409910
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40990e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4098fc
xor edi, edi
inc edi
jmp 0x409910
test eax, eax
jle 0x40990a
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x409910
xor edi, edi
test ebx, ebx
je 0x40991a
push ebx
call fcn.00409396
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x409f8a
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push dword [ebp + 8]
xor ebx, ebx
lea esi, [ebp - 4]
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
call fcn.00409e6e
mov esi, eax
cmp esi, ebx
jl 0x40a075
push edi
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov edi, eax
cmp edi, ebx
jne 0x409ff3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x409fe3
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x40a074
mov esi, 0x80004005
jmp 0x40a074
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x40a009
mov esi, 0x8007000e
jmp 0x40a074
push eax
push edi
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x40a035
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x405188
push dword [ebp + 8]
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
jne 0x40a058
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x40a04f
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x40a06b
mov esi, 0x80004005
jmp 0x40a06b
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
mov dword [edx], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
cmp dword [ebp - 4], ebx
je 0x40a082
push dword [ebp - 4]
call fcn.00409396
mov eax, esi
pop esi
pop ebx
leave
ret 0xc

Function at 0x40a0c9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor esi, esi
xor edi, edi
cmp dword [ebp + 0x10], esi
jbe 0x40a125
and dword [ebp - 4], edi
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x10]
sub eax, esi
push eax
mov eax, dword [ebp + 0xc]
add eax, esi
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a104
add esi, dword [ebp - 4]
cmp esi, dword [ebp + 0x10]
jb 0x40a0d8
jmp 0x40a125
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x40a11e
and edi, 0xffff
or edi, 0x80070000
test edi, edi
js 0x40a125
mov edi, 0x80004005
test ebx, ebx
je 0x40a12b
mov dword [ebx], esi
mov eax, edi
pop edi
pop esi
leave
ret 0xc
Function at 0x40a133
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push ebx
push esi
push edi
push dword [ebp + 8]
lea esi, [ebp - 4]
call fcn.00409e6e
mov ebx, dword [ebp - 4]
mov edi, eax
test edi, edi
js 0x40a19b
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40a19b
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
je 0x40a19b
cmp eax, 3
je 0x40a19b
push 4
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x40a19b
call esi
mov edi, eax
test edi, edi
jle 0x40a194
and edi, 0xffff
or edi, 0x80070000
test edi, edi
js 0x40a19b
mov edi, 0x80004005
test ebx, ebx
je 0x40a1a5
push ebx
call fcn.00409396
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 4