joyce8/EMBER2024-capa huggingface dataset:
Function at 0x418077
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 8], 0
and dword [ebp - 4], 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x41809e
xor eax, eax
jmp 0x4180b3
mov eax, dword [ebp - 8]
shl eax, 0x10
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 4]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
leave
ret 4

Function at 0x41825a
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
and dword [ebp - 8], 0
and dword [ebp - 0x18], 0
and dword [ebp - 0x14], 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x418281
or eax, 0xffffffff
jmp 0x41834b
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4182d1
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 2
push dword [ebp + 8]
call fcn.0040abe0
mov dword [ebp - 4], eax
push 0x8000
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
cmp dword [ebp - 4], 0xffffffff
je 0x4182cc
push dword [ebp - 4]
call fcn.0040b14a
push 0xfffffffffffffff8
pop eax
jmp 0x41834b
push 0xfffffffffffffffe
pop eax
jmp 0x41834b
mov eax, dword [ebp - 0x18]
inc eax
push eax
push 0x7ffe
call fcn.00403130
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4182ee
or eax, 0xffffffff
jmp 0x41834b
push dword [ebp - 0x10]
push dword [ebp - 0x18]
push dword [ebp - 8]
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x418308
or eax, 0xffffffff
jmp 0x41834b
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x421fd0
push dword [ebp - 0x10]
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x418326
or eax, 0xffffffff
jmp 0x41834b
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 8]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0xc]
mov dword [eax], ecx
push dword [ebp - 0x10]
push 0x7ffe
call fcn.00402d50
xor eax, eax
leave
ret 0xc

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
and dword [ebp - 4], 0
push dword [ebp + 8]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x210]
push eax
call fcn.004092f1
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x418392
xor eax, eax
jmp 0x418395
mov eax, dword [ebp - 4]
leave
ret 4

Function at 0x418399
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x20c]
push eax
call fcn.004092f1
push dword [ebp + 0xc]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
leave
ret 8
Function at 0x4185b3
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x36c
mov eax, dword [ebp + 8]
push dword [eax + 0x21c]
lea eax, [ebp - 0x36c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x36c]
push eax
call fcn.00408266
push dword [ebp + 8]
call fcn.00418b6f
pop ecx
mov dword [ebp - 8], 1
mov dword [ebp - 0x120], 1
mov dword [ebp - 0xc], 1
cmp dword [ebp - 8], 0
je 0x4186f5
cmp dword [ebp - 0x120], 0
je 0x418641
lea eax, [ebp - 0x264]
push eax
lea eax, [ebp - 0x36c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x41863f
and dword [ebp - 0xc], 0
jmp 0x4186f5
jmp 0x41866c
lea eax, [ebp - 0x264]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x41866c
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
and dword [ebp - 0xc], 0
jmp 0x4186f5
and dword [ebp - 0x120], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
and eax, 2
test eax, eax
je 0x41868d
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.USER32.dll_CharLowerA]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
and eax, 4
test eax, eax
je 0x4186ad
mov eax, dword [ebp - 0x264]
and eax, 0x10
test eax, eax
je 0x4186ab
and dword [ebp - 8], 0
jmp 0x4186f0
mov eax, dword [ebp - 0x264]
and eax, 0x10
test eax, eax
jne 0x4186f0
mov eax, dword [ebp - 0x264]
and eax, 0x80
test eax, eax
jne 0x4186ec
mov eax, dword [ebp - 0x264]
and eax, 0x20
test eax, eax
jne 0x4186ec
cmp dword [ebp - 0x264], 0
je 0x4186ec
mov eax, dword [ebp - 0x264]
and eax, 1
test eax, eax
je 0x4186f0
and dword [ebp - 8], 0
jmp 0x418606
cmp dword [ebp - 0xc], 0
je 0x41878b
lea eax, [ebp - 0x11c]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 1
push dword [ebp + 0xc]
call fcn.0040831c
lea eax, [ebp - 0x238]
push eax
mov eax, dword [ebp + 0xc]
add eax, 0x105
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx eax, word [ebp - 0x10]
movzx ecx, word [ebp - 0x124]
shl ecx, 0x10
or eax, ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x20c], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x244]
mov dword [eax + 0x210], ecx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x21c]
mov ecx, dword [ebp - 4]
mov dword [eax + 0x10c], ecx
mov eax, dword [ebp + 0xc]
add eax, 0x105
jmp 0x4187e7
mov eax, dword [ebp + 8]
cmp dword [eax + 0x224], 0
je 0x4187e5
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x224]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x36c]
push eax
call fcn.00408f54
test eax, eax
je 0x4187cd
lea eax, [ebp - 0x36c]
push eax
push 1
mov eax, dword [ebp + 8]
push dword [eax + 0x220]
push dword [ebp + 8]
call dword [ebp - 0x14]
jmp 0x4187e5
lea eax, [ebp - 0x36c]
push eax
push 2
mov eax, dword [ebp + 8]
push dword [eax + 0x220]
push dword [ebp + 8]
call dword [ebp - 0x14]
xor eax, eax
leave
ret
Function at 0x418b6f
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
and eax, 1
test eax, eax
jne 0x418b8c
xor eax, eax
jmp 0x418cf4
lea eax, [ebp - 0x354]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x21c]
call fcn.00408266
push 1
lea eax, [ebp - 0x354]
push eax
call fcn.0040831c
push 0x421fd4
lea eax, [ebp - 0x354]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x354]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x418be5
xor eax, eax
jmp 0x418cf4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
and eax, 2
test eax, eax
je 0x418bff
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.USER32.dll_CharLowerA]
cmp dword [ebp - 4], 0
je 0x418cf1
mov eax, dword [ebp - 0x24c]
and eax, 0x10
test eax, eax
je 0x418cb0
movsx eax, byte [ebp - 0x220]
cmp eax, 0x2e
je 0x418cb0
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x354]
push eax
call fcn.00408266
push 1
lea eax, [ebp - 0x10c]
push eax
call fcn.0040831c
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 1
lea eax, [ebp - 0x10c]
push eax
call fcn.0040831c
mov eax, dword [ebp + 8]
add eax, 0xc
push eax
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x21c]
push dword [eax + 0x114]
call fcn.0041dae0
lea eax, [ebp - 0x10c]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x21c]
push dword [eax + 0x114]
call fcn.0041db80
lea eax, [ebp - 0x24c]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x418cd2
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
push 1
pop eax
jmp 0x418cf4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
and eax, 2
test eax, eax
je 0x418cec
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.USER32.dll_CharLowerA]
jmp 0x418bff
push 1
pop eax
leave
ret
Function at 0x418d7e
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0x10], eax
call fcn.00418ee2
mov dword [ebp - 0x20], 1
cmp dword [ebp + 0x10], 0
je 0x418da3
mov dword [ebp - 0x20], 2
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x418db7
xor eax, eax
jmp 0x418ede
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x418dcb
xor eax, eax
jmp 0x418ede
push 0xfffffffffffffff4
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov word [ebp - 0x1c], ax
movsx eax, word [ebp - 0x1c]
cmp eax, 0x514
je 0x418dec
xor eax, eax
jmp 0x418ede
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x10]
cmp eax, 0x23
jle 0x418e0b
xor eax, eax
jmp 0x418ede
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_ScreenToClient]
push 0x50
lea eax, [ebp - 0x78]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetClassNameA]
push str.static
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x418e4d
xor eax, eax
jmp 0x418ede
push 0xfffffffffffffff0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x7c]
and eax, 0xf
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 7
je 0x418e6e
xor eax, eax
jmp 0x418ede
mov eax, dword [ebp + 0x10]
mov dword [0x421fd8], eax
push 0
push dword [0x424f58]
push 0xffffffffffffffff
push dword [ebp + 0xc]
push dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x14]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push 0x50000000
push str.CutWinName
push 0x421ffc
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [ebp - 4], eax
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x418ed0
push 0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_EnableWindow]
push 5
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp - 4]
leave
ret 0xc

