joyce8/EMBER2024-capa huggingface dataset:
Function at 0x417063
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 [0x4a9728]
push edi
jae 0x417238
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x4a9740]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x417238
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x41710e
test dl, 2
jne 0x41710e
test dl, 0x48
je 0x4170d8
cmp byte [eax + 5], 0xa
je 0x4170d8
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 0x417121
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x417109
mov dword [0x4a7f98], ecx
jmp 0x41723f
cmp eax, 0x6d
jne 0x417115
xor eax, eax
jmp 0x41724c
push eax
call fcn.0041a910
pop ecx
jmp 0x417249
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x417233
test eax, eax
je 0x417148
cmp byte [ebx], 0xa
jne 0x417148
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x417151
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 0x41722d
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x41721d
cmp al, 0xd
je 0x417183
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x41720f
dec ecx
cmp dword [ebp - 8], ecx
jae 0x41719d
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x417198
add dword [ebp - 8], 2
jmp 0x4171f1
mov dword [ebp - 8], eax
jmp 0x41720b
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 0x4171c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41720b
cmp dword [ebp - 0x10], 0
je 0x41720b
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4171e6
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4171f1
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x41720e
cmp ebx, dword [ebp + 0xc]
jne 0x4171f6
cmp byte [ebp - 1], 0xa
jne 0x4171f6
mov byte [ebx], 0xa
jmp 0x41720e
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00418a1d
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x41720f
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x417167
jmp 0x41722d
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x41722d
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 0x41724c
and dword [0x4a7f98], 0
mov dword [0x4a7f94], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4172d9
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4251b8]
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 + 0x4251f8]
je 0x41730e
inc eax
cmp eax, 0x13
jb 0x4172ff
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4251f8]
jne 0x417434
mov eax, dword [0x4a7fec]
cmp eax, 1
je 0x41740c
cmp eax, edx
jne 0x41733e
cmp dword [0x425180], 1
je 0x41740c
cmp ecx, 0xfc
je 0x417434
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 0x417374
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00416490
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00412790
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4173a8
mov eax, edi
push eax
call fcn.00412790
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x421750
push edi
call fcn.0041b230
add esp, 0x10
push edi
call fcn.00412790
push dword [esi + 0x4251fc]
mov ebx, eax
call fcn.00412790
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00410d90
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00416490
push edi
push ebx
call fcn.004164a0
push 0x421730
push ebx
call fcn.004164a0
push dword [esi + 0x4251fc]
push ebx
call fcn.004164a0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0041b131
add esp, 0x2c
jmp 0x417434
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4251fc]
push dword [esi]
call fcn.00412790
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.00416374
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x417909
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x4a8254]
push ebx
push ebp
mov ebp, dword [0x425c5c]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x417952
call ebp
mov esi, eax
cmp esi, ebx
je 0x417938
mov dword [0x4a8254], 1
jmp 0x417957
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x41794d
push 2
pop eax
mov dword [0x4a8254], eax
jmp 0x417952
mov eax, dword [0x4a8254]
cmp eax, 1
jne 0x4179af
cmp esi, ebx
jne 0x41796a
call ebp
mov esi, eax
cmp esi, ebx
jne 0x41796a
xor eax, eax
jmp 0x417a56
cmp word [esi], bx
mov eax, esi
je 0x41797f
inc eax
inc eax
cmp word [eax], bx
jne 0x417971
inc eax
inc eax
cmp word [eax], bx
jne 0x417971
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.00412757
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x4179a2
xor edi, edi
push esi
call dword [0x425c4c]
mov eax, edi
jmp 0x417a56
push ebp
push esi
push edi
call fcn.00412820
add esp, 0xc
jmp 0x417994
cmp eax, 2
je 0x4179b8
cmp eax, ebx
jne 0x417963
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x417963
cmp byte [ebp], bl
mov esi, ebp
je 0x4179ee
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [0x425c80]
cmp eax, ebx
je 0x417963
push esi
add edi, eax
call fcn.00412790
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x4179cb
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.00412757
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x417a67
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x417a48
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 [0x425c80]
test eax, eax
je 0x417a5d
push edi
call fcn.00412790
push esi
lea edi, [edi + eax + 1]
call fcn.00410dcd
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x417a0e
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.00413fd9
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x417963
Function at 0x417a73
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x4a8258]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x417ab3
call esi
test eax, eax
je 0x417a98
mov dword [0x4a8258], 1
jmp 0x417ab8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x417aaf
mov dword [0x4a8258], 2
jmp 0x417ac1
xor eax, eax
jmp 0x417b0f
cmp eax, 1
jne 0x417abc
call esi
jmp 0x417b0f
cmp eax, 2
jne 0x417aaf
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [0x425c80]
push ebp
push ebp
push 0xffffffffffffffff
mov ebx, eax
push ebx
push 1
push ebp
call edi
mov esi, eax
cmp esi, ebp
je 0x417b07
lea eax, [esi + esi]
push eax
call fcn.00412757
mov ebp, eax
test ebp, ebp
pop ecx
je 0x417b07
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x417b0b
push ebp
call fcn.00413fd9
pop ecx
xor eax, eax
jmp 0x417b0d
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret
Function at 0x418aa9
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x4a9728]
mov eax, dword [0x4251b8]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x418c6f
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x4a9740]
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 0x418c6f
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x418b13
xor eax, eax
jmp 0x418c83
test al, 0x20
je 0x418b24
push 2
push edi
push edi
push ecx
call fcn.0041b5f8
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x418bf9
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x418c40
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x418b86
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x418b77
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 0x418b59
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 0x418bc6
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x418bd2
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x418b4d
jmp 0x418bd4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x418c6a
cmp dword [ebp + 0x3a4], edi
je 0x418c40
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x418c32
mov dword [0x4a7f98], eax
jmp 0x418c76
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 0x418c24
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x418bd4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x418bd4
push dword [ebp + 0x3a4]
call fcn.0041a910
pop ecx
jmp 0x418c80
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x418c58
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x418b0c
mov dword [0x4a7f94], 0x1c
mov dword [0x4a7f98], edi
jmp 0x418c80
sub eax, dword [ebp - 0x7c]
jmp 0x418c83
and dword [0x4a7f98], 0
mov dword [0x4a7f94], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00416374
add ebp, 0x39c
leave
ret
Function at 0x419c45
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.00410d90
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x419ce0
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 [0x4a7fa0]
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 0x419ce0
cmp eax, 1
je 0x419d01
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 0x419ce0
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x419cad
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x419cdc
xor eax, eax
inc eax
jmp 0x419d20
cmp edi, eax
jae 0x419ce4
xor eax, eax
jmp 0x419d20
cmp eax, esi
jae 0x419ceb
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 [0x4a7fa0]
jmp 0x419d04
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 0x41b354
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 0x41b382
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 0x41b389
cmp ebx, dword [eax + 4]
jae 0x41b389
xor eax, eax
jmp 0x41b579
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x41b39a
xor eax, eax
inc eax
jmp 0x41b578
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x41b3b0
cmp ecx, edx
jae 0x41b4f5
cmp dword [eax + 4], 0
je 0x41b3b9
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x41b3a1
cmp dword [ebp + 8], 0
je 0x41b3db
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x41b4f5
cmp eax, esi
jae 0x41b4f5
mov eax, dword [0x4a8370]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x41b400
cmp dword [esi*4 + 0x4a8378], edi
je 0x41b4f9
inc esi
cmp esi, eax
jl 0x41b3ee
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x41b575
cmp dword [ebp - 8], 0x1000000
jne 0x41b575
test byte [ebp - 0xc], 0xcc
je 0x41b47e
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x41b575
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x41b575
cmp word [eax + 0x18], 0x10b
jne 0x41b575
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x41b575
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x41b47e
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x41b47e
test byte [ecx + 0x27], 0x80
jne 0x41b4f5
push 1
push 0x4a83b8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x41b392
mov ecx, dword [0x4a8370]
test ecx, ecx
mov edx, ecx
jle 0x41b4b2
lea eax, [ecx*4 + 0x4a8374]
cmp dword [eax], edi
je 0x41b4b2
dec edx
sub eax, 4
test edx, edx
jg 0x41b4a6
test edx, edx
jne 0x41b4e3
push 0xf
pop ebx
cmp ecx, ebx
jg 0x41b4bf
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x41b4d7
lea eax, [edx*4 + 0x4a8378]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x41b4c5
cmp ecx, 0x10
jge 0x41b4e3
inc ecx
mov dword [0x4a8370], ecx
push 0
push 0x4a83b8
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x41b392
xor eax, eax
jmp 0x41b578
test esi, esi
jle 0x41b392
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4a83b8
call ebx
test eax, eax
jne 0x41b392
cmp dword [esi*4 + 0x4a8378], edi
je 0x41b54f
mov eax, dword [0x4a8370]
lea esi, [eax - 1]
test esi, esi
jl 0x41b53d
cmp dword [esi*4 + 0x4a8378], edi
je 0x41b539
dec esi
jns 0x41b52d
test esi, esi
jge 0x41b54d
cmp eax, 0x10
jge 0x41b548
inc eax
mov dword [0x4a8370], eax
lea esi, [eax - 1]
jmp 0x41b54f
je 0x41b567
xor ecx, ecx
test esi, esi
jl 0x41b567
lea eax, [ecx*4 + 0x4a8378]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x41b555
push 0
push 0x4a83b8
call ebx
jmp 0x41b392
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41c31c
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00410d90
mov eax, dword [0x4251b8]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x4a9728]
mov dword [ebp - 4], eax
jae 0x41c45f
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x4a9740]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x41c45f
push 1
push esi
push ebx
call fcn.00418a1d
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x41c469
push 2
push esi
push ebx
call fcn.00418a1d
add esp, 0xc
cmp eax, 0xffffffff
je 0x41c469
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x41c409
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00419800
push 0x8000
push ebx
call fcn.0041c88f
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x41c3c8
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.00418aa9
add esp, 0xc
cmp eax, 0xffffffff
je 0x41c3e6
sub edi, eax
test edi, edi
jg 0x41c3bd
jmp 0x41c3fc
cmp dword [0x4a7f98], 5
jne 0x41c3f9
mov dword [0x4a7f94], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0041c88f
pop ecx
pop ecx
jmp 0x41c449
jge 0x41c449
push 0
push dword [ebp + 0xc]
push ebx
call fcn.00418a1d
push ebx
call fcn.0041aafd
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 0x41c449
mov dword [0x4a7f94], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4a7f98], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.00418a1d
add esp, 0xc
mov eax, esi
pop edi
jmp 0x41c46c
mov dword [0x4a7f94], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00416374
leave
ret
Function at 0x41d147
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 0x41d160
or eax, 0xffffffff
jmp 0x41d1c1
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x41d1bd
push 0x3d
push esi
call fcn.0041d347
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x41d1bd
cmp esi, eax
je 0x41d1bd
xor ecx, ecx
cmp byte [eax + 1], bl
mov eax, dword [0x4a7fc0]
sete cl
cmp eax, dword [0x4a7fc4]
mov dword [ebp - 8], ecx
jne 0x41d1a3
mov edi, eax
call fcn.0041d0e6
mov dword [0x4a7fc0], eax
cmp eax, ebx
jne 0x41d1fc
cmp dword [ebp + 0xc], ebx
je 0x41d1c5
cmp dword [0x4a7fc8], ebx
je 0x41d1c5
call fcn.0041c7ff
test eax, eax
je 0x41d1fc
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
je 0x41d1ce
xor eax, eax
jmp 0x41d1c0
push 4
call fcn.00412757
cmp eax, ebx
pop ecx
mov dword [0x4a7fc0], eax
je 0x41d1bd
mov dword [eax], ebx
cmp dword [0x4a7fc8], ebx
jne 0x41d1fc
push 4
call fcn.00412757
cmp eax, ebx
pop ecx
mov dword [0x4a7fc8], eax
je 0x41d1bd
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
sub edi, dword [ebp - 4]
push dword [ebp - 4]
mov esi, dword [0x4a7fc0]
call fcn.0041d099
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x41d25d
cmp dword [esi], ebx
je 0x41d25d
lea esi, [esi + edi*4]
push dword [esi]
call fcn.00413fd9
cmp dword [ebp - 8], ebx
pop ecx
jne 0x41d240
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x41d29e
mov eax, dword [esi + 4]
mov dword [esi], eax
inc edi
add esi, 4
cmp dword [esi], ebx
jne 0x41d237
mov eax, edi
shl eax, 2
push eax
push dword [0x4a7fc0]
call fcn.004161a9
cmp eax, ebx
pop ecx
pop ecx
je 0x41d29e
jmp 0x41d299
cmp dword [ebp - 8], ebx
jne 0x41d309
cmp edi, ebx
jge 0x41d26c
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x4a7fc0]
call fcn.004161a9
cmp eax, ebx
pop ecx
pop ecx
je 0x41d1bd
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 [0x4a7fc0], eax
cmp dword [ebp + 0xc], ebx
je 0x41d2f3
push dword [ebp - 4]
call fcn.00412790
inc eax
inc eax
push eax
call fcn.00412757
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x41d2f3
push dword [ebp - 4]
push esi
call fcn.00416490
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 0x41d2ec
or dword [ebp - 0x10], 0xffffffff
push esi
call fcn.00413fd9
pop ecx
cmp dword [ebp - 8], ebx
je 0x41d301
push dword [ebp - 4]
call fcn.00413fd9
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x41d1c0
push dword [ebp - 4]
call fcn.00413fd9
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
jmp 0x41d1ca
Function at 0x401393
Capabilities:
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
and dword [ebp - 8], 0
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x30], 0x9e3779b9
push edi
lea ecx, [ebp - 8]
mov dword [ebp - 0x34], esi
mov eax, dword [esi]
mov edi, dword [esi + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [0x41a308]
mov dword [ebp - 0x24], eax
mov eax, dword [0x41a30c]
mov dword [ebp - 0x2c], eax
call fcn.0040138c
mov eax, dword [0x41a314]
add dword [ebp - 8], 0x23f
mov esi, dword [0x41a310]
push 0x20
mov dword [ebp - 0x20], eax
pop ebx
mov dword [ebp - 0x18], 2
add dword [ebp - 0x18], 3
mov eax, dword [ebp - 0x14]
shl eax, 4
add eax, esi
mov dword [ebp - 0x1c], 0xedeb2e40
cmp dword [0x8597a8], 0xfa9
mov dword [ebp - 4], eax
mov eax, dword [0x8597a4]
cmove eax, dword [ebp - 0x1c]
and dword [ebp - 0x1c], 0
cmp dword [0x8597a8], 0x3eb
mov dword [0x8597a4], eax
mov eax, dword [0x859230]
cmove eax, dword [ebp - 0x1c]
mov dword [0x859230], eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
shr eax, 5
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x20]
xor eax, dword [ebp - 0x1c]
xor eax, dword [ebp - 4]
sub edi, eax
mov dword [ebp - 0xc], eax
mov eax, edi
mov dword [0x8597a0], 0xf4ea3dee
shl eax, 4
mov dword [ebp - 0x28], edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x24]
add dword [ebp - 4], eax
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 8]
add dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x28]
nop
add dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x18]
mov eax, edi
shr eax, cl
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
xor eax, dword [ebp - 0x1c]
cmp dword [0x8597a8], 0xb03
mov dword [ebp - 4], eax
jne 0x4014c0
push str.Poh_petopanoz_fonoso_culowisuvekocamoc
push edx
push edx
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
mov eax, dword [ebp - 4]
xor eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
sub dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x30]
sub dword [ebp - 8], eax
dec ebx
jne 0x4013e4
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x14]
mov dword [esi + 4], edi
pop edi
mov dword [esi], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret