joyce8/EMBER2024-capa huggingface dataset:
Function at 0xc67d51
Capabilities:
Resolve function by parsing pe exports

Disassembly:
jmp 0xc7fd2b
sub esp, 0x24
mov eax, dword [0xce2154]
xor eax, esp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x34]
xor ebx, ebx
mov dword [esp + 0xc], eax
push edi
mov eax, dword [esi + 0x3c]
mov ebp, dword [eax + esi + 0x78]
add ebp, esi
mov edi, dword [ebp + 0x20]
mov eax, dword [ebp + 0x18]
add edi, esi
mov dword [esp + 0x14], eax
test eax, eax
je 0xc7fd99
mov eax, dword [edi]
lea ecx, [esp + 0x18]
add eax, esi
push eax
call fcn.00c684d6
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
call fcn.00c6a5fb
pop ecx
pop ecx
test al, al
jne 0xc7fdb0
lea ecx, [esp + 0x18]
add edi, 4
call fcn.00c6a57e
inc ebx
cmp ebx, dword [esp + 0x14]
jb 0xc7fd64
xor esi, esi
mov ecx, dword [esp + 0x30]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00c699ad
add esp, 0x24
ret
mov eax, dword [ebp + 0x24]
lea eax, [eax + ebx*2]
movzx ecx, word [eax + esi]
mov eax, dword [ebp + 0x1c]
lea eax, [eax + ecx*4]
mov esi, dword [eax + esi]
lea ecx, [esp + 0x18]
call fcn.00c6a57e
jmp 0xc7fd9b

Function at 0xc6a7b3
Capabilities:
Encode data using xor

Disassembly:
jmp 0xc807aa
push esi
xor esi, esi
cmp dword [esp + 0xc], esi
jbe 0xc8089e
push ebx
push ebp
push edi
mov edi, dword [esp + 0x14]
mov ebp, 0xce54f8
mov bl, byte [esi + edi]
push 0xcc75c8
push ebp
call fcn.00c69660
xor edx, edx
mov eax, esi
div dword [esp + 0x24]
pop ecx
pop ecx
push 0xc21f3c
push 0xcc75d4
mov bh, byte [edx + section..euro]
push 0xce55e0
xor bh, bl
call fcn.00c69660
pop ecx
pop ecx
mov ecx, eax
call fcn.00c6c70c
mov bl, byte [esi + edi]
push 0xc21f3c
push 0xcc75e4
push ebp
call fcn.00c69660
pop ecx
pop ecx
mov ecx, eax
call fcn.00c6c70c
add byte [esi + edi], bh
push 0xc21f3c
push 0xcc75f8
push ebp
call fcn.00c69660
pop ecx
pop ecx
mov ecx, eax
call fcn.00c6c70c
dec byte [esi + edi]
push 0xcc7618
push ebp
call fcn.00c69660
add byte [esi + edi], 0xfe
push 0xcc7624
push ebp
call fcn.00c69660
sub byte [esi + edi], bl
push 0xcc7638
push ebp
call fcn.00c69660
inc byte [esi + edi]
push 0xcc7648
push ebp
call fcn.00c69660
inc byte [esi + edi]
push 0xcc7654
push ebp
call fcn.00c69660
inc byte [esi + edi]
push 0xcc7660
push ebp
call fcn.00c69660
add esp, 0x30
inc esi
cmp esi, dword [esp + 0x18]
jb 0xc807c3
pop edi
pop ebp
pop ebx
pop esi
ret

