joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406f11
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x10]
push edi
mov al, byte [ebp]
mov dword [esp + 0x14], esi
test al, al
je 0x407068
mov edi, 0x400
mov ecx, esi
sub ecx, dword [esp + 0x14]
cmp ecx, edi
jge 0x407068
movzx ebx, al
inc ebp
cmp ebx, 0xdd
jge 0x406f53
mov byte [esi], bl
inc esi
jmp 0x40705d
cmp ebx, 0xff
jne 0x406f67
mov al, byte [ebp]
mov byte [esi], al
inc esi
inc ebp
jmp 0x40705d
lea eax, [ebx - 0xdd]
cmp eax, 0x21
ja case.default.0x406f7d
movzx eax, byte [eax + 0x407090]
jmp dword [eax*4 + 0x407070]
push dword [0x422de4]
push 0x40a5cc
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp case.default.0x406f7d
lea eax, [ebx - 0xde]
shl eax, 0xa
add eax, 0x41bd80
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp case.default.0x406f7d
push esi
push str.ProgramFilesDir
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00406da2
add esp, 0x10
cmp byte [esi], 0
jne 0x407035
push str.C:Program_Files
jmp 0x406fad
push esi
push dword [ebx*4 + 0x40a0c8]
call fcn.004070b2
pop ecx
pop ecx
jmp case.default.0x406f7d
push esi
push str.Common_AppData
call fcn.004070b2
pop ecx
pop ecx
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je case.0x406f7d.252
test al, 0x10
jne case.default.0x406f7d
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp case.default.0x406f7d
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp case.default.0x406f7d
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp byte [esi], 0
je 0x407044
push esi
call dword [sym.imp.USER32.dll_CharNextA]
cmp byte [eax], 0
je 0x407044
inc esi
jmp case.default.0x406f7d
cmp ebx, 0xf2
jle 0x407054
cmp byte [esi], 0x5c
jne 0x407054
and byte [esi], 0
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov al, byte [ebp]
test al, al
jne 0x406f31
and byte [esi], 0
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x4070b2
Capabilities:
Get common file path
Persist via run registry key

Disassembly:
mov al, byte [0x421d80]
push ebx
push ebp
push esi
push edi
mov esi, dword [esp + 0x18]
movsx edi, al
mov ecx, edi
push esi
neg ecx
sbb ecx, ecx
mov ebp, 0x80000001
and ecx, 0xfffffff9
mov ebx, str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
add ecx, 7
add ecx, dword [esp + 0x18]
push ecx
xor ecx, ecx
test al, al
setne cl
add ecx, ebp
push ebx
push ecx
call fcn.00406da2
add esp, 0x10
cmp byte [esi], 0
jne 0x407122
test edi, edi
je 0x407116
mov eax, dword [esp + 0x14]
push esi
add eax, 7
xor edi, edi
push eax
xor eax, eax
cmp byte [0x421d80], al
push ebx
setne al
add eax, ebp
push eax
jmp 0x4070e9
push esi
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x407127
Capabilities:
Create shortcut via ishelllink

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
push ebx
push esi
push 1
xor esi, esi
pop ebx
push esi
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ole32.dll_OleInitialize]
cmp eax, ebx
je 0x407150
cmp eax, esi
je 0x407150
mov eax, ebx
jmp 0x40723a
lea eax, [ebp - 4]
push eax
push 0x408378
push ebx
push esi
push 0x408368
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x407231
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push 0x408388
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jl 0x407228
mov eax, dword [ebp - 4]
push edi
push dword [ebp + 0x18]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x50]
push dword [ebp + 0x20]
mov edi, eax
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
cmp dword [ebp + 0x24], esi
je 0x4071b3
mov eax, dword [ebp - 4]
push dword [ebp + 0x24]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3c]
cmp dword [ebp + 0x28], esi
je 0x4071c4
mov eax, dword [ebp - 4]
push dword [ebp + 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x34]
cmp dword [ebp + 0x10], esi
je 0x4071d8
push dword [ebp + 0x14]
mov eax, dword [ebp - 4]
push dword [ebp + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x44]
cmp dword [ebp + 0x1c], esi
je 0x4071e9
mov eax, dword [ebp - 4]
push dword [ebp + 0x1c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x2c]
cmp edi, esi
pop edi
jl 0x40721f
lea eax, [ebp - 0x80c]
push 0x400
push eax
push 0xffffffffffffffff
push dword [ebp + 0xc]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x80c]
push ebx
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
test eax, eax
jl 0x40721f
mov dword [ebp - 0xc], esi
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_OleUninitialize]
mov eax, dword [ebp - 0xc]
pop esi
pop ebx
leave
ret
Function at 0x406cb0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebx
mov ecx, 0xffffffff
sub ecx, dword [esp + 0x10]
push esi
mov edx, dword [esp + 0x10]
mov eax, edx
dec edx
test eax, eax
je 0x406ce8
mov esi, dword [esp + 0xc]
mov al, byte [esi]
xor ebx, ebx
xor al, cl
inc esi
shr ecx, 8
mov bl, al
mov eax, dword [ebx*4 + 0x4203e8]
xor eax, ecx
mov ecx, eax
mov eax, edx
dec edx
test eax, eax
jne 0x406cca
mov eax, 0xffffffff
pop esi
sub eax, ecx
pop ebx
ret

