joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4170d3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x4a97c8]
push edi
jae 0x4172a8
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x4a97e0]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x4172a8
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x41717e
test dl, 2
jne 0x41717e
test dl, 0x48
je 0x417148
cmp byte [eax + 5], 0xa
je 0x417148
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x417191
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x417179
mov dword [0x4a8040], ecx
jmp 0x4172af
cmp eax, 0x6d
jne 0x417185
xor eax, eax
jmp 0x4172bc
push eax
call fcn.0041a980
pop ecx
jmp 0x4172b9
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x4172a3
test eax, eax
je 0x4171b8
cmp byte [ebx], 0xa
jne 0x4171b8
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x4171c1
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x41729d
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x41728d
cmp al, 0xd
je 0x4171f3
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x41727f
dec ecx
cmp dword [ebp - 8], ecx
jae 0x41720d
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x417208
add dword [ebp - 8], 2
jmp 0x417261
mov dword [ebp - 8], eax
jmp 0x41727b
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x417235
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41727b
cmp dword [ebp - 0x10], 0
je 0x41727b
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x417256
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x417261
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x41727e
cmp ebx, dword [ebp + 0xc]
jne 0x417266
cmp byte [ebp - 1], 0xa
jne 0x417266
mov byte [ebx], 0xa
jmp 0x41727e
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00418a8d
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x41727f
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x4171d7
jmp 0x41729d
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x41729d
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x4172bc
and dword [0x4a8040], 0
mov dword [0x4a803c], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x417349
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x425258]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x425298]
je 0x41737e
inc eax
cmp eax, 0x13
jb 0x41736f
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x425298]
jne 0x4174a4
mov eax, dword [0x4a8094]
cmp eax, 1
je 0x41747c
cmp eax, edx
jne 0x4173ae
cmp dword [0x425220], 1
je 0x41747c
cmp ecx, 0xfc
je 0x4174a4
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4173e4
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00416500
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00412800
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x417418
mov eax, edi
push eax
call fcn.00412800
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x421768
push edi
call fcn.0041b2a0
add esp, 0x10
push edi
call fcn.00412800
push dword [esi + 0x42529c]
mov ebx, eax
call fcn.00412800
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00410e00
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00416500
push edi
push ebx
call fcn.00416510
push 0x421748
push ebx
call fcn.00416510
push dword [esi + 0x42529c]
push ebx
call fcn.00416510
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0041b1a1
add esp, 0x2c
jmp 0x4174a4
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x42529c]
push dword [esi]
call fcn.00412800
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.004163e4
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x417979
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x4a82fc]
push ebx
push ebp
mov ebp, dword [0x425cfc]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x4179c2
call ebp
mov esi, eax
cmp esi, ebx
je 0x4179a8
mov dword [0x4a82fc], 1
jmp 0x4179c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x4179bd
push 2
pop eax
mov dword [0x4a82fc], eax
jmp 0x4179c2
mov eax, dword [0x4a82fc]
cmp eax, 1
jne 0x417a1f
cmp esi, ebx
jne 0x4179da
call ebp
mov esi, eax
cmp esi, ebx
jne 0x4179da
xor eax, eax
jmp 0x417ac6
cmp word [esi], bx
mov eax, esi
je 0x4179ef
inc eax
inc eax
cmp word [eax], bx
jne 0x4179e1
inc eax
inc eax
cmp word [eax], bx
jne 0x4179e1
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.004127c7
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x417a12
xor edi, edi
push esi
call dword [0x425cec]
mov eax, edi
jmp 0x417ac6
push ebp
push esi
push edi
call fcn.00412890
add esp, 0xc
jmp 0x417a04
cmp eax, 2
je 0x417a28
cmp eax, ebx
jne 0x4179d3
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x4179d3
cmp byte [ebp], bl
mov esi, ebp
je 0x417a5e
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [0x425d20]
cmp eax, ebx
je 0x4179d3
push esi
add edi, eax
call fcn.00412800
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x417a3b
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.004127c7
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x417ad7
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x417ab8
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x10]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [0x425d20]
test eax, eax
je 0x417acd
push edi
call fcn.00412800
push esi
lea edi, [edi + eax + 1]
call fcn.00410e3d
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x417a7e
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x10]
call fcn.00414049
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x4179d3
Function at 0x417ae3
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x4a8300]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x417b23
call esi
test eax, eax
je 0x417b08
mov dword [0x4a8300], 1
jmp 0x417b28
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x417b1f
mov dword [0x4a8300], 2
jmp 0x417b31
xor eax, eax
jmp 0x417b7f
cmp eax, 1
jne 0x417b2c
call esi
jmp 0x417b7f
cmp eax, 2
jne 0x417b1f
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [0x425d20]
push ebp
push ebp
push 0xffffffffffffffff
mov ebx, eax
push ebx
push 1
push ebp
call edi
mov esi, eax
cmp esi, ebp
je 0x417b77
lea eax, [esi + esi]
push eax
call fcn.004127c7
mov ebp, eax
test ebp, ebp
pop ecx
je 0x417b77
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x417b7b
push ebp
call fcn.00414049
pop ecx
xor eax, eax
jmp 0x417b7d
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret
Function at 0x418b19
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x4a97c8]
mov eax, dword [0x425258]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x418cdf
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x4a97e0]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x418cdf
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x418b83
xor eax, eax
jmp 0x418cf3
test al, 0x20
je 0x418b94
push 2
push edi
push edi
push ecx
call fcn.0041b668
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x418c69
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x418cb0
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x418bf6
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x418be7
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x418bc9
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x418c36
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x418c42
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x418bbd
jmp 0x418c44
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x418cda
cmp dword [ebp + 0x3a4], edi
je 0x418cb0
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x418ca2
mov dword [0x4a8040], eax
jmp 0x418ce6
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x418c94
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x418c44
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x418c44
push dword [ebp + 0x3a4]
call fcn.0041a980
pop ecx
jmp 0x418cf0
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x418cc8
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x418b7c
mov dword [0x4a803c], 0x1c
mov dword [0x4a8040], edi
jmp 0x418cf0
sub eax, dword [ebp - 0x7c]
jmp 0x418cf3
and dword [0x4a8040], 0
mov dword [0x4a803c], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.004163e4
add ebp, 0x39c
leave
ret
Function at 0x419cb5
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00410e00
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x419d50
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x4a8048]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x419d50
cmp eax, 1
je 0x419d71
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x419d50
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x419d1d
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x419d4c
xor eax, eax
inc eax
jmp 0x419d90
cmp edi, eax
jae 0x419d54
xor eax, eax
jmp 0x419d90
cmp eax, esi
jae 0x419d5b
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4a8048]
jmp 0x419d74
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41b3c4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x41b3f2
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x41b3f9
cmp ebx, dword [eax + 4]
jae 0x41b3f9
xor eax, eax
jmp 0x41b5e9
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x41b40a
xor eax, eax
inc eax
jmp 0x41b5e8
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x41b420
cmp ecx, edx
jae 0x41b565
cmp dword [eax + 4], 0
je 0x41b429
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x41b411
cmp dword [ebp + 8], 0
je 0x41b44b
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x41b565
cmp eax, esi
jae 0x41b565
mov eax, dword [0x4a8418]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x41b470
cmp dword [esi*4 + 0x4a8420], edi
je 0x41b569
inc esi
cmp esi, eax
jl 0x41b45e
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41b5e5
cmp dword [ebp - 8], 0x1000000
jne 0x41b5e5
test byte [ebp - 0xc], 0xcc
je 0x41b4ee
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x41b5e5
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x41b5e5
cmp word [eax + 0x18], 0x10b
jne 0x41b5e5
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x41b5e5
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x41b4ee
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x41b4ee
test byte [ecx + 0x27], 0x80
jne 0x41b565
push 1
push 0x4a8460
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x41b402
mov ecx, dword [0x4a8418]
test ecx, ecx
mov edx, ecx
jle 0x41b522
lea eax, [ecx*4 + 0x4a841c]
cmp dword [eax], edi
je 0x41b522
dec edx
sub eax, 4
test edx, edx
jg 0x41b516
test edx, edx
jne 0x41b553
push 0xf
pop ebx
cmp ecx, ebx
jg 0x41b52f
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x41b547
lea eax, [edx*4 + 0x4a8420]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x41b535
cmp ecx, 0x10
jge 0x41b553
inc ecx
mov dword [0x4a8418], ecx
push 0
push 0x4a8460
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x41b402
xor eax, eax
jmp 0x41b5e8
test esi, esi
jle 0x41b402
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4a8460
call ebx
test eax, eax
jne 0x41b402
cmp dword [esi*4 + 0x4a8420], edi
je 0x41b5bf
mov eax, dword [0x4a8418]
lea esi, [eax - 1]
test esi, esi
jl 0x41b5ad
cmp dword [esi*4 + 0x4a8420], edi
je 0x41b5a9
dec esi
jns 0x41b59d
test esi, esi
jge 0x41b5bd
cmp eax, 0x10
jge 0x41b5b8
inc eax
mov dword [0x4a8418], eax
lea esi, [eax - 1]
jmp 0x41b5bf
je 0x41b5d7
xor ecx, ecx
test esi, esi
jl 0x41b5d7
lea eax, [ecx*4 + 0x4a8420]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x41b5c5
push 0
push 0x4a8460
call ebx
jmp 0x41b402
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41c38c
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00410e00
mov eax, dword [0x425258]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x4a97c8]
mov dword [ebp - 4], eax
jae 0x41c4cf
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x4a97e0]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x41c4cf
push 1
push esi
push ebx
call fcn.00418a8d
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x41c4d9
push 2
push esi
push ebx
call fcn.00418a8d
add esp, 0xc
cmp eax, 0xffffffff
je 0x41c4d9
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x41c479
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00419870
push 0x8000
push ebx
call fcn.0041c8ff
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x41c438
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.00418b19
add esp, 0xc
cmp eax, 0xffffffff
je 0x41c456
sub edi, eax
test edi, edi
jg 0x41c42d
jmp 0x41c46c
cmp dword [0x4a8040], 5
jne 0x41c469
mov dword [0x4a803c], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0041c8ff
pop ecx
pop ecx
jmp 0x41c4b9
jge 0x41c4b9
push 0
push dword [ebp + 0xc]
push ebx
call fcn.00418a8d
push ebx
call fcn.0041ab6d
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x41c4b9
mov dword [0x4a803c], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4a8040], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.00418a8d
add esp, 0xc
mov eax, esi
pop edi
jmp 0x41c4dc
mov dword [0x4a803c], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.004163e4
leave
ret
Function at 0x41d1b7
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x41d1d0
or eax, 0xffffffff
jmp 0x41d231
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x41d22d
push 0x3d
push esi
call fcn.0041d3b7
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x41d22d
cmp esi, eax
je 0x41d22d
xor ecx, ecx
cmp byte [eax + 1], bl
mov eax, dword [0x4a8068]
sete cl
cmp eax, dword [0x4a806c]
mov dword [ebp - 8], ecx
jne 0x41d213
mov edi, eax
call fcn.0041d156
mov dword [0x4a8068], eax
cmp eax, ebx
jne 0x41d26c
cmp dword [ebp + 0xc], ebx
je 0x41d235
cmp dword [0x4a8070], ebx
je 0x41d235
call fcn.0041c86f
test eax, eax
je 0x41d26c
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
je 0x41d23e
xor eax, eax
jmp 0x41d230
push 4
call fcn.004127c7
cmp eax, ebx
pop ecx
mov dword [0x4a8068], eax
je 0x41d22d
mov dword [eax], ebx
cmp dword [0x4a8070], ebx
jne 0x41d26c
push 4
call fcn.004127c7
cmp eax, ebx
pop ecx
mov dword [0x4a8070], eax
je 0x41d22d
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
sub edi, dword [ebp - 4]
push dword [ebp - 4]
mov esi, dword [0x4a8068]
call fcn.0041d109
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x41d2cd
cmp dword [esi], ebx
je 0x41d2cd
lea esi, [esi + edi*4]
push dword [esi]
call fcn.00414049
cmp dword [ebp - 8], ebx
pop ecx
jne 0x41d2b0
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x41d30e
mov eax, dword [esi + 4]
mov dword [esi], eax
inc edi
add esi, 4
cmp dword [esi], ebx
jne 0x41d2a7
mov eax, edi
shl eax, 2
push eax
push dword [0x4a8068]
call fcn.00416219
cmp eax, ebx
pop ecx
pop ecx
je 0x41d30e
jmp 0x41d309
cmp dword [ebp - 8], ebx
jne 0x41d379
cmp edi, ebx
jge 0x41d2dc
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x4a8068]
call fcn.00416219
cmp eax, ebx
pop ecx
pop ecx
je 0x41d22d
mov edx, dword [ebp - 4]
lea ecx, [eax + edi*4]
mov dword [ecx], edx
mov dword [ecx + 4], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov dword [0x4a8068], eax
cmp dword [ebp + 0xc], ebx
je 0x41d363
push dword [ebp - 4]
call fcn.00412800
inc eax
inc eax
push eax
call fcn.004127c7
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x41d363
push dword [ebp - 4]
push esi
call fcn.00416500
mov eax, esi
sub eax, dword [ebp - 4]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
mov ecx, dword [ebp - 8]
mov byte [eax], bl
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x41d35c
or dword [ebp - 0x10], 0xffffffff
push esi
call fcn.00414049
pop ecx
cmp dword [ebp - 8], ebx
je 0x41d371
push dword [ebp - 4]
call fcn.00414049
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x41d230
push dword [ebp - 4]
call fcn.00414049
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
jmp 0x41d23a
Function at 0x4ad01b84
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and word [0x4ad2ba20], 0
push ebx
push esi
mov ebx, 0x2000
push ebx
mov esi, 0x4ad2ba20
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4ad045ba
mov eax, esi
pop esi
pop ebx
pop ebp
ret 4
cmp byte [0x4ad2fa64], 0
push edi
je 0x4ad0465a
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x4ad34190
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x4ad12de5
push 0x4ad34294
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x4ad0b0d9
push 0x4ad341c4
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x4ad12df1
push 0x4ad04674
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x4ad12df8
push 0x4ad34248
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x4ad12e03
push 0x4ad3439c
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x4ad12e0f
push 0x4ad04664
push dword [ebp + 8]
call edi
test eax, eax
pop ecx
pop ecx
je 0x4ad12e27
xor eax, eax
pop edi
jmp 0x4ad01bb2
push dword [0x4ad2fa20]
push 0x4ad102d4
push esi
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
mov eax, esi
jmp 0x4ad0465c
push eax
push esi
call fcn.4ad01555
jmp 0x4ad0b0ee
push 2
jmp 0x4ad0b0df
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jmp 0x4ad0465c
push ebx
push esi
push 1
push eax
call fcn.4ad0e537
jmp 0x4ad12e19
push ebx
push esi
push 1
push eax
call fcn.4ad0e2eb
and word [eax*2 + 0x4ad2ba20], 0
jmp 0x4ad0b0ee
call dword [sym.imp.msvcrt.dll_rand]
push eax
jmp 0x4ad0b0df