joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401de0
Capabilities:
Query environment variable
Set environment variable

Disassembly:
sub esp, 0x21c
push esi
mov esi, ecx
push 0
lea ecx, [esp + 8]
call fcn.00406ff0
push 0x414378
lea ecx, [esp + 0x10]
call fcn.00407920
mov eax, dword [esi + 0x34]
test eax, eax
mov byte [esp + 0x1c], 0
je 0x401e57
push 0x200
lea eax, [esp + 0x20]
push eax
push str.CLASSPATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x18]
call fcn.00407920
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x10]
call fcn.00407270
lea ecx, [esp + 0x14]
call fcn.00406b50
lea eax, [esp + 0xc]
push 0
push eax
call fcn.00401c40
add esp, 8
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx]
call dword [edx + 4]
push eax
lea ecx, [esp + 8]
call fcn.004071d0
lea eax, [esp + 4]
push 0
push eax
call fcn.00401c40
add esp, 8
lea ecx, [esp + 0xc]
call fcn.00406fb0
push eax
lea ecx, [esp + 8]
call fcn.00406fb0
push eax
push str._1__2
lea ecx, [esi + 0x24]
call fcn.00406e90
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x414378
push str.CLASSPATH
call esi
push 0x414378
push 0x41439c
call esi
lea ecx, [esp + 0xc]
call fcn.00406b50
lea ecx, [esp + 4]
call fcn.00406b50
mov ax, 1
pop esi
add esp, 0x21c
ret

Function at 0x402080
Capabilities:
Query environment variable
Set environment variable

Disassembly:
sub esp, 0x14
push esi
push edi
mov edi, ecx
mov ecx, dword [edi + 0x20]
mov eax, dword [ecx]
lea esi, [edi + 0x2c]
push esi
mov dword [esp + 0xc], edi
call dword [eax]
test eax, eax
je 0x4020b7
mov ecx, esi
call fcn.00406eb0
test eax, eax
jne 0x4020c1
mov ecx, edi
call fcn.00401ee0
mov ecx, esi
call fcn.00406eb0
test eax, eax
jne 0x4020c1
pop edi
or ax, 0xffff
pop esi
add esp, 0x14
ret
mov al, byte [0x419fe0]
test al, al
jne 0x4021a1
push ebx
push ebp
push 0
lea ecx, [esp + 0x18]
mov byte [0x419fe0], 1
call fcn.00406ff0
push 0x414418
lea ecx, [esp + 0x20]
push esi
push ecx
call fcn.00407360
add esp, 0xc
push eax
lea ecx, [esp + 0x18]
call fcn.00407270
lea ecx, [esp + 0x1c]
call fcn.00406b50
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0
push 0
push str.PATH
call ebp
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.00406eb0
lea ebx, [esi + eax + 1]
push ebx
call fcn.00407fc0
add esp, 4
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.00406fb0
mov edx, esi
mov edi, edi
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x402140
mov edi, esi
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402150
mov dx, word [0x414274]
mov eax, esi
mov word [edi], dx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402167
sub eax, edx
sub ebx, eax
push ebx
add eax, esi
push eax
push str.PATH
call ebp
push esi
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push esi
call fcn.00407ff0
add esp, 4
lea ecx, [esp + 0x14]
call fcn.00406b50
mov edi, dword [esp + 0x10]
pop ebp
pop ebx
mov ecx, edi
call fcn.00401de0
pop edi
pop esi
add esp, 0x14
ret
Function at 0x404360
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xd0
push ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push esi
push edi
mov ebx, 0x4182b8
jmp 0x404380
mov ecx, 0xa
mov esi, str.SoftwareSybaseAdaptive_Server_Anywhere
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404396
mov ax, word [0x4152f4]
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4043b0
lea edi, [esp + 0x18]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4043c0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebx]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x24]
push edx
push eax
call ebp
test eax, eax
jne 0x40443a
mov edx, dword [esp + 0xec]
lea ecx, [esp + 0xf0]
push ecx
mov ecx, dword [esp + 0xec]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x40443a
mov ecx, dword [esp + 0xf4]
cmp dword [esp + 0x14], ecx
je 0x404456
add ebx, 4
cmp ebx, str.none
jl 0x404380
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd0
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd0
ret

Function at 0x406af0
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
mov eax, str.Unknown_error
je 0x406b00
mov eax, esi
push 0
push str.SQLAnywhere_Fatal_Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
test esi, esi
je 0x406b1d
push esi
call fcn.0040a97f
add esp, 4
push 1
call fcn.0040a93f
pop esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