Function at 0xc6cb1c
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
jmp 0xc7fdf6
push esi
push edi
mov edi, dword fs:[0x30]
mov edi, dword [edi + 0xc]
mov esi, dword [edi + 0xc]
mov eax, dword [esi]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov dword [0xd15f88], eax
pop edi
pop esi
ret
Function at 0x4018c0
Capabilities:
Check if file exists
Get file attributes
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
push 0x100
push 0x4426b0
push str.VIRTUAL_ENV
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
cmp edi, 0x100
jb 0x401910
lea ecx, [edi*2 + 2]
push ecx
call fcn.0040e190
mov esi, eax
add esp, 4
test esi, esi
je 0x401aa9
push edi
push esi
push str.VIRTUAL_ENV
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x40191d
test edi, edi
je 0x4019b1
mov esi, 0x4426b0
cmp word [esi], 0
je 0x4019b1
push esi
push str.Checking_for_Python_executable_in_virtual_env__ls_n
call fcn.00401130
push str.python.exe
push esi
push str._lsScripts_ls
push 0xffffffffffffffff
push 0x104
push 0x481de0
call fcn.004010b0
add esp, 0x20
push 0x481de0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x481de0
cmp eax, 0xffffffff
jne 0x401975
push str.Python_executable__ls_missing_from_virtual_env_n
call fcn.00401130
add esp, 8
jmp 0x4019b1
mov eax, dword [0x42889c]
imul esi, eax, 0x424
inc eax
mov dword [0x42889c], eax
push 0x104
add esi, 0x4288a0
lea eax, [esi + 0x14]
push eax
call fcn.0040d0de
push str.venv
push 8
push esi
mov dword [esi + 0x10], 0
call fcn.0040d0de
add esp, 0x18
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_IsWow64Process]
push eax
call edi
test eax, eax
je 0x401a14
cmp dword [ebp - 4], 0
je 0x401a14
push str.locating_Pythons_in_64bit_registry_n
call fcn.00401130
push 0
push 0
push 0x20119
mov edx, str.SOFTWAREPythonPythonCore
mov ecx, 0x80000001
call fcn.00401230
push 0
push 0
push 0x20119
mov edx, str.SOFTWAREPythonPythonCore
mov ecx, 0x80000002
call fcn.00401230
add esp, 0x1c
push str.locating_Pythons_in_native_registry_n
call fcn.00401130
push 0
push 0
push 0x20019
mov edx, str.SOFTWAREPythonPythonCore
mov ecx, 0x80000001
call fcn.00401230
push 0
push 0
push 0x20019
mov edx, str.SOFTWAREPythonPythonCore
mov ecx, 0x80000002
call fcn.00401230
add esp, 0x1c
mov dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
call esi
push eax
call edi
pop edi
pop esi
test eax, eax
je 0x401a88
cmp dword [ebp - 8], 0
je 0x401a88
push 1
push 0x40
push 0x20119
mov edx, str.SOFTWAREMicrosoftAppModelLookasideuserSoftwarePythonPythonCore
mov ecx, 0x80000002
call fcn.00401230
add esp, 0xc
push 0x401850
push 0x424
push dword [0x42889c]
push 0x4288a0
call fcn.0040d2c0
add esp, 0x10
mov esp, ebp
pop ebp
ret
push str.Could_not_allocate_environment_buffer
push 0x68
call fcn.00401180
int3
Function at 0x401ba0
Capabilities:
Query environment variable
Read .ini file

