joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403f80
Capabilities:
Timestomp file

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x24]
push esi
push 0
push pe_nt_image_headers32
push 3
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x404075
mov eax, dword [esp + 0x2c]
xor cx, cx
mov cl, al
xor dx, dx
dec ecx
mov dl, ah
movzx ax, byte [esp + 0x2e]
mov word [esp + 0x18], cx
mov word [esp + 0x16], ax
movzx cx, byte [esp + 0x2f]
add ecx, 0x76c
mov word [esp + 0x1a], dx
mov word [esp + 0x14], cx
mov ecx, dword [esp + 0x30]
xor ax, ax
xor dx, dx
mov al, cl
mov dl, ch
movzx cx, byte [esp + 0x32]
lea eax, [eax + eax*4]
mov word [esp + 0x20], dx
movzx dx, byte [esp + 0x33]
shl eax, 1
cmp ax, 0x3e8
mov word [esp + 0x22], ax
mov word [esp + 0x1e], cx
mov word [esp + 0x1c], dx
jb 0x404021
mov word [esp + 0x22], 0x3e7
lea eax, [esp + 4]
lea ecx, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x40406e
lea edx, [esp + 0xc]
lea eax, [esp + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x40406e
push 0
lea ecx, [esp + 0x10]
push 0
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
push esi
je 0x40406f
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop esi
add esp, 0x20
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
call sym.testlock.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
pop esi
add esp, 0x20
ret

Function at 0x404090
Capabilities:
Set current directory

Disassembly:
sub esp, 0x104
push esi
mov esi, dword [esp + 0x10c]
test esi, esi
jne 0x4040af
mov eax, 0xffffd846
pop esi
add esp, 0x104
ret
push esi
call sym.testlock.exe_public:_static_int___cdecl_MSSTR::Len_char_const__
add esp, 4
cmp eax, 0x103
jle 0x4040cc
mov eax, 0xffffd845
pop esi
add esp, 0x104
ret
lea eax, [esp + 4]
push esi
push eax
call sym.testlock.exe_public:_static_int___cdecl_MSSTR::Copy_char___char_const__
add esp, 8
lea ecx, [esp + 4]
push ecx
call sym.testlock.exe_public:_static_void___cdecl_MSFS::StripSlash_char__
add esp, 4
lea edx, [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp eax, 1
jne 0x404101
xor eax, eax
pop esi
add esp, 0x104
ret
push 0xffffffffffffffff
call sym.testlock.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
pop esi
add esp, 0x104
ret
Function at 0x404120
Capabilities:
Timestomp file

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x24]
push esi
push 0
push pe_nt_image_headers32
push 3
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x404215
mov eax, dword [esp + 0x2c]
xor cx, cx
mov cl, al
xor dx, dx
dec ecx
mov dl, ah
movzx ax, byte [esp + 0x2e]
mov word [esp + 0x18], cx
mov word [esp + 0x16], ax
movzx cx, byte [esp + 0x2f]
add ecx, 0x76c
mov word [esp + 0x1a], dx
mov word [esp + 0x14], cx
mov ecx, dword [esp + 0x30]
xor ax, ax
xor dx, dx
mov al, cl
mov dl, ch
movzx cx, byte [esp + 0x32]
lea eax, [eax + eax*4]
mov word [esp + 0x20], dx
movzx dx, byte [esp + 0x33]
shl eax, 1
cmp ax, 0x3e8
mov word [esp + 0x22], ax
mov word [esp + 0x1e], cx
mov word [esp + 0x1c], dx
jb 0x4041c1
mov word [esp + 0x22], 0x3e7
lea eax, [esp + 4]
lea ecx, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x40420e
lea edx, [esp + 0xc]
lea eax, [esp + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x40420e
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
push esi
je 0x40420f
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop esi
add esp, 0x20
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xffffffffffffffff
call sym.testlock.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
pop esi
add esp, 0x20
ret

Function at 0x404710
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jne 0x40471e
mov eax, 0xffffd846
ret
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x404731
xor eax, eax
ret
push 0xffffffffffffffff
call sym.testlock.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
ret

Function at 0x405310
Capabilities:
Get disk size

Disassembly:
sub esp, 0xc
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
lea edx, [esp]
push eax
push ecx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0xc]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
jne 0x40533d
or eax, 0xffffffff
add esp, 0xc
ret
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
imul edx, dword [esp]
imul edx, dword [esp + 4]
mov dword [eax], edx
xor eax, eax
add esp, 0xc
ret
Function at 0x405360
Capabilities:
Get disk size

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x405374
or eax, 0xffffffff
pop esi
add esp, 0xc
ret
mov al, byte [0x41981c]
push edi
test al, al
jne 0x40539c
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.GetDiskFreeSpaceExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x419818], eax
jmp 0x4053a1
mov eax, dword [0x419818]
test eax, eax
je 0x4053c3
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0xc]
push 0
push ecx
push esi
push edx
call eax
mov edi, eax
neg eax
sbb eax, eax
pop edi
neg eax
dec eax
pop esi
add esp, 0xc
ret
lea eax, [esp + 0xc]
lea ecx, [esp + 8]
push eax
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x20]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
mov edi, eax
test edi, edi
je 0x405403
mov eax, dword [esp + 0x18]
mul dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0xc]
push eax
push 0
push edx
call fcn.00409850
mov dword [esi], eax
mov dword [esi + 4], edx
mov eax, edi
pop edi
neg eax
sbb eax, eax
pop esi
neg eax
dec eax
add esp, 0xc
ret
Function at 0x405ad0
Capabilities:
Enumerate network shares

