joyce8/EMBER2024-capa huggingface dataset:
Function at 0xa801b0
Capabilities:
Acquire debug privileges

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
push 1
push str.SeBackupPrivilege
push ecx
call fcn.00a80140
mov edx, dword [esp + 0xc]
push 1
push str.SeDebugPrivilege
push edx
call fcn.00a80140
mov eax, dword [esp + 0x18]
push 1
push str.SeRestorePrivilege
push eax
call fcn.00a80140
mov ecx, dword [esp + 0x24]
push 1
push str.SeSecurityPrivilege
push ecx
call fcn.00a80140
mov edx, dword [esp + 0x30]
add esp, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ecx
ret

Function at 0xa80bfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0xa80c50
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0xa9287c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0xa80c43
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0xa80c52
xor eax, eax
pop esi
leave
ret 4

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x401030
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x110c
call fcn.0040e0e0
mov eax, dword [esp + 0x1118]
push ebx
push esi
push edi
push eax
push 0x100
lea ecx, [esp + 0x20]
push ecx
push 0x27da
push 0x423048
call fcn.00403a90
mov esi, dword [sym.imp.USER32.dll_CharToOemA]
add esp, 0x14
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x1c]
push eax
call esi
lea ecx, [esp + 0x18]
push ecx
call fcn.0040e074
mov edi, dword [esp + 0x1120]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 4
push 0
lea edx, [esp + 0x14]
push edx
push 0x1000
lea eax, [esp + 0x124]
push eax
push edi
call ebx
test eax, eax
je 0x401138
lea esp, [esp]
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x1128]
push edx
lea eax, [esp + 0x124]
push eax
push ecx
call sub.RAPI.dll_CeWriteFile
test eax, eax
je 0x4011bd
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x14]
jne 0x4011bd
cmp eax, 0x1000
jb 0x401179
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x10]
push eax
mov word [esp + 0x14], 0x2e
mov word [esp + 0x16], 0
call esi
lea ecx, [esp + 0xc]
push ecx
call fcn.0040e074
add esp, 4
push 0
lea edx, [esp + 0x14]
push edx
push 0x1000
lea eax, [esp + 0x124]
push eax
push edi
call ebx
test eax, eax
jne 0x4010b0
push 0x100
lea ecx, [esp + 0x1c]
push ecx
push 0x27db
push 0x423048
call fcn.00403a90
add esp, 0x10
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x1c]
push eax
call esi
lea ecx, [esp + 0x18]
push ecx
call fcn.0040e074
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110c
ret
push 0x100
lea edx, [esp + 0x1c]
push edx
push 0x27dd
push 0x423048
call fcn.00403a90
add esp, 0x10
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x1c]
push ecx
call esi
lea edx, [esp + 0x18]
push edx
call fcn.0040e074
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x110c
ret
push 0x100
lea eax, [esp + 0x1c]
push eax
push 0x27dc
push 0x423048
call fcn.00403a90
add esp, 0x10
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x1c]
push edx
call esi
lea eax, [esp + 0x18]
push eax
call fcn.0040e074
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x110c
ret

Function at 0x4031c0
Capabilities:
Query or enumerate registry key

Disassembly:
push ecx
push esi
push str.SOFTWARESybaseMobiLinkActiveSync_Synchronization
push 0x80000002
mov dword [esp + 0xc], 0
call fcn.00403150
mov esi, eax
add esp, 8
test esi, esi
jne 0x4031e5
pop esi
pop ecx
ret
mov eax, dword [0x423040]
test eax, eax
push 0
push 0
push 0
push 0
push 0
push 0
je 0x403214
mov ecx, dword [eax]
mov eax, dword [ecx]
lea edx, [esp + 0x1c]
push edx
push 0
push 0
push 0
push 0
push esi
call dword [eax + 0x9c]
jmp 0x403228
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
je 0x403234
mov dword [esp + 4], 0
mov eax, dword [0x423040]
test eax, eax
push esi
je 0x40324c
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 0x40]
mov eax, dword [esp + 4]
pop esi
pop ecx
ret
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 4]
pop esi
pop ecx
ret
Function at 0x4034f0
Capabilities:
Set registry value

Disassembly:
push esi
push str.SOFTWARESybaseMobiLinkActiveSync_Synchronization
push 0x80000002
call fcn.004030c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40350b
pop esi
ret
mov eax, dword [0x423040]
test eax, eax
push 4
je 0x40352e
mov ecx, dword [eax]
mov eax, dword [ecx]
lea edx, [esp + 0xc]
push edx
push 4
push 0
push str.Default_Port
push esi
call dword [eax + 0x48]
jmp 0x403543
lea eax, [esp + 0xc]
push eax
push 4
push 0
push str.Default_Port
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [0x423040]
test eax, eax
push esi
je 0x40355b
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 0x40]
mov eax, 1
pop esi
ret
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
pop esi
ret

