joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403706
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x504
push ebx
push esi
push edi
push 0x100
lea eax, [ebp - 0x504]
push eax
push 0x2717
call section..text
add esp, 0xc
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x504]
push eax
lea eax, [ebp - 0x404]
push eax
call fcn.0040108e
add esp, 0x18
lea eax, [ebp - 0x404]
push eax
mov eax, dword [ebp + 0x18]
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp + 0x10]
movsx eax, byte [ecx + eax - 1]
cmp eax, 0x5c
je 0x403798
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [ebp + 0x10]
movsx eax, byte [ecx + eax - 1]
cmp eax, 0x2f
jne 0x4037ba
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x10]
push eax
push 0x410b44
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x4037d7
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x10]
push eax
push 0x410b4c
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x413730
mov eax, dword [ebp + 8]
push eax
push 0x410b54
lea eax, [ebp - 0x200]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
call fcn.004034d5
push 0x413730
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0x1c]
push eax
mov eax, dword [ebp + 0x18]
push eax
mov eax, dword [0x413a44]
push eax
call fcn.00403101
add esp, 0x14
cmp eax, 1
jne 0x40386c
push 0
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x200]
push eax
call fcn.004033a0
add esp, 0xc
test eax, eax
je 0x403858
lea eax, [ebp - 0x200]
push eax
call fcn.00409180
add esp, 4
xor eax, eax
jmp 0x40392c
call fcn.004034d5
lea eax, [ebp - 0x200]
push eax
call fcn.00409180
add esp, 4
mov dword [ebp - 0x204], 2
cmp dword [ebp + 0x20], 0
je 0x40390e
push 0x100
lea eax, [ebp - 0x504]
push eax
push 0x2718
call section..text
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x504]
push eax
lea eax, [ebp - 0x404]
push eax
call fcn.0040108e
add esp, 0x14
push 0x100
lea eax, [ebp - 0x504]
push eax
push 0x2716
call section..text
add esp, 0xc
push 0x15
lea eax, [ebp - 0x504]
push eax
lea eax, [ebp - 0x404]
push eax
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp - 0x204], eax
cmp dword [ebp - 0x204], 2
jne 0x40390e
mov eax, 1
jmp 0x40392c
cmp dword [ebp + 0x20], 0
je 0x403925
cmp dword [ebp - 0x204], 4
je 0x403762
xor eax, eax
jmp 0x40392c
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403f2b
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push esi
push edi
cmp dword [ebp + 0xc], 0
je 0x403f4f
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x204], eax
jmp 0x403f59
mov dword [ebp - 0x204], str.http:__www.ipswitch.com
push 1
push 0x410b78
push 0
mov eax, dword [ebp - 0x204]
push eax
push str.open
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
cmp eax, 0x20
jge 0x403ff6
push 0x100
lea eax, [ebp - 0x100]
push eax
push 0x2752
mov eax, dword [0x413a44]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
cmp dword [ebp + 0xc], 0
je 0x403fb6
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x208], eax
jmp 0x403fc0
mov dword [ebp - 0x208], str.HTTP:__www.ipswitch.com
mov eax, dword [ebp - 0x208]
push eax
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x200]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push 0x410bb4
lea eax, [ebp - 0x200]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4085ad
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push 1
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40878f
push 2
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [0x413a44]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
mov eax, dword [0x413a44]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [0x413b68], eax
cmp dword [0x413b68], 0
je 0x408781
mov eax, dword [0x413b68]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [0x413b64], eax
cmp dword [0x413b64], 0
je 0x408775
mov eax, dword [0x413b64]
cmp dword [eax + 0x20], 0
je 0x40865d
mov eax, dword [0x413b64]
xor ecx, ecx
mov cx, word [eax + 0x20]
mov dword [0x413b58], ecx
jmp case.0x4086c9.4
mov eax, dword [0x413b64]
xor ecx, ecx
mov cx, word [eax + 0xe]
mov dword [ebp - 0x18], ecx
jmp 0x4086b1
mov dword [0x413b58], 2
jmp case.0x4086c9.4
mov dword [0x413b58], 0x10
jmp case.0x4086c9.4
mov dword [0x413b58], 0x100
jmp case.0x4086c9.4
mov dword [0x413b58], 0
jmp case.0x4086c9.4
dec dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0x17
ja case.0x4086c9.4
mov eax, dword [ebp - 0x18]
xor ecx, ecx
mov cl, byte [eax + 0x4086e4]
jmp dword [ecx*4 + 0x4086d0]
mov eax, dword [0x413b64]
mov dword [0x413b70], eax
mov eax, dword [0x413b58]
shl eax, 2
movzx eax, ax
mov ecx, dword [0x413b64]
xor edx, edx
mov dx, word [ecx]
add eax, edx
add dword [0x413b70], eax
push 0xcc0020
push 0
mov eax, dword [0x413b64]
push eax
mov eax, dword [0x413b70]
push eax
mov eax, dword [0x413b64]
mov eax, dword [eax + 8]
push eax
mov eax, dword [0x413b64]
mov eax, dword [eax + 4]
push eax
push 0
push 0
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x10]
push eax
push 0
push 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.GDI32.dll_StretchDIBits]
mov eax, dword [0x413b68]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [0x413b68]
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_ValidateRect]
mov eax, 1
jmp 0x4087a5
pop edi
pop esi
pop ebx
leave
ret