Disassembly:
sub esp, 0x714
lea eax, [esp + 4]
push ebx
push esi
push edi
push eax
push 0
mov ebx, 1
push 0
push ebx
push ebx
call sub.MPR.dll_WNetOpenEnumA
test eax, eax
je 0x405b01
mov eax, 0xffff8001
pop edi
pop esi
pop ebx
add esp, 0x714
ret
mov esi, dword [esp + 0x724]
lea ecx, [esp + 0x11c]
lea edx, [esp + 0x21c]
push ecx
push edx
push 0
push esi
call sym.testlock.exe_public:_static_int___cdecl_MSFS::ParsePath_char_const___char___char___char__
add esp, 0x10
lea eax, [esp + 0x14]
lea ecx, [esp + 0x320]
lea edx, [esp + 0xc]
push eax
mov eax, dword [esp + 0x14]
push ecx
mov edi, 0x400
push edx
push eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], edi
call sub.MPR.dll_WNetEnumResourceA
test eax, eax
jne 0x405b8b
mov eax, dword [esp + 0x330]
test eax, eax
je 0x405b63
mov cl, byte [eax]
mov al, byte [esi]
cmp cl, al
je 0x405bb2
lea edx, [esp + 0x14]
lea eax, [esp + 0x320]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
push ecx
push edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], edi
call sub.MPR.dll_WNetEnumResourceA
test eax, eax
je 0x405b50
mov edx, dword [esp + 0x10]
push edx
call sub.MPR.dll_WNetCloseEnum
mov eax, dword [esp + 0x728]
push esi
push eax
call sym.testlock.exe_public:_static_int___cdecl_MSSTR::Copy_char___char_const__
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x714
ret
mov eax, dword [esp + 0x334]
lea ecx, [esp + 0x21c]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
call sym.testlock.exe_public:_static_int___cdecl_MSFS::CompletePath_char___char_const___char_const__
add esp, 0xc
test eax, eax
jl 0x405ba8
lea eax, [esp + 0x11c]
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
call sym.testlock.exe_public:_static_int___cdecl_MSFS::AppendPath_char___char_const___char_const__
add esp, 0xc
test eax, eax
jl 0x405ba8
mov ecx, dword [esp + 0x728]
lea eax, [esp + 0x18]
push eax
push ecx
call sym.testlock.exe_public:_static_int___cdecl_MSSTR::Copy_char___char_const__
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x714
ret
Function at 0x405ff0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x158
mov eax, dword [esp + 0x160]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x16c]
push eax
push edi
lea ecx, [esp + 0x6c]
xor esi, esi
push str._s__s
push ecx
mov dword [esp + 0x30], 0x44
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
mov word [esp + 0x60], si
mov word [esp + 0x62], si
mov dword [esp + 0x64], esi
call fcn.00408260
mov ebx, dword [esp + 0x184]
add esp, 0x10
mov ecx, ebx
lea edx, [esp + 0x10]
neg ecx
lea eax, [esp + 0x20]
push edx
sbb ecx, ecx
push eax
push esi
and ecx, 0x10
push esi
push ecx
push esi
push esi
lea edx, [esp + 0x80]
push esi
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, eax
mov eax, dword [esp + 0x14]
push eax
call ebp
cmp edi, esi
jne 0x4060b7
push 0xffffffffffffffff
call sym.testlock.exe_public:_static_int___cdecl_MSFS::MapERS_Errno_int_
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret
cmp ebx, esi
jne 0x4060c8
mov ecx, dword [esp + 0x10]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esp + 0x10]
push edx
call ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x158
ret