Function at 0x403570
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ecx
push ebx
call fcn.004031c0
mov ebx, eax
inc ebx
cmp ebx, 1
jne 0x403584
xor eax, eax
pop ebx
pop ecx
ret
push esi
push edi
push ebx
call fcn.0040e28d
push str.SOFTWARESybaseMobiLinkActiveSync_Synchronization
push 0x80000002
mov edi, eax
call fcn.00403150
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4035ab
pop edi
pop esi
pop ebx
pop ecx
ret
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov eax, dword [0x423040]
test eax, eax
push 0
push 0
push 0
mov dword [esp + 0x1c], ebx
push 0
je 0x4035dc
mov ecx, dword [eax]
mov eax, dword [ecx]
lea edx, [esp + 0x20]
push edx
push edi
push 0
push esi
call dword [eax + 0xa0]
jmp 0x4035e7
lea eax, [esp + 0x20]
push eax
push edi
push 0
push esi
call ebp
test eax, eax
push edi
jne 0x403607
mov eax, dword [0x423040]
test eax, eax
push esi
je 0x4035ff
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 0x4c]
jmp 0x4035b2
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
jmp 0x4035b2
call fcn.0040e11d
mov eax, dword [0x423040]
add esp, 4
test eax, eax
pop ebp
push esi
je 0x403623
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0x40]
jmp 0x403629
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x423040]
test eax, eax
push str.SOFTWARESybaseMobiLinkActiveSync_Synchronization
push 0x80000002
je 0x40364d
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 0x4c]
pop edi
pop esi
mov eax, 1
pop ebx
pop ecx
ret
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
pop esi
mov eax, 1
pop ebx
pop ecx
ret
Function at 0x403660
Capabilities:
Set registry value

Disassembly:
push esi
push str.SOFTWARESybaseMobiLinkActiveSync_Synchronization
push 0x80000002
call fcn.00403150
mov esi, eax
add esp, 8
test esi, esi
jne 0x40367b
pop esi
ret
mov eax, dword [0x423040]
test eax, eax
push 4
je 0x40369e
mov ecx, dword [eax]
mov eax, dword [ecx]
lea edx, [esp + 0xc]
push edx
push 4
push 0
push str.Connection_Timeout
push esi
call dword [eax + 0x48]
jmp 0x4036b3
lea eax, [esp + 0xc]
push eax
push 4
push 0
push str.Connection_Timeout
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [0x423040]
test eax, eax
push esi
je 0x4036cb
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 0x40]
mov eax, 1
pop esi
ret
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
pop esi
ret

Function at 0x4036e0
Capabilities:
Set registry value

Disassembly:
mov eax, dword [esp + 4]
push esi
push str.SOFTWARESybaseMobiLinkActiveSync_Synchronization
push 0x80000002
mov dword [esp + 0x10], eax
call fcn.00403150
mov esi, eax
add esp, 8
test esi, esi
jne 0x403703
pop esi
ret
mov eax, dword [0x423040]
test eax, eax
push 4
je 0x403726
mov ecx, dword [eax]
mov edx, dword [ecx]
lea eax, [esp + 0xc]
push eax
push 4
push 0
push str.Enable_Logging
push esi
call dword [edx + 0x48]
jmp 0x40373b
lea ecx, [esp + 0xc]
push ecx
push 4
push 0
push str.Enable_Logging
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [0x423040]
test eax, eax
push esi
je 0x403753
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 0x40]
mov eax, 1
pop esi
ret
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
pop esi
ret

Function at 0x403760
Capabilities:
Set registry value