Function at 0x407280
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41310f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebp
push esi
push edi
mov dword [esp + 0xc], 0
push 0x40
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0x40
call fcn.00407fc0
mov ecx, dword [0x4190dc]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 4
push ecx
push eax
mov dword [esp + 0x18], eax
call edi
mov edx, dword [esp + 0x2c]
mov eax, dword [edx]
push eax
lea ecx, [esp + 0x14]
call fcn.00406b60
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
push edx
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], 1
call fcn.00406b60
mov esi, dword [esp + 0x28]
push 0x40
mov ebp, eax
mov dword [esi], 0
mov dword [esi + 4], 0x40
call fcn.00407fc0
mov ecx, dword [0x4190dc]
add esp, 4
push ecx
push eax
mov dword [esi], eax
call edi
mov edx, dword [ebp]
push edx
mov ecx, esi
call fcn.00406b60
mov eax, dword [esp + 0x10]
push eax
mov dword [esp + 0x10], 1
mov byte [esp + 0x24], 0
call fcn.00407ff0
mov ecx, dword [esp + 0x1c]
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0x407360
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41310f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebp
push esi
push edi
mov dword [esp + 0xc], 0
push 0x40
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0x40
call fcn.00407fc0
mov ecx, dword [0x4190dc]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 4
push ecx
push eax
mov dword [esp + 0x18], eax
call edi
mov edx, dword [esp + 0x2c]
mov eax, dword [edx]
push eax
lea ecx, [esp + 0x14]
call fcn.00406b60
mov ecx, dword [esp + 0x30]
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], 1
call fcn.00406b60
mov esi, dword [esp + 0x28]
push 0x40
mov ebp, eax
mov dword [esi], 0
mov dword [esi + 4], 0x40
call fcn.00407fc0
mov edx, dword [0x4190dc]
add esp, 4
push edx
push eax
mov dword [esi], eax
call edi
mov eax, dword [ebp]
push eax
mov ecx, esi
call fcn.00406b60
mov ecx, dword [esp + 0x10]
push ecx
mov dword [esp + 0x10], 1
mov byte [esp + 0x24], 0
call fcn.00407ff0
mov ecx, dword [esp + 0x1c]
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x18
ret

Function at 0x407a20
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4131bf
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push esi
mov esi, ecx
push 0
lea ecx, [esp + 0x10]
mov dword [esp + 0xc], 0
call fcn.00406ff0
mov ecx, dword [esi]
push 0
push 0
push 0
lea eax, [esp + 0x10]
push eax
push ecx
mov dword [esp + 0x30], 1
call fcn.0040b1a0
add esp, 0x14
lea edx, [esp + 4]
push edx
lea ecx, [esp + 0x10]
call fcn.004071d0
mov esi, dword [esp + 0x24]
lea eax, [esp + 0xc]
push eax
mov ecx, esi
call fcn.00407030
lea ecx, [esp + 0xc]
mov dword [esp + 8], 1
mov byte [esp + 0x1c], 0
call fcn.00406b50
mov ecx, dword [esp + 0x14]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x1c
ret 4

Function at 0x407b70
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x413237
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push esi
lea eax, [esp + 0x18]
push eax
mov esi, ecx
mov dword [esp + 8], 0
call fcn.00407a20
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
mov dword [esp + 0x34], 1
call fcn.00407ac0
push 0
lea ecx, [esp + 0xc]
mov byte [esp + 0x34], 2
call fcn.00406ff0
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x3c], 3
call fcn.00407280
add esp, 0xc
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x34], 4
call fcn.00407270
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], 3
call fcn.00406b50
mov esi, dword [esp + 0x38]
lea edx, [esp + 8]
push edx
mov ecx, esi
call fcn.00407030
lea ecx, [esp + 8]
mov dword [esp + 4], 1
mov byte [esp + 0x30], 2
call fcn.00406b50
lea ecx, [esp + 0x10]
mov byte [esp + 0x30], 1
call fcn.00406b50
lea ecx, [esp + 0x18]
mov byte [esp + 0x30], 0
call fcn.00406b50
mov ecx, dword [esp + 0x28]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x30
ret 4
Function at 0x407da0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x210
mov eax, dword [ecx + 4]
test eax, eax
mov dword [esp + 8], ecx
jne 0x407dbd
or eax, 0xffffffff
add esp, 0x210
ret 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x230]
test edi, edi
mov ecx, 0xff
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], ecx
jne 0x407ddd
lea edi, [esp + 0x1c]
mov ebp, dword [esp + 0x224]
push edi
lea ecx, [esp + 0x124]
push ecx
lea edx, [esp + 0x1c]
push edx
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov esi, eax
cmp esi, 0xea
jne 0x407e5e
mov eax, dword [edi]
inc eax
push eax
call fcn.00407fc0
add esp, 4
push edi
mov ebx, eax
push ebx
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x24]
push 0
lea edx, [esp + 0x20]
push edx
mov edx, dword [ecx + 4]
lea eax, [esp + 0x34]
push eax
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov esi, eax
test esi, esi
jne 0x407e87
mov ecx, dword [esp + 0x22c]
push ebx
call fcn.004071d0
push ebx
call fcn.00407ff0
add esp, 4
jmp 0x407e76
test esi, esi
jne 0x407e76
mov ecx, dword [esp + 0x22c]
lea eax, [esp + 0x120]
push eax
call fcn.004071d0
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x22c]
call fcn.004071d0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret 0x10