Function at 0x409150
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 0x40916a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40917d
push eax
call fcn.0040ac90
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret
Function at 0x409190
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 0x4091b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040ac90
add esp, 4
mov eax, 0xffffffff
ret
test al, 1
je 0x4091da
test byte [esp + 8], 2
je 0x4091da
mov dword [0x411a60], 0xd
mov dword [0x411a64], 5
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x4091e0
Capabilities:
Move file

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
mov eax, 0
jne 0x4091ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x409212
push eax
call fcn.0040ac90
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x409660
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
push esi
mov ebx, dword [esp + 0x118]
push edi
test ebx, ebx
je 0x4096d3
push ebx
call fcn.00409790
add esp, 4
test eax, eax
jne 0x4096a1
xor eax, eax
pop edi
mov dword [0x411a64], 0xf
mov dword [0x411a60], 0xd
pop esi
pop ebx
add esp, 0x10c
ret
add bl, 0x40
lea eax, [esp + 0x10]
mov byte [esp + 0xc], bl
push eax
lea ecx, [esp + 0x18]
lea ebx, [esp + 0x10]
mov byte [esp + 0x11], 0x3a
mov byte [esp + 0x12], 0x2e
mov byte [esp + 0x13], 0
push ecx
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
jmp 0x4096e3
lea eax, [esp + 0x14]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x409782
inc eax
cmp eax, 0x104
ja 0x409782
mov edx, dword [esp + 0x120]
test edx, edx
jne 0x409734
mov ecx, dword [esp + 0x124]
cmp eax, ecx
jg 0x40970f
mov eax, ecx
push eax
call fcn.0040b000
add esp, 4
mov edx, eax
test edx, edx
jne 0x409753
xor eax, eax
pop edi
mov dword [0x411a60], 0xc
pop esi
pop ebx
add esp, 0x10c
ret
cmp eax, dword [esp + 0x124]
jle 0x409753
xor eax, eax
pop edi
mov dword [0x411a60], 0x22
pop esi
pop ebx
add esp, 0x10c
ret
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, edx
pop edi
pop esi
pop ebx
add esp, 0x10c
or al, 1
add byte [eax], al
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x10c
ret

Function at 0x409790
Capabilities:
Get disk information