Disassembly:
push esi
push str.SOFTWARESybaseMobiLinkActiveSync_Synchronization
push 0x80000002
call fcn.00403150
mov esi, eax
add esp, 8
test esi, esi
jne 0x40377b
pop esi
ret
mov edx, dword [esp + 8]
push ebx
mov ebx, dword [0x423040]
test ebx, ebx
mov eax, edx
push edi
lea edi, [eax + 1]
je 0x4037b0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403790
mov ecx, dword [ebx]
sub eax, edi
mov edi, dword [ecx]
inc eax
push eax
push edx
push 1
push 0
push str.Logfile
push esi
call dword [edi + 0x48]
jmp 0x4037cc
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4037b0
sub eax, edi
inc eax
push eax
push edx
push 1
push 0
push str.Logfile
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [0x423040]
test eax, eax
pop edi
pop ebx
push esi
je 0x4037e6
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0x40]
mov eax, 1
pop esi
ret
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
pop esi
ret
Function at 0x40bd20
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x108
push esi
push edi
mov edi, dword [esp + 0x114]
mov esi, ecx
push eax
mov dword [esi], 0x41ca30
mov dword [esi + 4], 0
push edi
mov dword [edi], 0
call fcn.0040bcc0
add esp, 8
test eax, eax
mov dword [esi + 4], eax
je 0x40bd7e
cmp dword [edi], 0
jne 0x40bd7e
lea ecx, [esp + 8]
push ecx
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40bd7e
lea edx, [esp + 8]
push edx
mov ecx, esi
call fcn.0040af50
pop edi
mov eax, esi
pop esi
add esp, 0x108
ret 8

Function at 0x40be30
Capabilities:
Check os version

Disassembly:
mov eax, dword [0x423970]
test eax, eax
jne 0x40bee0
push esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov ecx, eax
shr ecx, 0x1f
not ecx
and ecx, 1
movzx esi, al
movzx edx, ah
je 0x40be60
shr eax, 0x10
and eax, 0xffff7fff
jmp 0x40be62
xor eax, eax
test ecx, ecx
mov dword [0x423964], esi
mov dword [0x423968], edx
mov dword [0x42396c], eax
mov dword [0x423960], ecx
je 0x40be98
mov dword [0x42395c], 4
mov dword [0x423970], 1
pop esi
mov eax, 0x42395c
ret
cmp esi, 4
jne 0x40becb
test edx, edx
jne 0x40bebc
mov dword [0x42395c], 1
mov dword [0x423970], 1
pop esi
mov eax, 0x42395c
ret
cmp edx, 0xa
mov dword [0x42395c], 2
je 0x40bed5
mov dword [0x42395c], 3
mov dword [0x423970], 1
pop esi
mov eax, 0x42395c
ret
Function at 0x40d750
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x40d76e
mov eax, esi
pop esi
ret
mov byte [esi], 0
xor eax, eax
pop esi
ret