Function at 0x4199be
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
cmp dword [ebp + 8], 0
jne 0x4199d1
xor eax, eax
jmp 0x419a18
push 0x105
lea eax, [ebp - 0x108]
push eax
push 0x489
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea eax, [ebp - 0x108]
push eax
mov eax, dword [ebp + 8]
add eax, 0x30f
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp + 8]
mov dword [eax + 0x62c], 1
push 1
pop eax
leave
ret
Function at 0x419af0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push section..rdata
push 0x41b068
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
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 [0x424ad0], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x424acc], ecx
shl ecx, 8
add ecx, edx
mov dword [0x424ac8], ecx
shr eax, 0x10
mov dword [0x424ac4], eax
call fcn.0041af30
test eax, eax
jne 0x419b5a
push 0x1c
call fcn.00419cc0
add esp, 4
mov dword [ebp - 4], 0
call fcn.0041ad30
call fcn.0041ad20
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x425990], eax
call fcn.0041a700
mov dword [0x424a94], eax
test eax, eax
je 0x419b8d
mov eax, dword [0x425990]
test eax, eax
jne 0x419b97
push 0xffffffffffffffff
call fcn.0041a060
add esp, 4
call fcn.0041a450
call fcn.0041a360
call fcn.0041a030
mov esi, dword [0x425990]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x419c76
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x419bde
test al, al
je 0x419bde
and eax, 0xff
push eax
call fcn.0041a300
add esp, 4
test eax, eax
je 0x419bb8
inc esi
mov dword [ebp - 0x64], esi
jmp 0x419bb8
cmp byte [esi], 0x22
jne 0x419be7
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x419bf7
cmp al, 0x20
ja 0x419bf7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x419be7
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x419c18
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x419c1d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.0041a060
jmp 0x419c5b
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
cmp byte [esi], 0x20
jbe 0x419be7
inc esi
mov dword [ebp - 0x64], esi
jmp 0x419c76