Function at 0x406120
Capabilities:
Get hostname

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push esi
mov esi, dword [esp + 0x24]
mov ecx, esi
push edi
mov edx, ecx
xor eax, eax
mov edi, ebx
mov dword [esp + 0xc], 0x10
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0xc]
lea ecx, [esp + 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x406168
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x14
ret
lea edx, [esp + 0x10]
push esi
push edx
push ebx
call sym.testlock.exe_public:_static_int___cdecl_MSSTR::CopyN_char___char_const___int_
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x14
ret

Function at 0x40adc0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x419898]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40addf
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 [0x419894], 1
mov byte [0x419890], bl
jne 0x40ae39
mov ecx, dword [0x419d6c]
test ecx, ecx
je 0x40ae27
mov esi, dword [0x419d68]
sub esi, 4
cmp esi, ecx
jb 0x40ae27
mov eax, dword [esi]
test eax, eax
je 0x40ae20
call eax
mov ecx, dword [0x419d6c]
sub esi, 4
cmp esi, ecx
jae 0x40ae12
push 0x41601c
push 0x416014
call fcn.0040ae70
add esp, 8
push 0x416024
push 0x416020
call fcn.0040ae70
add esp, 8
test ebx, ebx
jne 0x40ae60
push ebp
mov dword [0x419898], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret
Function at 0x40ae90
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x413108
push 0x40e988
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 [0x419868], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x419864], ecx
shl ecx, 8
add ecx, edx
mov dword [0x419860], ecx
shr eax, 0x10
mov dword [0x41985c], eax
call fcn.0040bd40
test eax, eax
jne 0x40aefa
push 0x1c
call fcn.0040afb0
add esp, 4
mov dword [ebp - 4], 0
call fcn.0040b420
call fcn.0040e880
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x419d64], eax
call fcn.0040e440
mov dword [0x41989c], eax
test eax, eax
je 0x40af2d
mov eax, dword [0x419d64]
test eax, eax
jne 0x40af37
push 0xffffffffffffffff
call fcn.0040ad60
add esp, 4
call fcn.0040df90
call fcn.0040dea0
call fcn.0040ad30
mov eax, dword [0x419878]
mov dword [0x41987c], eax
push eax
mov eax, dword [0x419870]
push eax
mov ecx, dword [0x41986c]
push ecx
call fcn.00407da0
add esp, 0xc
mov dword [ebp - 0x1c], eax
push eax
call fcn.0040ad60
jmp 0x40af92
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 0x40e440
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x419a30]
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 0x40e482
call edi
mov esi, eax
test esi, esi
je 0x40e46c
mov eax, 1
jmp 0x40e47d
call ebp
mov ebx, eax
test ebx, ebx
je 0x40e58f
mov eax, 2
mov dword [0x419a30], eax
cmp eax, 1
jne 0x40e522
test esi, esi
jne 0x40e49b
call edi
mov esi, eax
test esi, esi
je 0x40e58f
cmp word [esi], 0
mov eax, esi
je 0x40e4b5
add eax, 2
cmp word [eax], 0
jne 0x40e4a3
add eax, 2
cmp word [eax], 0
jne 0x40e4a3
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 0x40e514
push edi
call fcn.00409890
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40e514
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 0x40e506
push ebx
call fcn.00409ae0
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 0x40e58f
test ebx, ebx
jne 0x40e533
call ebp
mov ebx, eax
test ebx, ebx
je 0x40e58f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x40e54b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40e53b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40e53b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00409890
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40e56d
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 0x40eaa0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x419200
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x40eac4
add eax, 8
inc ebp
cmp eax, 0x419290
jb 0x40eab5
cmp ecx, dword [ebp*8 + 0x419200]
jne 0x40ec6b
mov eax, dword [0x4198a4]
cmp eax, 1
je 0x40ec2d
test eax, eax
jne 0x40eaf0
cmp dword [0x416600], 1
je 0x40ec2d
cmp ecx, 0xfc
je 0x40ec6b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40eb2b
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 0x40eb74
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 0x41397c
add ebx, ecx
push ebx
call fcn.0040d7e0
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, 0x41395c
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 + 0x419204]
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.004113c0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x419c60]
test eax, eax
je 0x40ec3e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40ec48
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x419204]
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 0x40eda0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x419d60]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x40ef4d
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x419c60]
lea edi, [ecx*4 + 0x419c60]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x40ef4d
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x40ee0e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x40ee1f
push 2
push ebp
push eax
call fcn.0040ece0
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x40ef7e
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x40eec9
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x40ee7a
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x40ee67
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 0x40ee4a
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 0x40ef6f
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x40eec5
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x40ee46
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40ef3e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40ef12
cmp eax, 5
jne 0x40eefb
mov dword [0x419854], eax
mov dword [0x419850], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.0040f290
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 0x40ef32
cmp byte [ebp], 0x1a
jne 0x40ef32
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x419850], 0x1c
jmp 0x40ef57
sub eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x419850], 9
pop edi
pop esi
pop ebp
mov dword [0x419854], 0
or eax, 0xffffffff
pop ebx
add esp, 0x41c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40eec5
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 0x40efaf
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
jmp 0x40eec9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
jmp 0x40eec9
Function at 0x40f930
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40faee
push 0x3d
push edi
call fcn.00411870
mov esi, eax
add esp, 8
test esi, esi
je 0x40faee
cmp edi, esi
je 0x40faee
mov dl, byte [esi + 1]
mov ecx, dword [0x41987c]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x419878]
cmp eax, ecx
jne 0x40f987
push eax
call fcn.0040fbc0
add esp, 4
mov dword [0x419878], eax
test eax, eax
jne 0x40fa02
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40f9ae
mov eax, dword [0x419880]
test eax, eax
je 0x40f9ae
call fcn.0040c7f0
test eax, eax
je 0x40f9fd
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x40f9ba
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.00409890
add esp, 4
mov dword [0x419878], eax
test eax, eax
je 0x40faee
mov dword [eax], 0
mov eax, dword [0x419880]
test eax, eax
jne 0x40f9fd
push 4
call fcn.00409890
add esp, 4
mov dword [0x419880], eax
test eax, eax
je 0x40faee
mov dword [eax], 0
mov eax, dword [0x419878]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.0040fb40
mov esi, eax
add esp, 8
test esi, esi
jl 0x40faff
cmp dword [ebx], 0
je 0x40faff
test ebp, ebp
je 0x40faf7
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.00409ae0
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x40fa59
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 0x40fa48
lea eax, [esi*4]
push eax
push ebx
call fcn.00409940
add esp, 8
test eax, eax
je 0x40fa73
mov dword [0x419878], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40fae6
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.00409890
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40fae6
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.00409ae0
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 0x40fa77
test ebp, ebp
jne 0x40fae6
test esi, esi
jge 0x40fb09
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.00409940
add esp, 8
test eax, eax
je 0x40faee
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x419878], eax
jmp 0x40fa77