Disassembly:
push ebx
push esi
push edi
push str.pythonX
push str.py__ls
push 0xffffffffffffffff
push 0x400
push 0x4815e0
mov ebx, str.environment
call fcn.004010b0
add esp, 0x14
push 0x100
push 0x4426b0
push 0x4815e0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
cmp edi, 0x100
jb 0x401c11
lea ecx, [edi*2 + 2]
push ecx
call fcn.0040e190
mov esi, eax
add esp, 4
test esi, esi
je 0x401cc3
push edi
push esi
push 0x4815e0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
jmp 0x401ca9
test edi, edi
jne 0x401ca4
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor esi, esi
cmp word [0x4428b0], si
je 0x401c56
push 0x4428b0
push 0x400
push 0x4815e0
push esi
push str.pythonX
push str.defaults
call edi
test eax, eax
je 0x401c56
mov esi, 0x4815e0
mov ebx, 0x4428b0
jmp 0x401ca9
cmp word [0x428690], si
je 0x401c8c
push 0x428690
push 0x400
push 0x4815e0
push 0
push str.pythonX
push str.defaults
call edi
test eax, eax
je 0x401c8c
mov esi, 0x4815e0
mov ebx, 0x428690
jmp 0x401ca9
push str.pythonX
push str.found_no_configured_value_for__ls_n
call fcn.00401130
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
ret
mov esi, 0x4426b0
push ebx
push esi
push str.pythonX
push str.found_configured_value__ls_ls_in__ls_n
call fcn.00401130
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
ret
push str.Could_not_allocate_environment_buffer
push 0x68
call fcn.00401180
int3
Function at 0x401e90
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xdc
mov eax, dword [0x427004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
push edi
push str.run_child:_about_to_run__ls_n
call fcn.00401130
add esp, 8
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateJobObjectA]
mov esi, eax
lea eax, [ebp - 0x7c]
push eax
push 0x70
lea eax, [ebp - 0x78]
push eax
push 9
push esi
call dword [sym.imp.KERNEL32.dll_QueryInformationJobObject]
test eax, eax
je 0x40205a
cmp dword [ebp - 0x7c], 0x70
jne 0x40205a
test esi, esi
je 0x40205a
or dword [ebp - 0x68], 0x3000
lea eax, [ebp - 0x78]
push 0x70
push eax
push 9
push esi
call dword [sym.imp.KERNEL32.dll_SetInformationJobObject]
test eax, eax
jne 0x401f15
push str.Job_information_setting_failed
push 0x65
call fcn.00401180
push 0x44
lea eax, [ebp - 0xd8]
push 0
push eax
call fcn.00404b10
add esp, 0xc
lea eax, [ebp - 0xd8]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff6
call ebx
lea edx, [ebp - 0xa0]
mov ecx, eax
call fcn.00401df0
test eax, eax
jne 0x401f5c
push str.stdin_duplication_failed
push 0x64
call fcn.00401180
push 0xfffffffffffffff5
call ebx
lea edx, [ebp - 0x9c]
mov ecx, eax
call fcn.00401df0
test eax, eax
jne 0x401f7d
push str.stdout_duplication_failed
push 0x64
call fcn.00401180
push 0xfffffffffffffff4
call ebx
lea edx, [ebp - 0x98]
mov ecx, eax
call fcn.00401df0
test eax, eax
jne 0x401f9e
push str.stderr_duplication_failed
push 0x64
call fcn.00401180
push 1
push 0x401e50
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test eax, eax
jne 0x401fbb
push str.control_handler_setting_failed
push 0x65
call fcn.00401180
lea eax, [ebp - 0x8c]
mov dword [ebp - 0xac], 0x100
push eax
lea eax, [ebp - 0xd8]
push eax
push 0
push 0
push 0
push 1
push 0
push 0
push edi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x401ff9
push edi
push str.Unable_to_create_process_using__ls
push 0x65
call fcn.00401180
push dword [ebp - 0x8c]
push esi
call dword [sym.imp.KERNEL32.dll_AssignProcessToJobObject]
push dword [ebp - 0x88]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0xffffffffffffffff
push dword [ebp - 0x8c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0x8c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x402042
push str.Failed_to_get_exit_code_of_process
push 0x65
call fcn.00401180
push dword [ebp - 0x7c]
push str.child_process_exit_code:__d_n
call fcn.00401130
add esp, 8
push dword [ebp - 0x7c]
call fcn.00407361
push str.Job_information_querying_failed
push 0x65
call fcn.00401180
int3
Function at 0x4023b0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004
call fcn.0041c330
mov eax, dword [0x427004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1004]
push edi
mov ebx, ecx
push ebx
push 0x400
push eax
push 0
push 0
push str.commands
call esi
cmp eax, 0x3ff
jne 0x4023ff
push ebx
push str.read_commands:__ls:_not_enough_space_for_names_n
call fcn.00401130
add esp, 8
cmp word [ebp - 0x1004], 0
lea edi, [ebp - 0x1004]
je 0x402514
push ebx
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0
push edi
push str.commands
call esi
cmp eax, 0x3ff
jne 0x402440
push edi
push ebx
push str.read_commands:__ls:_not_enough_space_for__ls_n
call fcn.00401130
add esp, 0xc
mov ax, word [ebp - 0x804]
lea esi, [ebp - 0x804]
test ax, ax
je 0x402475
movzx ecx, ax
movzx eax, cx
push eax
call fcn.0040dc50
add esp, 4
test eax, eax
je 0x402475
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x402455
jmp 0x4024e6
cmp word [esi], 0
je 0x4024e6
mov ecx, edi
call fcn.00402280
mov esi, eax
test esi, esi
jne 0x4024bb
mov eax, dword [0x481fe8]
cmp eax, 0x64
jl 0x4024a9
lea eax, [ebp - 0x804]
push eax
push edi
push 0x423a10
call fcn.00401130
add esp, 0xc
jmp 0x4024e6
imul esi, eax, 0xa08
add esi, 0x442ac0
inc eax
mov dword [0x481fe8], eax
push 0xffffffffffffffff
push edi
push 0x104
push esi
call fcn.0040e269
push 0xffffffffffffffff
lea eax, [ebp - 0x804]
push eax
lea eax, [esi + 0x208]
push 0x400
push eax
call fcn.0040e269
add esp, 0x20
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4024f0
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
sub ecx, edx
sar ecx, 1
lea edi, [edi + ecx*2]
add edi, 2
cmp word [edi], ax
jne 0x402413
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040373f
mov esp, ebp
pop ebp
ret
Function at 0x403730
Capabilities:
Accept command line arguments
Check if file exists
Get common file path
Get file attributes
Get file version info
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
pop ebp
jmp fcn.00403140

Function at 0x40721b
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40725a
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40725a
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40725a
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40725a
cmp dword [ecx + 0x74], 0xe
jbe 0x40725a
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x411674
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41ec8c
push 0x41ec84
push str.FlsAlloc
push 0x1f
call fcn.00411552
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4116a8
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d188]
call esi
jmp 0x4116ae
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4116f2
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41ec9c
push 0x41ec94
push str.FlsGetValue
push 0x21
call fcn.00411552
mov esi, eax
add esp, 0x10
test esi, esi
je 0x411729
push dword [ebp + 8]
mov ecx, esi
call dword [0x41d188]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x411731
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41eca4
push 0x41ec9c
push str.FlsSetValue
push 0x22
call fcn.00411552
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41176b
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x41d188]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x413002
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x428350]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x413042
cmp byte [ebx], 0xa
jne 0x413042
or byte [edi + eax + 0x28], 4
jmp 0x413047
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x413146
mov dl, byte [eax]
cmp dl, 0x1a
je 0x413129
inc eax
cmp dl, 0xd
je 0x413073
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x413099
cmp eax, ecx
jae 0x4130a7
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x41305b
jmp 0x413146
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x413124
cmp dword [ebp - 0x10], 0
je 0x413124
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x428350]
test byte [eax + edi + 0x28], 0x48
je 0x4130fe
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4130e9
mov byte [esi], dl
jmp 0x4130fa
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x428350]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x413146
cmp byte [ebp - 1], 0xa
jne 0x41310d
cmp esi, ebx
jne 0x41310d
mov byte [esi], 0xa
jmp 0x413145
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00418a01
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x413146
mov byte [esi], 0xd
jmp 0x413145
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x428350]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x413143
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x413146
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41314f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x428350]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x413195
cmp word [ebx], dx
jne 0x413195
or byte [eax + edi + 0x28], 4
jmp 0x41319a
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x4132fd
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x4132dd
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4131db
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x413211
cmp eax, edx
jae 0x41321f
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x4131b6
jmp 0x4132fd
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4132d8
cmp dword [ebp - 0x18], 0
je 0x4132d8
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x428350]
test byte [eax + edi + 0x28], 0x48
je 0x4132ae
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x413272
mov word [esi], cx
jmp 0x4132a9
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x428350]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x428350]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x428350]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x4132fd
pop eax
cmp word [ebp - 4], ax
jne 0x4132be
cmp esi, ebx
jne 0x4132be
mov word [esi], ax
jmp 0x4132fa
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00418a01
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4132fd
push 0xd
pop eax
jmp 0x4132b9
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x428350]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x4132f7
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x4132fd
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x413da0
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x427004]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x413deb
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00413f3b
test al, al
jne 0x413de5
sub edx, 2
cmp edx, edi
jne 0x413dcb
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x413e0d
lea eax, [edi + 2]
cmp edx, eax
je 0x413e0d
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00413cec
add esp, 0x10
jmp 0x413f07
push esi
lea ecx, [ebp - 0x255]
call fcn.00413f3b
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x413e50
push dword [ebp - 0x25c]
jmp 0x413dfd
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x413e8d
cmp word [ebp - 0x226], 0
je 0x413eae
cmp word [ebp - 0x226], ax
jne 0x413e8d
cmp word [ebp - 0x224], 0
je 0x413eae
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00413cec
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x413efa
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x413e67
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x413ee2
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x413f07
push 0x413b1c
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.0040d2c0
add esp, 0x10
jmp 0x413ed7
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040373f
leave
ret