Function at 0x407ea0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41329f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
push edi
mov edi, ecx
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0xc], 0
call fcn.00406ff0
push 0
lea ecx, [esp + 0x10]
mov dword [esp + 0x30], 1
call fcn.00406ff0
push 0
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], 2
call fcn.00406ff0
xor esi, esi
push esi
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push esi
mov ecx, edi
mov byte [esp + 0x3c], 3
call fcn.00407da0
test eax, eax
jne 0x407f4c
push ebp
mov ebp, dword [esp + 0x3c]
push ebp
lea ecx, [esp + 0x1c]
call fcn.00406fc0
test eax, eax
jne 0x407f3d
push eax
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x20]
push eax
inc esi
push esi
mov ecx, edi
call fcn.00407da0
test eax, eax
je 0x407f15
jmp 0x407f4b
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x24]
call fcn.00407270
pop ebp
mov esi, dword [esp + 0x34]
lea edx, [esp + 0x1c]
push edx
mov ecx, esi
call fcn.00407030
lea ecx, [esp + 0x1c]
mov dword [esp + 8], 1
mov byte [esp + 0x2c], 2
call fcn.00406b50
lea ecx, [esp + 0xc]
mov byte [esp + 0x2c], 1
call fcn.00406b50
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 0
call fcn.00406b50
mov ecx, dword [esp + 0x24]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x28
ret 8
Function at 0x409004
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x409024
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00409c74
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x409047
test byte [esp + 8], 2
je 0x409047
call fcn.00409c62
mov dword [eax], 0xd
call fcn.00409c6b
mov dword [eax], 5
jmp 0x409020
xor eax, eax
ret
Function at 0x409845
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x409a0b
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x41af60]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x409a0b
test cl, 0x48
je 0x4098ab
mov al, byte [eax + 5]
cmp al, 0xa
je 0x4098ab
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4098fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4098e5
call fcn.00409c62
mov dword [eax], 9
call fcn.00409c6b
mov dword [eax], esi
jmp 0x4098f5
cmp eax, 0x6d
je 0x409a0b
push eax
call fcn.00409c74
pop ecx
or eax, 0xffffffff
jmp 0x409a0d
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x409a06
test edx, edx
je 0x409920
cmp byte [ebx], 0xa
jne 0x409920
or al, 4
jmp 0x409922
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x409a00
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4099f0
cmp al, 0xd
je 0x409956
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4099e2
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x409970
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40996b
add dword [ebp + 0x10], 2
jmp 0x4099c4
mov dword [ebp + 0x10], eax
jmp 0x4099de
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x409998
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4099de
cmp dword [ebp - 0xc], 0
je 0x4099de
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4099b9
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4099c4
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4099e1
cmp ebx, dword [ebp + 0xc]
jne 0x4099c9
cmp byte [ebp - 1], 0xa
jne 0x4099c9
mov byte [ebx], 0xa
jmp 0x4099e1
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040ec30
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4099e2
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40993a
jmp 0x409a00
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x409a00
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x409a0d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x409a12
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x4197e0]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x409a3b
xor eax, eax
jmp 0x409ba9
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x41af60]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x409a6e
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.00409168
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x409b40
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x409b7b
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x409ac9
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x409aba
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x409a9d
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409b09
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x409b12
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x409a8e
jmp 0x409b14
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x409ba4
cmp dword [ebp - 8], edi
je 0x409b7b
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x409b6d
call fcn.00409c62
mov dword [eax], 9
call fcn.00409c6b
mov dword [eax], esi
jmp 0x409b76
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409b62
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x409b14
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x409b14
push dword [ebp - 8]
call fcn.00409c74
pop ecx
or eax, 0xffffffff
jmp 0x409ba7
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x409b90
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x409b90
xor eax, eax
jmp 0x409ba7
call fcn.00409c62
mov dword [eax], 0x1c
call fcn.00409c6b
mov dword [eax], edi
jmp 0x409b76
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.0040dd39
leave
ret
Function at 0x40eaf5
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.0040b370
mov eax, dword [0x4197e0]
xor eax, dword [ebp + 4]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.0040ec30
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x40ec1f
push 2
push esi
push dword [ebp + 8]
call fcn.0040ec30
add esp, 0xc
cmp eax, ebx
je 0x40ec1f
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40ebc2
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x100c]
push esi
push eax
call fcn.004110a0
push 0x8000
push dword [ebp + 8]
call fcn.00411a38
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp edi, ebx
mov eax, ebx
jge 0x40eb7b
mov eax, edi
push eax
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.00409a12
add esp, 0xc
cmp eax, 0xffffffff
je 0x40eb9b
sub edi, eax
test edi, edi
jg 0x40eb73
jmp 0x40ebb3
call fcn.00409c6b
cmp dword [eax], 5
jne 0x40ebb0
call fcn.00409c62
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.00411a38
pop ecx
pop ecx
jmp 0x40ec0a
jge 0x40ec0a
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040ec30
push dword [ebp + 8]
call fcn.00409622
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x40ec0a
call fcn.00409c62
mov dword [eax], 0xd
call fcn.00409c6b
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.0040ec30
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40ec21
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.0040dd39
leave
ret