Disassembly:
mov eax, dword [esp + 4]
sub esp, 4
test eax, eax
jne 0x4097a4
mov eax, 1
add esp, 4
ret
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0x5c
mov byte [esp + 3], 0
add al, 0x40
mov byte [esp], al
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x4097d6
cmp eax, 1
je 0x4097d6
mov eax, 1
add esp, 4
ret
xor eax, eax
add esp, 4
ret
Function at 0x4099d0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword fs:[0]
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x40be20
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x411a6c], eax
xor eax, eax
mov al, byte [0x411a6d]
mov dword [0x411a78], eax
mov eax, dword [0x411a6c]
shr dword [0x411a6c], 0x10
and eax, 0xff
mov dword [0x411a74], eax
shl eax, 8
add eax, dword [0x411a78]
mov dword [0x411a70], eax
call fcn.0040be00
mov dword [ebp - 4], 0
call fcn.0040bc20
call fcn.0040bc10
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x414ca0], eax
call fcn.0040b7b0
mov dword [0x4118d0], eax
test eax, eax
je 0x409a69
cmp dword [0x414ca0], 0
jne 0x409a73
push 0xffffffffffffffff
call fcn.0040ad30
add esp, 4
call fcn.0040b530
call fcn.0040b450
call fcn.0040ad00
mov esi, dword [0x414ca0]
mov al, byte [esi]
cmp al, 0x22
je 0x409a9a
cmp al, 0x20
jbe 0x409ac7
inc esi
cmp byte [esi], 0x20
ja 0x409a92
jmp 0x409ac7
inc esi
cmp byte [esi], 0x22
je 0x409ac6
mov bl, byte [ebp - 0x28]
mov bl, byte [esi]
test bl, bl
je 0x409ac1
xor eax, eax
mov al, bl
push eax
call fcn.0040b3f0
add esp, 4
test eax, eax
je 0x409abb
inc esi
inc esi
cmp byte [esi], 0x22
jne 0x409aa3
cmp byte [esi], 0x22
jne 0x409ac7
inc esi
cmp byte [esi], 0
je 0x409ad7
cmp byte [esi], 0x20
ja 0x409ad7
inc esi
cmp byte [esi], 0
jne 0x409acc
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x44], 1
mov eax, 0xa
je 0x409afb
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
push eax
call fcn.0040ad30
jmp 0x409b3c
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 0x40ad70
Capabilities:
Terminate process