Function at 0x419cc0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x424a9c], 1
jne 0x419cce
call fcn.0041b140
mov eax, dword [esp + 4]
push eax
call fcn.0041b180
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x41a0a0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x424b00]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x41a0bf
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 [0x424afc], 1
mov byte [0x424af8], bl
jne 0x41a119
mov ecx, dword [0x425988]
test ecx, ecx
je 0x41a107
mov esi, dword [0x425984]
sub esi, 4
cmp esi, ecx
jb 0x41a107
mov eax, dword [esi]
test eax, eax
je 0x41a100
call eax
mov ecx, dword [0x425988]
sub esi, 4
cmp esi, ecx
jae 0x41a0f2
push 0x421014
push 0x421010
call fcn.0041a150
add esp, 8
push 0x42101c
push 0x421018
call fcn.0041a150
add esp, 8
test ebx, ebx
jne 0x41a140
push ebp
mov dword [0x424b00], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x41a700
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x424c10]
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 0x41a742
call edi
mov esi, eax
test esi, esi
je 0x41a72c
mov eax, 1
jmp 0x41a73d
call ebp
mov ebx, eax
test ebx, ebx
je 0x41a84f
mov eax, 2
mov dword [0x424c10], eax
cmp eax, 1
jne 0x41a7e2
test esi, esi
jne 0x41a75b
call edi
mov esi, eax
test esi, esi
je 0x41a84f
cmp word [esi], 0
mov eax, esi
je 0x41a775
add eax, 2
cmp word [eax], 0
jne 0x41a763
add eax, 2
cmp word [eax], 0
jne 0x41a763
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 0x41a7d4
push edi
call fcn.00419f50
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x41a7d4
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 0x41a7c6
push ebx
call fcn.00419ed0
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 0x41a84f
test ebx, ebx
jne 0x41a7f3
call ebp
mov ebx, eax
test ebx, ebx
je 0x41a84f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x41a80b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41a7fb
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41a7fb
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.00419f50
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x41a82d
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 0x41b180
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x422230
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x41b1a4
add eax, 8
inc ebp
cmp eax, 0x4222c0
jb 0x41b195
cmp ecx, dword [ebp*8 + 0x422230]
jne 0x41b34b
mov eax, dword [0x424a9c]
cmp eax, 1
je 0x41b30d
test eax, eax
jne 0x41b1d0
cmp dword [0x422088], 1
je 0x41b30d
cmp ecx, 0xfc
je 0x41b34b
lea eax, [esp + 0xb4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41b20b
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 0x41b254
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 0x4202e0
add ebx, ecx
push ebx
call fcn.0041c160
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, 0x4202c0
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 + 0x422234]
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.0041c0d0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x425880]
test eax, eax
je 0x41b31e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x41b328
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebp*8 + 0x422234]
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 0x41d3a0
Capabilities:
Set environment variable

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x41d55e
push 0x3d
push edi
call fcn.0041d840
mov esi, eax
add esp, 8
test esi, esi
je 0x41d55e
cmp edi, esi
je 0x41d55e
mov dl, byte [esi + 1]
mov ecx, dword [0x424ae4]
xor eax, eax
test dl, dl
sete al
mov ebp, eax
mov eax, dword [0x424ae0]
cmp eax, ecx
jne 0x41d3f7
push eax
call fcn.0041d630
add esp, 4
mov dword [0x424ae0], eax
test eax, eax
jne 0x41d472
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x41d41e
mov eax, dword [0x424ae8]
test eax, eax
je 0x41d41e
call fcn.0041d020
test eax, eax
je 0x41d46d
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
test ebp, ebp
je 0x41d42a
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 4
call fcn.00419f50
add esp, 4
mov dword [0x424ae0], eax
test eax, eax
je 0x41d55e
mov dword [eax], 0
mov eax, dword [0x424ae8]
test eax, eax
jne 0x41d46d
push 4
call fcn.00419f50
add esp, 4
mov dword [0x424ae8], eax
test eax, eax
je 0x41d55e
mov dword [eax], 0
mov eax, dword [0x424ae0]
mov ebx, eax
mov eax, esi
sub eax, edi
push eax
push edi
mov dword [esp + 0x18], eax
call fcn.0041d5b0
mov esi, eax
add esp, 8
test esi, esi
jl 0x41d56f
cmp dword [ebx], 0
je 0x41d56f
test ebp, ebp
je 0x41d567
mov ecx, dword [ebx + esi*4]
lea edi, [ebx + esi*4]
push ecx
call fcn.00419ed0
mov eax, dword [edi]
add esp, 4
test eax, eax
je 0x41d4c9
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 0x41d4b8
lea eax, [esi*4]
push eax
push ebx
call fcn.0041d6a0
add esp, 8
test eax, eax
je 0x41d4e3
mov dword [0x424ae0], eax
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x41d556
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.00419f50
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x41d556
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.00419ed0
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 0x41d4e7
test ebp, ebp
jne 0x41d556
test esi, esi
jge 0x41d579
neg esi
lea ecx, [esi*4 + 8]
push ecx
push ebx
call fcn.0041d6a0
add esp, 8
test eax, eax
je 0x41d55e
mov dword [eax + esi*4], edi
mov dword [eax + esi*4 + 4], 0
mov dword [0x424ae0], eax
jmp 0x41d4e7