Function at 0x410153
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x4197e0]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
mov dword [ebp - 4], eax
je 0x4101ce
push ebx
call fcn.0041011c
test eax, eax
pop ecx
jne 0x4101a0
call fcn.00409c6b
mov dword [eax], 0xf
call fcn.00409c62
mov dword [eax], 0xd
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop ebx
call fcn.0040dd39
leave
ret
and byte [ebp + 0xb], 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10c]
push eax
push 0x104
lea eax, [ebp + 8]
add bl, 0x40
push eax
mov byte [ebp + 8], bl
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x2e
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x4101e0
lea eax, [ebp - 0x10c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x410190
inc eax
cmp eax, 0x104
ja 0x410190
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x410218
cmp eax, dword [ebp + 0x10]
jg 0x4101fb
mov eax, dword [ebp + 0x10]
push eax
call fcn.00408622
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x41022d
call fcn.00409c62
mov dword [eax], 0xc
jmp 0x410190
cmp eax, dword [ebp + 0x10]
jle 0x41022d
call fcn.00409c62
mov dword [eax], 0x22
jmp 0x410190
lea eax, [ebp - 0x10c]
push eax
push ecx
call fcn.0040dc10
pop ecx
pop ecx
jmp 0x410192
Function at 0x410c05
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 8], ebx
je 0x410c70
push 0x3d
push dword [ebp + 8]
call fcn.00412252
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x410c70
cmp dword [ebp + 8], esi
je 0x410c70
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [ebp - 4], eax
mov eax, dword [0x41a8a0]
cmp eax, dword [0x41a8a4]
jne 0x410c56
mov edi, eax
call fcn.00410ba4
mov dword [0x41a8a0], eax
cmp eax, ebx
jne 0x410caf
cmp dword [ebp + 0xc], ebx
je 0x410c78
cmp dword [0x41a8a8], ebx
je 0x410c78
call fcn.0040d03b
test eax, eax
je 0x410caf
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x410db3
push 4
call fcn.00408622
cmp eax, ebx
pop ecx
mov dword [0x41a8a0], eax
je 0x410c70
mov dword [eax], ebx
cmp dword [0x41a8a8], ebx
jne 0x410caf
push 4
call fcn.00408622
cmp eax, ebx
pop ecx
mov dword [0x41a8a8], eax
je 0x410c70
mov dword [eax], ebx
mov ebx, dword [0x41a8a0]
mov edi, esi
mov esi, dword [ebp + 8]
sub edi, esi
push esi
call fcn.00410b57
mov edi, eax
test edi, edi
pop ecx
jl 0x410d08
cmp dword [ebx], 0
je 0x410d08
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.0040850a
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x410cf0
mov eax, dword [ebp + 8]
mov dword [esi], eax
jmp 0x410d3e
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x410ce7
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.0040a524
test eax, eax
pop ecx
pop ecx
je 0x410d3e
jmp 0x410d39
cmp dword [ebp - 4], 0
jne 0x410dac
test edi, edi
jge 0x410d18
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.0040a524
test eax, eax
pop ecx
pop ecx
je 0x410c70
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x41a8a0], eax
cmp dword [ebp + 0xc], 0
je 0x410d95
push dword [ebp + 8]
call fcn.0040cfb0
inc eax
inc eax
push eax
call fcn.00408622
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x410d95
push dword [ebp + 8]
push esi
call fcn.0040dc10
mov eax, esi
sub eax, dword [ebp + 8]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
and byte [eax], 0
mov ecx, dword [ebp - 4]
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x410d8e
or dword [ebp - 8], 0xffffffff
push esi
call fcn.0040850a
pop ecx
cmp dword [ebp - 4], 0
je 0x410da4
push dword [ebp + 8]
call fcn.0040850a
pop ecx
mov eax, dword [ebp - 8]
jmp 0x410c73
push esi
call fcn.0040850a
pop ecx
xor eax, eax
jmp 0x410c73