Disassembly:
cmp dword [0x411aa8], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x40ad8e
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x411aa4], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x411aa0], bl
jne 0x40ade8
cmp dword [0x414c98], 0
je 0x40add6
mov edi, dword [0x414c94]
sub edi, 4
cmp dword [0x414c98], edi
ja 0x40add6
mov eax, dword [edi]
test eax, eax
je 0x40adcb
call eax
sub edi, 4
cmp dword [0x414c98], edi
jbe 0x40adc3
push 0x41001c
push 0x410014
call fcn.0040ae20
add esp, 8
push 0x410024
push 0x410020
call fcn.0040ae20
add esp, 8
test ebx, ebx
jne 0x40ae0f
mov dword [0x411aa8], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret
Function at 0x40b7b0
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
cmp dword [0x411b70], 0
push ebx
push esi
push edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push ebp
jne 0x40b7fc
call esi
mov edi, eax
test edi, edi
je 0x40b7da
mov dword [0x411b70], 1
jmp 0x40b800
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x40b7f2
mov dword [0x411b70], 2
jmp 0x40b804
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
cmp dword [0x411b70], 1
jne 0x40b8b3
test edi, edi
jne 0x40b827
call esi
mov edi, eax
test edi, edi
jne 0x40b827
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x40b841
add esi, 2
cmp word [esi], 0
jne 0x40b82f
add esi, 2
cmp word [esi], 0
jne 0x40b82f
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 0x40b8a2
push ebp
call fcn.0040b000
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x40b8a2
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 0x40b891
push ebx
call fcn.00409b90
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 [0x411b70], 2
jne 0x40b937
test ebx, ebx
jne 0x40b8d6
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x40b8d6
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x40b8eb
inc ebp
cmp byte [ebp], 0
jne 0x40b8dd
inc ebp
cmp byte [ebp], 0
jne 0x40b8dd
sub ebp, ebx
inc ebp
push ebp
call fcn.0040b000
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x40b910
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 0x40bf40
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x411da0
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x40bf67
add eax, 8
inc ecx
cmp eax, 0x411e28
jb 0x40bf58
cmp dword [ecx*8 + 0x411da0], edx
lea ebx, [ecx*8]
jne 0x40c122
cmp dword [0x4118dc], 1
je 0x40c0e7
cmp dword [0x4118dc], 0
jne 0x40bf9e
cmp dword [0x4118e0], 1
je 0x40c0e7
cmp edx, 0xfc
je 0x40c122
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x40bfdb
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 0x40c01f
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 0x40f330
push ebp
call fcn.00408c00
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, 0x40f310
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 + 0x411da4]
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.0040de90
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x414b90]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40c0fe
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x411da4]
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
Function at 0x40c3f0
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp edx, dword [0x414c90]
push ebx
push esi
push edi
push ebp
jae 0x40c5f7
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x414b90
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 0x40c5f7
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x40c459
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x40c46a
push 2
push 0
push edx
call fcn.0040df30
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x40c506
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40c53f
lea edi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40c4cd
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x40c4bb
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 0x40c4a2
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 0x40c535
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp edi, eax
jle 0x40c48d
jmp 0x40c53f
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 0x40c535
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x40c53f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x40c5e6
cmp dword [esp + 0x10], 0
je 0x40c598
cmp dword [esp + 0x10], 5
jne 0x40c57b
mov dword [0x411a60], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x411a64], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.0040ac90
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 0x40c5c2
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x40c5c2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x411a60], 0x1c
mov dword [0x411a64], 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 [0x411a60], 9
mov dword [0x411a64], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x40e130
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1004
call fcn.004092d0
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [esp + 0x1014]
push ebp
cmp esi, dword [0x414c90]
jae 0x40e27d
mov eax, esi
mov ecx, esi
and eax, 0xffffffe7
and ecx, 0x1f
sar eax, 3
mov edx, dword [eax + 0x414b90]
test byte [edx + ecx*8 + 4], 1
je 0x40e27d
push 1
push ebx
push esi
call fcn.0040df30
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
je 0x40e26d
push 2
push ebx
push esi
call fcn.0040df30
add esp, 0xc
cmp eax, 0xffffffff
je 0x40e26d
mov ecx, dword [esp + 0x101c]
mov ebp, ecx
sub ebp, eax
test ebp, ebp
jle 0x40e213
lea edi, [esp + 0x14]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.0040ead0
add esp, 8
mov edi, eax
mov eax, 0x1000
cmp ebp, eax
jge 0x40e1d6
mov eax, ebp
push eax
lea eax, [esp + 0x18]
push eax
push esi
call fcn.0040c3f0
add esp, 0xc
cmp eax, 0xffffffff
je 0x40e1f2
sub ebp, eax
test ebp, ebp
jg 0x40e1cb
jmp 0x40e207
cmp dword [0x411a64], 5
jne 0x40e205
mov dword [0x411a60], 0xd
mov ebx, eax
push edi
push esi
call fcn.0040ead0
add esp, 8
jmp 0x40e250
jge 0x40e250
push 0
push ecx
push esi
call fcn.0040df30
add esp, 0xc
push esi
call fcn.0040c330
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ebx, ebx
cmp ebx, 0xffffffff
jne 0x40e250
mov dword [0x411a60], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x411a64], eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call fcn.0040df30
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 [0x411a60], 9
pop edi
pop esi
pop ebx
add esp, 0x1004
ret
Function at 0x40ebf0
Capabilities:
Delete directory

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
mov eax, 0
jne 0x40ec0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40ec1d
push eax
call fcn.0040ac90
add esp, 4
mov eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x40ec20
Capabilities:
Get common file path
Set current directory
Set environment variable

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10c
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x40eca9
lea eax, [esp + 4]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x40eca9
cmp byte [esp + 4], 0x5c
je 0x40ec57
cmp byte [esp + 4], 0x2f
jne 0x40ec6a
mov al, byte [esp + 5]
cmp byte [esp + 4], al
jne 0x40ec6a
xor eax, eax
add esp, 0x10c
ret
mov byte [esp], 0x3d
xor eax, eax
mov al, byte [esp + 4]
push eax
call fcn.0040ed90
lea ecx, [esp + 8]
mov byte [esp + 5], al
mov byte [esp + 6], 0x3a
mov byte [esp + 7], 0
lea edx, [esp + 4]
add esp, 4
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x40eca9
xor eax, eax
add esp, 0x10c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040ac90
add esp, 4
mov eax, 0xffffffff
add esp, 0x10c
ret

Function at 0x1141677
Capabilities:
Encode data using xor

Disassembly:
push dword [ebp - 4]
pop dword [esp + 0x28]
mov ax, ax
lahf
cwde
setge al
mov dword [esp + 0x24], ebx
jmp 0x113bb0f
xchg dword [esp + 0x2c], eax
jmp 0x10a3aeb