Function at 0x40d780
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, 0x42169c
jmp 0x40d7a0
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 0x40d7b6
mov ax, word [0x41a368]
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d7d0
lea edi, [esp + 0x18]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40d7e0
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 0x40d85a
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 0x40d85a
mov ecx, dword [esp + 0xf4]
cmp dword [esp + 0x14], ecx
je 0x40d876
add ebx, 4
cmp ebx, 0x4216a4
jl 0x40d7a0
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 0x40da10
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
mov eax, str.Unknown_error
je 0x40da20
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 0x40da3d
push esi
call fcn.00410e2f
add esp, 4
push 1
call fcn.00410def
pop esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40fa04
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040f4e6
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x40fa27
test byte [esp + 8], 2
je 0x40fa27
call fcn.0040f4d4
mov dword [eax], 0xd
call fcn.0040f4dd
mov dword [eax], 5
jmp 0x40fa00
xor eax, eax
ret
Function at 0x410338
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 0x4104fe
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4240a0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x4104fe
test cl, 0x48
je 0x41039e
mov al, byte [eax + 5]
cmp al, 0xa
je 0x41039e
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 0x4103f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4103d8
call fcn.0040f4d4
mov dword [eax], 9
call fcn.0040f4dd
mov dword [eax], esi
jmp 0x4103e8
cmp eax, 0x6d
je 0x4104fe
push eax
call fcn.0040f4e6
pop ecx
or eax, 0xffffffff
jmp 0x410500
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 0x4104f9
test edx, edx
je 0x410413
cmp byte [ebx], 0xa
jne 0x410413
or al, 4
jmp 0x410415
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 0x4104f3
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4104e3
cmp al, 0xd
je 0x410449
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4104d5
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x410463
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x41045e
add dword [ebp + 0x10], 2
jmp 0x4104b7
mov dword [ebp + 0x10], eax
jmp 0x4104d1
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 0x41048b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4104d1
cmp dword [ebp - 0xc], 0
je 0x4104d1
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4104ac
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4104b7
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4104d4
cmp ebx, dword [ebp + 0xc]
jne 0x4104bc
cmp byte [ebp - 1], 0xa
jne 0x4104bc
mov byte [ebx], 0xa
jmp 0x4104d4
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00414abd
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4104d5
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x41042d
jmp 0x4104f3
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x4104f3
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x410500
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4105c3
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x422ad0]
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 0x4105ec
xor eax, eax
jmp 0x41075a
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 + 0x4240a0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x41061f
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.0040fb48
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4106f1
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x41072c
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 0x41067a
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x41066b
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 0x41064e
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 0x4106ba
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x4106c3
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x41063f
jmp 0x4106c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x410755
cmp dword [ebp - 8], edi
je 0x41072c
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x41071e
call fcn.0040f4d4
mov dword [eax], 9
call fcn.0040f4dd
mov dword [eax], esi
jmp 0x410727
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 0x410713
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x4106c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x4106c5
push dword [ebp - 8]
call fcn.0040f4e6
pop ecx
or eax, 0xffffffff
jmp 0x410758
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x410741
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x410741
xor eax, eax
jmp 0x410758
call fcn.0040f4d4
mov dword [eax], 0x1c
call fcn.0040f4dd
mov dword [eax], edi
jmp 0x410727
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.004156d3
leave
ret
Function at 0x415b5d
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.0040e0e0
mov eax, dword [0x422ad0]
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.00414abd
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x415c87
push 2
push esi
push dword [ebp + 8]
call fcn.00414abd
add esp, 0xc
cmp eax, ebx
je 0x415c87
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x415c2a
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x100c]
push esi
push eax
call fcn.00416d60
push 0x8000
push dword [ebp + 8]
call fcn.004186a8
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp edi, ebx
mov eax, ebx
jge 0x415be3
mov eax, edi
push eax
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.004105c3
add esp, 0xc
cmp eax, 0xffffffff
je 0x415c03
sub edi, eax
test edi, edi
jg 0x415bdb
jmp 0x415c1b
call fcn.0040f4dd
cmp dword [eax], 5
jne 0x415c18
call fcn.0040f4d4
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.004186a8
pop ecx
pop ecx
jmp 0x415c72
jge 0x415c72
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00414abd
push dword [ebp + 8]
call fcn.00410115
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 0x415c72
call fcn.0040f4d4
mov dword [eax], 0xd
call fcn.0040f4dd
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.00414abd
add esp, 0xc
mov eax, esi
pop edi
jmp 0x415c89
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.004156d3
leave
ret
Function at 0x41671d
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 0x416788
push 0x3d
push dword [ebp + 8]
call fcn.00417381
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x416788
cmp dword [ebp + 8], esi
je 0x416788
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [ebp - 4], eax
mov eax, dword [0x4239e0]
cmp eax, dword [0x4239e4]
jne 0x41676e
mov edi, eax
call fcn.004166bc
mov dword [0x4239e0], eax
cmp eax, ebx
jne 0x4167c7
cmp dword [ebp + 0xc], ebx
je 0x416790
cmp dword [0x4239e8], ebx
je 0x416790
call fcn.00412deb
test eax, eax
je 0x4167c7
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x4168cb
push 4
call fcn.0040e28d
cmp eax, ebx
pop ecx
mov dword [0x4239e0], eax
je 0x416788
mov dword [eax], ebx
cmp dword [0x4239e8], ebx
jne 0x4167c7
push 4
call fcn.0040e28d
cmp eax, ebx
pop ecx
mov dword [0x4239e8], eax
je 0x416788
mov dword [eax], ebx
mov ebx, dword [0x4239e0]
mov edi, esi
mov esi, dword [ebp + 8]
sub edi, esi
push esi
call fcn.0041666f
mov edi, eax
test edi, edi
pop ecx
jl 0x416820
cmp dword [ebx], 0
je 0x416820
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.0040e11d
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x416808
mov eax, dword [ebp + 8]
mov dword [esi], eax
jmp 0x416856
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x4167ff
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.0040f559
test eax, eax
pop ecx
pop ecx
je 0x416856
jmp 0x416851
cmp dword [ebp - 4], 0
jne 0x4168c4
test edi, edi
jge 0x416830
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.0040f559
test eax, eax
pop ecx
pop ecx
je 0x416788
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x4239e0], eax
cmp dword [ebp + 0xc], 0
je 0x4168ad
push dword [ebp + 8]
call fcn.00412d60
inc eax
inc eax
push eax
call fcn.0040e28d
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x4168ad
push dword [ebp + 8]
push esi
call fcn.00415500
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 0x4168a6
or dword [ebp - 8], 0xffffffff
push esi
call fcn.0040e11d
pop ecx
cmp dword [ebp - 4], 0
je 0x4168bc
push dword [ebp + 8]
call fcn.0040e11d
pop ecx
mov eax, dword [ebp - 8]
jmp 0x41678b
push esi
call fcn.0040e11d
pop ecx
xor eax, eax
jmp 0x41678b