Function at 0x407830
Capabilities:
Get file attributes

Disassembly:
sub esp, 0x10
push ebx
push esi
push edi
push ebp
mov esi, dword [esp + 0x28]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov edi, eax
jne 0x40787a
mov eax, dword [esp + 0x2c]
push esi
push 0x41fc14
push str.Cannot_open_file:__1
push eax
call fcn.00406e20
add esp, 0x10
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
lea eax, [esp + 0x10]
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov ebp, eax
lea ecx, [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
or ebp, eax
mov ebx, dword [esp + 0x24]
lea ecx, [esp + 0x18]
lea eax, [ebx + 2]
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
or ebp, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
call fcn.00407c00
mov word [ebx + 4], ax
add esp, 4
test ebp, ebp
jne 0x4078f5
mov eax, dword [esp + 0x2c]
push esi
push 0x41fc14
push str.Cannot_get_date_time_attributes_from_file:__1
push eax
call fcn.00406e20
add esp, 0x10
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
Function at 0x407910
Capabilities:
Set file attributes

Disassembly:
sub esp, 0x10
push ebx
push esi
push edi
push ebp
mov esi, dword [esp + 0x24]
push 0
push 0
push 3
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov ebx, eax
jne 0x40795a
mov eax, dword [esp + 0x2c]
push esi
push 0x41fc14
push str.Cannot_open_file:__1
push eax
call fcn.00406e20
add esp, 0x10
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
lea eax, [esp + 0x10]
mov ebp, dword [esp + 0x28]
mov cx, word [ebp + 2]
push eax
mov ax, word [ebp]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
mov edi, eax
lea ecx, [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
or edi, eax
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
or edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ax, word [ebp + 4]
push eax
call fcn.00407be0
add esp, 4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
or edi, eax
jne 0x4079db
mov eax, dword [esp + 0x2c]
push esi
push 0x41fc14
push str.Cannot_set_date_time_attributes_for_file:__1
push eax
call fcn.00406e20
add esp, 0x10
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
Function at 0x408760
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
mov ecx, dword [esp + 4]
inc ecx
mov al, byte [ecx - 1]
cmp byte [ecx], 0
je 0x408794
mov edx, eax
inc ecx
shr eax, 8
and edx, 0xff
shl edx, 3
or edx, eax
and edx, 0xffffff
mov eax, edx
xor edx, edx
mov dl, byte [ecx - 1]
xor eax, edx
cmp byte [ecx], 0
jne 0x40876f
ret

Function at 0x40c4d0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x42273c], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x40c4ee
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x422738], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x422734], bl
jne 0x40c548
cmp dword [0x425240], 0
je 0x40c536
mov edi, dword [0x42523c]
sub edi, 4
cmp edi, dword [0x425240]
jb 0x40c536
mov eax, dword [edi]
test eax, eax
je 0x40c52b
call eax
sub edi, 4
cmp edi, dword [0x425240]
jae 0x40c523
push 0x41f024
push 0x41f018
call fcn.0040c580
add esp, 8
push 0x41f02c
push 0x41f028
call fcn.0040c580
add esp, 8
test ebx, ebx
jne 0x40c56f
mov dword [0x42273c], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret
Function at 0x40cfe0
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp dword [0x424220], edx
push ebx
push esi
push edi
push ebp
jbe 0x40d1e7
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x424120
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [esp + 0x18]
shl eax, 3
mov ebx, dword [ecx]
mov ebp, eax
mov dword [esp + 0x1c], eax
mov al, byte [ebx + ebp + 4]
test al, 1
je 0x40d1e7
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x40d049
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x40d05a
push 2
push 0
push edx
call fcn.0040d2e0
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x40d0f6
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40d12f
lea edi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40d0bd
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x40d0ab
mov byte [edi], 0xd
inc esi
inc edi
mov byte [edi], al
inc edi
mov eax, edi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x40d092
lea eax, [esp + 0x24]
push 0
sub edi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push edi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d125
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, edi
jge 0x40d07d
jmp 0x40d12f
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40d125
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x40d12f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x40d1d6
cmp dword [esp + 0x10], 0
je 0x40d188
cmp dword [esp + 0x10], 5
jne 0x40d16b
mov dword [0x4226f4], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x4226f8], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.00411360
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x40d1b2
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x40d1b2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x4226f4], 0x1c
mov dword [0x4226f8], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, esi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x4226f4], 9
mov dword [0x4226f8], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x40d3a0
Capabilities:
Delete file

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
mov eax, 0
jne 0x40d3ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40d3cd
push eax
call fcn.00411360
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x40dd60
Capabilities:
Create directory