Function at 0x414a43
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x414a54
pop esi
ret
push ebx
push edi
push esi
call fcn.00414a0c
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0040f814
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x414a7c
push ebx
push esi
push edi
call fcn.00405590
add esp, 0xc
push 0
call fcn.0040f7da
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x414e4c
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00414a91
Function at 0x41a4c5
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.0041a441
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x41a634
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x41a634
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x41a5e9
jg 0x41a521
test eax, eax
je 0x41a5df
push 1
push 0x1000
call fcn.004113dc
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x41a544
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x41a5d6
push 0x8000
push ebx
call fcn.0040eb7c
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x41a56d
jg 0x41a568
cmp ecx, 0x1000
jb 0x41a56d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0041245e
add esp, 0x10
cmp eax, 0xffffffff
je 0x41a5b2
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x41a568
jl 0x41a599
test ecx, ecx
jne 0x41a55a
push dword [ebp - 0xc]
push ebx
call fcn.0040eb7c
push esi
call fcn.0040f7da
add esp, 0xc
xor ebx, ebx
jmp 0x41a642
cmp byte [edi + 0x24], 0
je 0x41a5c9
cmp dword [edi + 0x20], 5
jne 0x41a5c9
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x41a5d4
mov ebx, dword [edi + 0x18]
jmp 0x41a5d6
xor ebx, ebx
push esi
call fcn.0040f7da
pop ecx
jmp 0x41a642
test ecx, ecx
jg 0x41a5ab
jl 0x41a5e9
test eax, eax
jae 0x41a5ab
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00418a01
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x41a609
cmp byte [edi + 0x1c], 0
je 0x41a5ab
jmp 0x41a63a
push ebx
call fcn.00415221
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x41a5ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x41a642
cmp byte [edi + 0x1c], 0
je 0x41a63f
mov ebx, dword [edi + 0x18]
jmp 0x41a642
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00418a01
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret