joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406923
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
lea eax, [ebp - 4]
mov dword [ebp - 8], 0x800
push eax
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00406284
mov edi, dword [ebp + 0x14]
test eax, eax
jne 0x406995
push esi
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp + 0x18]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
mov word [edi + 0x7fe], ax
pop esi
jne 0x406995
cmp dword [ebp + 0x18], 1
je 0x40699a
cmp dword [ebp + 0x18], 2
je 0x40699a
xor eax, eax
mov word [edi], ax
pop edi
leave
ret 0x14

Function at 0x40699f
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
push eax
and dword [eax + 0x24], 0
mov dword [eax], 0x3c
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
ret 4

Function at 0x406a02
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp - 8], 0x73006e
mov dword [ebp - 4], 0x61
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
pop ecx
xor edx, edx
div ecx
push esi
add word [ebp - 4], dx
lea eax, [ebp - 8]
push 0
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x406a4c
test edi, edi
jne 0x406a0f
mov word [esi], ax
jmp 0x406a4e
mov eax, esi
pop edi
pop esi
leave
ret 8

Function at 0x406b49
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
je 0x406b6b
mov ecx, esi
and ecx, 0xfffffffe
push ecx
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, esi
pop esi
ret 4

Function at 0x406de8
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x7a5914], 0
push esi
jne 0x406e22
xor ecx, ecx
push 8
mov edx, ecx
pop esi
mov eax, edx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
sub esi, 1
jne 0x406df9
mov dword [ecx*4 + 0x7a5910], edx
inc ecx
cmp ecx, 0x100
jl 0x406df4
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x10]
not ecx
test edx, edx
je 0x406e4c
mov esi, dword [esp + 0xc]
movzx eax, byte [esi]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x7a5910]
inc esi
sub edx, 1
jne 0x406e34
not ecx
mov eax, ecx
pop esi
ret 0xc
Function at 0x84e5e0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x2cc000]
push edi
or ebp, 0xffffffff
jmp 0x84e602
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x84e609
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x84e5f8
mov eax, 1
add ebx, ebx
jne 0x84e61b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x84e62c
jne 0x84e64b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x84e64b
dec eax
add ebx, ebx
jne 0x84e638
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x84e610
add ebx, ebx
jne 0x84e647
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x84e69d
xor ecx, ecx
sub eax, 3
jb 0x84e663
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x84e6d2
sar eax, 1
mov ebp, eax
jmp 0x84e66e
add ebx, ebx
jne 0x84e66e
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x84e63c
inc ecx
add ebx, ebx
jne 0x84e67c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x84e63c
add ebx, ebx
jne 0x84e689
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x84e67e
jne 0x84e69a
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x84e67e
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x84e6bc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x84e6ae
jmp 0x84e5fe
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x84e6bc
add edi, ecx
jmp 0x84e5fe
pop esi
mov edi, esi
mov ecx, 0xc3fd
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x84e6da
cmp byte [edi], 0x2d
jne 0x84e6da
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x84e6df
lea edi, [esi + 0x430000]
mov eax, dword [edi]
or eax, eax
je 0x84e74e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x4e6054]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x4e6170]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x84e70c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x4e6178]
or eax, eax
je 0x84e748
mov dword [ebx], eax
add ebx, 4
jmp 0x84e729
call dword [esi + 0x4e6174]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x84e77f
cmp al, 0xef
ja 0x84e772
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x84e754
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x84e761
mov ebp, dword [esi + 0x4e617c]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x21f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x84e7b3
sub esp, 0xffffff80
jmp 0x67037c
Function at 0x401a60
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x40dd90]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x401a7f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x40dd8c], 1
mov byte [0x40dd88], bl
jne 0x401ad9
mov ecx, dword [0x40f16c]
test ecx, ecx
je 0x401ac7
mov esi, dword [0x40f168]
sub esi, 4
cmp esi, ecx
jb 0x401ac7
mov eax, dword [esi]
test eax, eax
je 0x401ac0
call eax
mov ecx, dword [0x40f16c]
sub esi, 4
cmp esi, ecx
jae 0x401ab2
push 0x40b020
push 0x40b014
call fcn.00401b10
add esp, 8
push 0x40b028
push 0x40b024
call fcn.00401b10
add esp, 8
test ebx, ebx
jne 0x401b00
push ebp
mov dword [0x40dd90], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x401cb0
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x401cc9
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401ccb
xor eax, eax
test eax, eax
je 0x401cdc
push eax
call fcn.00403390
add esp, 4
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x402300
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40a030
push 0x405098
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x40dd60], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x40dd5c], ecx
shl ecx, 8
add ecx, edx
mov dword [0x40dd58], ecx
shr eax, 0x10
mov dword [0x40dd54], eax
call fcn.00404f60
test eax, eax
jne 0x40236a
push 0x1c
call fcn.00402420
add esp, 4
mov dword [ebp - 4], 0
call fcn.00404d60
call fcn.00404d50
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40f164], eax
call fcn.00404920
mov dword [0x40dd94], eax
test eax, eax
je 0x40239d
mov eax, dword [0x40f164]
test eax, eax
jne 0x4023a7
push 0xffffffffffffffff
call fcn.00401a20
add esp, 4
call fcn.00404670
call fcn.00404580
call fcn.004019f0
mov eax, dword [0x40dd70]
mov dword [0x40dd74], eax
push eax
mov eax, dword [0x40dd68]
push eax
mov ecx, dword [0x40dd64]
push ecx
call section..text
add esp, 0xc
mov dword [ebp - 0x1c], eax
push eax
call fcn.00401a20
jmp 0x402402
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

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

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4028d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00403390
add esp, 4
or eax, 0xffffffff
ret
test al, 1
je 0x4028f6
test byte [esp + 8], 2
je 0x4028f6
mov dword [0x40dd48], 0xd
mov dword [0x40dd4c], 5
or eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x404920
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x40deb0]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x404962
call edi
mov esi, eax
test esi, esi
je 0x40494c
mov eax, 1
jmp 0x40495d
call ebp
mov ebx, eax
test ebx, ebx
je 0x404a6f
mov eax, 2
mov dword [0x40deb0], eax
cmp eax, 1
jne 0x404a02
test esi, esi
jne 0x40497b
call edi
mov esi, eax
test esi, esi
je 0x404a6f
cmp word [esi], 0
mov eax, esi
je 0x404995
add eax, 2
cmp word [eax], 0
jne 0x404983
add eax, 2
cmp word [eax], 0
jne 0x404983
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x4049f4
push edi
call fcn.00403560
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4049f4
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4049e6
push ebx
call fcn.00402900
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x404a6f
test ebx, ebx
jne 0x404a13
call ebp
mov ebx, eax
test ebx, ebx
je 0x404a6f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x404a2b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404a1b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x404a1b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00403560
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x404a4d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x4051b0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x40b9d8
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x4051d4
add eax, 8
inc ebp
cmp eax, 0x40ba68
jb 0x4051c5
cmp ecx, dword [ebp*8 + 0x40b9d8]
jne 0x40537b
mov eax, dword [0x40dd9c]
cmp eax, 1
je 0x40533d
test eax, eax
jne 0x405200
cmp dword [0x40b494], 1
je 0x40533d
cmp ecx, 0xfc
je 0x40537b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40523b
mov ecx, 5
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x405284
lea edi, [esp + 0xb4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 3
mov ebx, ecx
lea ecx, [esp + 0xb8]
sub ecx, 0x3b
push 0x40a3b0
add ebx, ecx
push ebx
call fcn.00407960
add esp, 0xc
mov ecx, 6
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
push 0x12010
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40a390
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Microsoft_Visual_C_Runtime_Library
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp*8 + 0x40b9dc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004078d0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x40f060]
test eax, eax
je 0x40534e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x405358
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x40b9dc]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
Function at 0x4064d0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x40f160]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x40667d
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x40f060]
lea edi, [ecx*4 + 0x40f060]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x40667d
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40653e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x40654f
push 2
push ebp
push eax
call fcn.00403040
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x4066ae
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x4065f9
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x4065aa
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x406597
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x40657a
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40669f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x4065f5
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x406576
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40666e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x406642
cmp eax, 5
jne 0x40662b
mov dword [0x40dd4c], eax
mov dword [0x40dd48], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00403390
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x406662
cmp byte [ebp], 0x1a
jne 0x406662
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x40dd48], 0x1c
jmp 0x406687
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x40dd48], 9
pop edi
pop esi
pop ebp
mov dword [0x40dd4c], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x4065f5
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x438]
push ecx
push ebx
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4066df
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x4065f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x4065f9
Function at 0x407170
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40732e
push 0x3d
push edi
call fcn.00405430
mov esi, eax
add esp, 8
test esi, esi
je 0x40732e
cmp edi, esi
je 0x40732e
mov dl, byte [esi + 1]
mov ecx, dword [0x40dd74]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x40dd70]
cmp eax, ecx
jne 0x4071c7
push eax
call fcn.00407400
add esp, 4
mov dword [0x40dd70], eax
test eax, eax
jne 0x407242
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4071ee
mov eax, dword [0x40dd78]
test eax, eax
je 0x4071ee
call fcn.00403650
test eax, eax
je 0x40723d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x4071fa
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.00403560
add esp, 4
mov dword [0x40dd70], eax
test eax, eax
je 0x40732e
mov dword [eax], 0
mov eax, dword [0x40dd78]
test eax, eax
jne 0x40723d
push 4
call fcn.00403560
add esp, 4
mov dword [0x40dd78], eax
test eax, eax
je 0x40732e
mov dword [eax], 0
mov eax, dword [0x40dd70]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.00407380
mov esi, eax
add esp, 8
test esi, esi
jl 0x40733f
cmp dword [ebx], 0
je 0x40733f
test ebp, ebp
je 0x407337
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.00402900
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x407299
mov eax, edi
mov edx, dword [eax + 4]
add eax, 4
mov dword [edi], edx
inc esi
mov ecx, dword [eax]
mov edi, eax
test ecx, ecx
jne 0x407288
lea eax, [esi*4]
push eax
push ebx
call fcn.00407f80
add esp, 8
test eax, eax
je 0x4072b3
mov dword [0x40dd70], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x407326
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.00403560
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x407326
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, dword [esp + 0x10]
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
neg ebp
rep movsb byte es:[edi], byte [esi]
sbb ebp, ebp
mov byte [ebx + eax], 0
lea eax, [ebx + eax + 1]
not ebp
and ebp, eax
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push ebx
call fcn.00402900
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
mov dword [ebx + esi*4], edi
jmp 0x4072b7
test ebp, ebp
jne 0x407326
test esi, esi
jge 0x407349
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.00407f80
add esp, 8
test eax, eax
je 0x40732e
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x40dd70], eax
jmp 0x4072b7
Function at 0x408170
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.00408380
mov eax, dword [0x40f160]
push ebx
mov ebx, dword [esp + 0x100c]
push ebp
xor ebp, ebp
push esi
cmp ebx, eax
push edi
jae 0x4082d2
mov eax, ebx
mov ecx, ebx
sar eax, 5
and ecx, 0x1f
mov edx, dword [eax*4 + 0x40f060]
test byte [edx + ecx*8 + 4], 1
je 0x4082d2
push 1
push ebp
push ebx
call fcn.00403040
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x4082dc
push 2
push ebp
push ebx
call fcn.00403040
add esp, 0xc
cmp eax, 0xffffffff
je 0x4082dc
mov ecx, dword [esp + 0x101c]
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x408278
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x14]
push 0x8000
rep stosd dword es:[edi], eax
push ebx
call fcn.00408300
add esp, 8
mov edi, eax
cmp esi, 0x1000
mov eax, 0x1000
jge 0x40821f
mov eax, esi
push eax
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.004064d0
add esp, 0xc
cmp eax, 0xffffffff
je 0x40823b
sub esi, eax
test esi, esi
jle 0x408251
jmp 0x408210
cmp dword [0x40dd4c], 5
jne 0x40824e
mov dword [0x40dd48], 0xd
or ebp, 0xffffffff
push edi
push ebx
call fcn.00408300
mov edi, dword [esp + 0x18]
add esp, 8
push 0
push edi
push ebx
call fcn.00403040
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
jge 0x4082b9
push 0
push ecx
push ebx
call fcn.00403040
add esp, 0xc
push ebx
call fcn.00406420
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ebp, eax
neg ebp
sbb ebp, ebp
neg ebp
dec ebp
cmp ebp, 0xffffffff
jne 0x4082b9
mov dword [0x40dd48], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x40dd4c], eax
push 0
push edi
push ebx
call fcn.00403040
add esp, 0xc
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1004
ret
mov dword [0x40dd48], 9
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1004
ret
Function at 0x4084c0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
mov ebx, dword [esp + 0x114]
push esi
push edi
test ebx, ebx
je 0x408531
push ebx
call fcn.004085f0
add esp, 4
test eax, eax
jne 0x4084ff
mov dword [0x40dd4c], 0xf
mov dword [0x40dd48], 0xd
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x14]
add bl, 0x40
push 0x104
push edx
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1d], 0x3a
mov byte [esp + 0x1e], 0x2e
mov byte [esp + 0x1f], 0
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x408541
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x4085d7
inc eax
cmp eax, 0x104
ja 0x4085d7
mov edx, dword [esp + 0x120]
mov ecx, dword [esp + 0x124]
test edx, edx
jne 0x408590
cmp eax, ecx
jg 0x40856d
mov eax, ecx
push eax
call fcn.00403560
mov edx, eax
add esp, 4
test edx, edx
jne 0x4085aa
mov dword [0x40dd48], 0xc
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, ecx
jle 0x4085aa
mov dword [0x40dd48], 0x22
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
mov eax, edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x10c
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x10c
ret

Function at 0x4085f0
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x4085fe
mov eax, 1
ret
add al, 0x40
mov byte [esp + 5], 0x3a
mov byte [esp + 4], al
lea eax, [esp + 4]
push eax
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x40862d
cmp eax, 1
je 0x40862d
mov eax, 1
ret
xor eax, eax
ret