Disassembly:
mov eax, dword [esp + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
mov eax, 0
jne 0x40dd7c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40dd8f
push eax
call fcn.00411360
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x40dea0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
lea eax, [esp]
push esi
xor esi, esi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40ded6
cmp byte [esp + 5], 0x3a
jne 0x40ded6
xor eax, eax
mov al, byte [esp + 4]
push eax
call fcn.0040c320
add esp, 4
lea esi, [eax - 0x40]
mov eax, esi
pop esi
add esp, 0x104
ret

Function at 0x40e2a0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e068
push 0x412554
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov ecx, eax
mov dl, ah
and ecx, 0xff
shr eax, 0x10
mov dword [0x42270c], edx
mov dword [0x422708], ecx
mov dword [0x422700], eax
shl ecx, 8
add ecx, edx
mov dword [0x422704], ecx
call fcn.0040e3f0
test eax, eax
jne 0x40e30a
push 0x1c
call fcn.0040e3c0
add esp, 4
mov dword [ebp - 4], 0
call fcn.00410f30
call fcn.00412540
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x425238], eax
call fcn.004120f0
mov dword [0x422760], eax
test eax, eax
je 0x40e33d
cmp dword [0x425238], 0
jne 0x40e347
push 0xffffffffffffffff
call fcn.0040c490
add esp, 4
call fcn.00411e70
call fcn.00411d80
call fcn.0040c460
mov eax, dword [0x42271c]
mov dword [0x422720], eax
push eax
mov eax, dword [0x422714]
push eax
mov eax, dword [0x422710]
push eax
call fcn.00402fc0
add esp, 0xc
push eax
call fcn.0040c490
jmp 0x40e3a4
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
pop edi
mov dword fs:[0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x410dc0
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.00413fc0
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [esp + 0x1014]
push ebp
cmp dword [0x424220], esi
jbe 0x410f0d
mov eax, esi
mov ecx, esi
and eax, 0xffffffe7
and ecx, 0x1f
sar eax, 3
mov edx, dword [eax + 0x424120]
test byte [edx + ecx*8 + 4], 1
je 0x410f0d
push 1
push ebx
push esi
call fcn.0040d2e0
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
je 0x410efd
push 2
push ebx
push esi
call fcn.0040d2e0
add esp, 0xc
cmp eax, 0xffffffff
je 0x410efd
mov ecx, dword [esp + 0x101c]
mov ebp, ecx
sub ebp, eax
test ebp, ebp
jle 0x410ea3
lea edi, [esp + 0x14]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.00413f40
add esp, 8
mov edi, eax
mov eax, 0x1000
cmp ebp, eax
jge 0x410e66
mov eax, ebp
push eax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.0040cfe0
add esp, 0xc
cmp eax, 0xffffffff
je 0x410e82
sub ebp, eax
test ebp, ebp
jg 0x410e5b
jmp 0x410e97
cmp dword [0x4226f8], 5
jne 0x410e95
mov dword [0x4226f4], 0xd
mov ebx, eax
push edi
push esi
call fcn.00413f40
add esp, 8
jmp 0x410ee0
jge 0x410ee0
push 0
push ecx
push esi
call fcn.0040d2e0
add esp, 0xc
push esi
call fcn.00411310
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ebx, ebx
cmp ebx, 0xffffffff
jne 0x410ee0
mov dword [0x4226f4], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4226f8], eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call fcn.0040d2e0
add esp, 0xc
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x4226f4], 9
pop edi
pop esi
pop ebx
add esp, 0x1004
ret

Function at 0x4113d0
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 0x4113f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00411360
add esp, 4
mov eax, 0xffffffff
ret
test al, 1
je 0x41141a
test byte [esp + 8], 2
je 0x41141a
mov dword [0x4226f4], 0xd
mov dword [0x4226f8], 5
mov eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x4120f0
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
cmp dword [0x4234c0], ebx
jne 0x41213f
call esi
cmp eax, ebx
mov edi, eax
je 0x41211d
mov dword [0x4234c0], 1
jmp 0x41213f
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x412135
mov dword [0x4234c0], 2
jmp 0x41213f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x4234c0], 1
jne 0x4121ee
test edi, edi
jne 0x412162
call esi
mov edi, eax
test edi, edi
jne 0x412162
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x41217c
add esi, 2
cmp word [esi], 0
jne 0x41216a
add esi, 2
cmp word [esi], 0
jne 0x41216a
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x4121dd
push ebp
call fcn.0040bf40
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x4121dd
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4121cc
push ebx
call fcn.0040bec0
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x4234c0], 2
jne 0x412272
test ebx, ebx
jne 0x412211
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x412211
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x412226
inc ebp
cmp byte [ebp], 0
jne 0x412218
inc ebp
cmp byte [ebp], 0
jne 0x412218
sub ebp, ebx
inc ebp
push ebp
call fcn.0040bf40
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x41224b
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x412670
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x4236e0
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x412697
add eax, 8
inc ecx
cmp eax, 0x423770
jb 0x412688
cmp dword [ecx*8 + 0x4236e0], edx
lea ebx, [ecx*8]
jne 0x41285b
cmp dword [0x42276c], 1
je 0x412817
cmp dword [0x42276c], 0
jne 0x4126ce
cmp dword [0x422770], 1
je 0x412817
cmp edx, 0xfc
je 0x41285b
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x41270b
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x41274f
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x41e41c
push ebp
call fcn.0040dda0
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x41e3fc
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x4236e4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00414390
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x424120], 0
je 0x41282d
mov eax, dword [0x424120]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x412837
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x4236e4]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub 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 ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret