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

Disassembly:
push ebp
push ebx
push edi
push esi
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x40b10c
xor ebp, ebp
jmp 0x40b042
push 0x50
push 1
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
add esp, 8
test eax, eax
je 0x40b0db
mov esi, eax
push eax
push edi
push ebx
call fcn.0042ce90
add esp, 0xc
mov dword [esi + 4], edi
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
add dword [esi + 0x38], eax
mov eax, dword [esp + 0x24]
adc dword [esi + 0x3c], eax
add ebp, 1
cmp ebp, 3
je 0x40b10c
cmp ebp, 2
jne 0x40b065
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
cmp dword [eax + 0x4c], 0
je 0x40b10c
movzx eax, word [eax + 0x58]
cmp eax, 0x81
jb 0x40b10c
mov ebx, dword [ecx + ebp*4 + 4]
test ebx, ebx
je 0x40b036
xor edi, edi
cmp ebp, 2
je 0x40b08a
cmp ebp, 1
je 0x40b0a4
test ebp, ebp
jne 0x40b0b5
mov ecx, dword [esp + 0x18]
movzx eax, word [ecx + 2]
mov edi, dword [ecx + 0x78]
jmp 0x40b0b0
mov eax, dword [esp + 0x18]
cmp word [eax + 0x80], 0x20
jb 0x40b0b5
mov eax, dword [esp + 0x18]
mov edi, dword [eax + 0x9c]
jmp 0x40b0b5
mov ecx, dword [esp + 0x18]
movzx eax, word [ecx + 0x18]
movzx edi, word [ecx + 0x7a]
shl edi, 0x10
or edi, eax
push edi
push ebx
call fcn.0042cc90
add esp, 8
test eax, eax
je 0x40b000
mov esi, dword [eax + 0x14]
test esi, esi
mov ecx, dword [esp + 0x14]
jne 0x40b028
jmp 0x40b036
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push str.get_dq
push 0x175
push str.external_e2fsprogs_lib_support_mkquota.c
push str._ERROR___s:_d:_s:_Unable_to_allocate_dquot_n
push eax
call fcn.0040afc0
add esp, 0x14
mov ecx, dword [esp + 0x14]
jmp 0x40b036
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40c390
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
mov edi, edx
mov ebx, ecx
push 0x1c
push 1
call sub.api_ms_win_crt_heap_l1_1_0.dll_calloc
add esp, 8
test eax, eax
je 0x40c3fa
mov esi, eax
mov dword [eax], 0xaaca6019
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov ebp, eax
add ebp, 1
cmp byte [ebx], 0x7e
mov dword [esp + 4], edi
jne 0x40c404
mov dword [esp], 0
cmp byte [ebx + 1], 0x2f
jne 0x40c40b
push str.HOME
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x40c40b
mov edi, eax
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
add ebp, eax
mov dword [esp], edi
jmp 0x40c40b
mov edi, 0xc
jmp 0x40c4a4
mov dword [esp], 0
push ebp
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test eax, eax
je 0x40c43a
mov edi, eax
mov eax, dword [esp]
test eax, eax
je 0x40c44d
push eax
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
add esp, 8
add ebx, 1
push ebx
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
add esp, 8
jmp 0x40c458
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov edi, dword [eax]
jmp 0x40c4a4
push ebp
push ebx
push edi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov dword [esi + 4], edi
push str._default_
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
je 0x40c49c
mov ecx, esi
call fcn.0040d800
test eax, eax
je 0x40c49c
mov edi, eax
mov ecx, dword [esi + 0x14]
test ecx, ecx
je 0x40c486
call fcn.0040c6d0
push dword [esi + 4]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
jmp 0x40c4a4
mov eax, dword [esp + 4]
mov dword [eax], esi
xor edi, edi
mov eax, edi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x412ab0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
push eax
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
test cl, 3
je 0x412ace
test ebx, ebx
jne 0x412c2c
mov esi, ebx
and esi, 7
cmp ebx, 8
jae 0x412ae8
add ecx, 0xfffffffc
test esi, esi
jne 0x412b7d
jmp 0x412c24
mov edi, ebx
shr edi, 3
and ebx, 0xfffffff8
mov dword [esp], ebx
xor ebx, ebx
nop word cs:[eax + eax]
nop
xor eax, dword [ecx + ebx*8]
movzx edx, al
movzx ebp, ah
mov ebp, dword [ebp*4 + 0x493410]
xor ebp, dword [edx*4 + 0x493810]
mov edx, eax
shr edx, 0xe
and edx, 0x3fc
shr eax, 0x18
xor ebp, dword [edx + 0x493010]
xor ebp, dword [eax*4 + 0x492c10]
mov edx, dword [ecx + ebx*8 + 4]
movzx eax, dl
xor ebp, dword [eax*4 + 0x492810]
movzx eax, dh
xor ebp, dword [eax*4 + 0x492410]
mov eax, edx
shr eax, 0xe
and eax, 0x3fc
xor ebp, dword [eax + 0x492010]
shr edx, 0x18
mov eax, ebp
xor eax, dword [edx*4 + 0x491c10]
add ebx, 1
cmp edi, ebx
jne 0x412b00
mov edx, dword [esp]
add ecx, edx
add ecx, 0xfffffffc
test esi, esi
je 0x412c24
movzx edx, byte [ecx + 4]
movzx edi, al
xor edi, edx
shr eax, 8
xor eax, dword [edi*4 + 0x491c10]
cmp esi, 1
je 0x412c24
movzx edx, byte [ecx + 5]
movzx edi, al
xor edi, edx
shr eax, 8
xor eax, dword [edi*4 + 0x491c10]
cmp esi, 2
je 0x412c24
movzx edx, byte [ecx + 6]
movzx edi, al
xor edi, edx
shr eax, 8
xor eax, dword [edi*4 + 0x491c10]
cmp esi, 3
je 0x412c24
movzx edx, byte [ecx + 7]
movzx edi, al
xor edi, edx
shr eax, 8
xor eax, dword [edi*4 + 0x491c10]
cmp esi, 4
je 0x412c24
movzx edx, byte [ecx + 8]
movzx edi, al
xor edi, edx
shr eax, 8
xor eax, dword [edi*4 + 0x491c10]
cmp esi, 5
je 0x412c24
movzx edx, byte [ecx + 9]
movzx edi, al
xor edi, edx
shr eax, 8
xor eax, dword [edi*4 + 0x491c10]
cmp esi, 6
je 0x412c24
movzx ecx, byte [ecx + 0xa]
movzx edx, al
xor edx, ecx
shr eax, 8
xor eax, dword [edx*4 + 0x491c10]
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
lea edx, [ecx + 1]
movzx esi, byte [ecx]
movzx edi, al
xor edi, esi
shr eax, 8
xor eax, dword [edi*4 + 0x491c10]
mov esi, ebx
add esi, 0xffffffff
je 0x412cb5
mov edi, edx
and edi, 3
je 0x412cb5
lea edx, [ecx + 2]
movzx esi, byte [ecx + 1]
movzx edi, al
xor edi, esi
shr eax, 8
xor eax, dword [edi*4 + 0x491c10]
mov esi, ebx
add esi, 0xfffffffe
je 0x412cb5
mov edi, edx
and edi, 3
je 0x412cb5
lea edx, [ecx + 3]
movzx esi, byte [ecx + 2]
movzx edi, al
xor edi, esi
shr eax, 8
xor eax, dword [edi*4 + 0x491c10]
mov esi, ebx
add esi, 0xfffffffd
je 0x412cb5
mov edi, edx
and edi, 3
je 0x412cb5
movzx edx, byte [ecx + 3]
add ecx, 4
movzx esi, al
xor esi, edx
shr eax, 8
xor eax, dword [esi*4 + 0x491c10]
add ebx, 0xfffffffc
jmp 0x412ace
mov ecx, edx
mov ebx, esi
jmp 0x412ace
Function at 0x4189b0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x60
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x10], xmm0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp], 0
sub esp, 0x1c
movaps xmm0, xmmword [0x495ce0]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x418a52
mov esi, eax
lea edi, [esp + 0xc]
lea eax, [esp + 0x30]
push 0
push edi
push 0x20
push eax
push 0x20
push eax
push 0x74004
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x418a59
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
jmp 0x418aaa
mov eax, 9
jmp 0x418acf
lea eax, [esp + 0x10]
push 0
push edi
push 0x18
push eax
push 0x18
push eax
push 0x70000
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x418a95
mov ecx, dword [esp + 0x20]
imul ecx, dword [esp + 0x24]
imul ecx, dword [esp + 0x1c]
mov eax, ecx
mul dword [esp + 0x10]
mov edi, dword [esp + 0x14]
imul edi, ecx
add edx, edi
jmp 0x418aaa
mov eax, esp
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x418ac6
mov eax, dword [esp]
mov edx, dword [esp + 4]
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov ebx, ecx
sar ebx, 0x1f
push ebx
push ecx
push edx
push eax
call fcn.00434a60
add esp, 0x10
mov dword [edi + 4], edx
mov dword [edi], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x41b840
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x440
mov esi, dword [ebp + 0xc]
push str.EXT2FS_PRETEND_RO_MOUNT
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x41b88a
mov dword [esi], 5
push str.EXT2FS_PRETEND_ROOTFS
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
xor ecx, ecx
test eax, eax
sete cl
lea eax, [ecx + ecx*2]
add eax, 2
mov dword [esi], eax
jmp 0x41ba0f
push str.EXT2FS_PRETEND_RW_MOUNT
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x41b8c0
mov dword [esi], 1
push str.EXT2FS_PRETEND_ROOTFS
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
cmp eax, 1
mov eax, 2
sbb eax, 0
mov dword [esi], eax
jmp 0x41ba0f
lea ebx, [esp + 0x3c]
push 0x400
push 0
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
movaps xmmword [esp + 0x10], xmm0
movaps xmmword [esp], xmm0
mov eax, esp
push eax
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat32i64]
add esp, 8
xor edi, edi
test eax, eax
jne 0x41b90f
movzx eax, word [esp + 6]
and eax, 0xf000
cmp eax, 0x3000
jne 0x41b90f
mov edi, dword [esp + 0x10]
push 0x495db1
push str._proc_swaps
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
test eax, eax
je 0x41ba06
mov esi, eax
push eax
push 0x400
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
test eax, eax
je 0x41b9fd
cmp byte [esp + 0x3c], 0
je 0x41b95d
push 9
push str.Filename_t
push ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x41b974
push esi
push 0x400
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
add esp, 0xc
test eax, eax
je 0x41b9fd
push 0x20
push ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
add esp, 8
test eax, eax
je 0x41b986
mov byte [eax], 0
push 9
push ebx
call sub.api_ms_win_crt_private_l1_1_0.dll_strchr
add esp, 8
test eax, eax
je 0x41b998
mov byte [eax], 0
push dword [ebp + 8]
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
je 0x41b9d4
test edi, edi
je 0x41b95d
mov eax, esp
push eax
push ebx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat32i64]
add esp, 8
test eax, eax
jne 0x41b95d
movzx eax, word [esp + 6]
and eax, 0xf000
cmp eax, 0x3000
jne 0x41b95d
cmp edi, dword [esp + 0x10]
jne 0x41b95d
mov edi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
mov eax, dword [ebp + 0xc]
mov dword [eax], 9
push edi
push str._swap_
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strncpy
add esp, 0xc
jmp 0x41ba0f
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
mov eax, dword [ebp + 0xc]
mov dword [eax], 0
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x41eda0
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, dword [esp + 0x14]
test byte [eax + 0xa], 4
je 0x41eea9
mov ebp, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
movaps xmm0, xmmword [str._________________b_b_b_b_b_b_b_b_b_b_b_b_b_b_b_bE2FSPROGS_SKIP_PROGRESS]
movups xmmword [0x4b756f], xmm0
movups xmmword [0x4b7560], xmm0
movups xmmword [0x4b7550], xmm0
movups xmmword [0x4b7540], xmm0
movups xmmword [0x4b7530], xmm0
mov byte [0x4b757f], 0
movaps xmm0, xmmword [0x495e00]
movups xmmword [0x4b7580], xmm0
movups xmmword [0x4b7590], xmm0
movups xmmword [0x4b75a0], xmm0
movups xmmword [0x4b75b0], xmm0
movups xmmword [0x4b75bf], xmm0
mov byte [0x4b75cf], 0
xorps xmm0, xmm0
movups xmmword [edi], xmm0
push 0x495e10
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x41ee3e
mov dword [edi + 0xc], 1
mov ebx, dword [esp + 0x1c]
mov dword [edi], esi
mov dword [edi + 4], ebp
xor ecx, ecx
test esi, esi
je 0x41ee71
mov ebp, 0xcccccccd
nop word cs:[eax + eax]
nop dword [eax]
mov eax, esi
mul ebp
shr edx, 3
add ecx, 1
cmp esi, 9
mov esi, edx
ja 0x41ee60
mov dword [edi + 8], ecx
test ebx, ebx
je 0x41ee9f
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push 1
call esi
add esp, 4
push eax
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fputs
add esp, 8
push 1
call esi
add esp, 4
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fflush
add esp, 4
mov dword [0x4b75d0], 0
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4215d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x14
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xc], 0
mov eax, 0x7f2bb705
cmp dword [ecx], 0x7f2bb705
jne 0x4217ba
mov edx, dword [ecx + 0x58]
mov eax, 0x7f2bb706
cmp dword [edx], 0x7f2bb706
jne 0x4217ba
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x38]
mov ebp, dword [esp + 0x34]
test byte [edx + 8], 0x20
jne 0x42168d
cmp ebp, 5
mov dword [esp], edx
jb 0x42169e
xor eax, eax
mov esi, 0x34
jmp 0x421641
mov eax, ebx
add esi, 0x18
cmp esi, 0xf4
je 0x42179f
mov ebx, eax
movzx eax, byte [edx + esi]
test al, 2
je 0x421630
mov ecx, eax
and cl, 0xfd
mov byte [edx + esi], cl
test al, 1
je 0x421630
mov ecx, dword [esp + 0x28]
mov edx, dword [esp]
mov eax, dword [esp]
push dword [eax + esi - 0x14]
push 1
mov eax, dword [esp + 8]
push dword [eax + esi - 8]
mov eax, dword [esp + 0xc]
push dword [eax + esi - 0xc]
call fcn.00421d80
mov edx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
jne 0x421632
and byte [edx + esi], 0xfe
jmp 0x421630
push edi
push ebp
push ebx
push esi
call fcn.00421d80
add esp, 0x24
jmp 0x4217bd
mov ecx, dword [ecx + 0x1c]
xor eax, eax
mov dword [esp + 4], ecx
test cl, 1
je 0x4216c3
mov ecx, dword [esp + 0x28]
mov edx, dword [esp]
push edi
push ebp
push ebx
push esi
call fcn.00421d80
mov edx, dword [esp + 0x10]
add esp, 0x10
test ebp, ebp
je 0x4217ba
mov dword [esp + 0x10], eax
mov eax, dword [esp + 4]
and al, 1
mov dword [esp + 4], eax
add ebp, 1
jmp 0x421708
movzx eax, byte [esi + 0x14]
and al, 0xfe
add al, byte [esp + 4]
xor al, 1
mov byte [esi + 0x14], al
mov esi, dword [esp + 8]
add esi, 1
adc ebx, 0
add edi, dword [ecx + 0xc]
add ebp, 0xffffffff
cmp ebp, 1
jle 0x4217b6
mov ecx, edx
mov dword [esp + 8], esi
mov edx, esi
lea esi, [esp + 0xc]
push esi
push ebx
call fcn.004222b0
mov edx, dword [esp + 8]
add esp, 8
mov esi, eax
test eax, eax
jne 0x421777
mov esi, dword [esp + 0xc]
movzx eax, byte [esi + 0x14]
mov ecx, eax
not cl
test cl, 3
jne 0x42175a
mov ecx, dword [esp + 0x28]
mov edx, dword [esp]
push dword [esi]
push 1
push dword [esi + 0xc]
push dword [esi + 8]
call fcn.00421d80
mov edx, dword [esp + 0x10]
add esp, 0x10
movzx eax, byte [esi + 0x14]
and al, 0xfc
or al, 2
mov byte [esi + 0x14], al
mov eax, dword [esp + 8]
mov dword [esi + 8], eax
mov dword [esi + 0xc], ebx
mov eax, dword [edx + 0x10]
add eax, 1
mov dword [edx + 0x10], eax
mov dword [esi + 0x10], eax
mov eax, dword [esi]
cmp eax, edi
mov ecx, dword [esp + 0x28]
je 0x4216e0
push dword [ecx + 0xc]
push edi
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0xc]
add esp, 0xc
jmp 0x4216e0
test eax, eax
mov ecx, dword [esp + 0x28]
jne 0x4217ba
push edi
push ebp
push dword [esp + 0x38]
push dword [esp + 0x38]
jmp 0x421691
mov eax, dword [esp + 0x10]
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4235b0
Capabilities:
Query environment variable

Disassembly:
push esi
push eax
mov dword [esp], 0
mov esi, dword [0x4b7608]
test esi, 0x8000
jne 0x42367f
push str.COMERR_DEBUG
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x423608
mov ecx, esp
push 0
push ecx
push eax
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtoul
add esp, 0xc
mov dword [0x4b7608], eax
mov eax, dword [esp]
cmp byte [eax], 0
jne 0x423675
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 0
jne 0x423675
mov esi, dword [0x4b7608]
or esi, 0x8000
mov dword [0x4b7608], esi
cmp esi, 0x8000
je 0x42367f
push str.COMERR_DEBUG_FILE
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x423646
push 0x496060
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
mov dword [0x4b760c], eax
test eax, eax
jne 0x42366a
jmp 0x42364f
mov eax, dword [0x4b760c]
test eax, eax
jne 0x42366a
push 0x496060
push str._dev_tty
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
mov dword [0x4b760c], eax
test eax, eax
je 0x423675
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__fileno
add esp, 8
pop esi
ret
mov dword [0x4b7608], 0x8000
add esp, 4
pop esi
ret

Function at 0x423d50
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
mov dword [esp + 0xc], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov dword [esp], 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0043b830
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
lea esi, [esi]
Function at 0x423db0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x3c
mov eax, dword [0x4b79a0]
test eax, eax
jle 0x423ec0
mov edx, dword [0x4b79a4]
xor ebx, ebx
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x423de1
mov edi, dword [edx + 0x10]
add ecx, dword [edi + 8]
cmp esi, ecx
jb 0x423e5a
add ebx, 1
add edx, 0x14
cmp ebx, eax
jne 0x423dd0
mov dword [esp], esi
call fcn.0043b990
test eax, eax
mov edi, eax
je 0x423ee7
lea esi, [ebx + ebx*4]
mov ebx, dword [0x4b79a4]
shl esi, 2
add ebx, esi
mov dword [ebx + 0x10], eax
mov dword [ebx], 0
call fcn.0043ba80
add eax, dword [edi + 0xc]
mov dword [ebx + 0xc], eax
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [0x4b79a4]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + esi + 0xc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x423ec7
mov eax, dword [ebp - 0x20]
cmp eax, 0x40
jne 0x423e62
add dword [0x4b79a0], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 4
je 0x423e53
cmp eax, 0x80
je 0x423e53
cmp eax, 8
je 0x423e53
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x28]
add esi, dword [0x4b79a4]
mov dword [esi + 4], eax
mov dword [esi + 8], edx
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x423e53
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00423d50
nop
lea esi, [esi]
xor ebx, ebx
jmp 0x423deb
mov eax, dword [0x4b79a4]
mov eax, dword [eax + esi + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00423d50
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00423d50
mov esi, esi
lea edi, [edi]
Function at 0x4248a0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x12c
mov ebx, dword [ebp + 8]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
test ebx, ebx
mov dword [eax], 0
je 0x424a4e
cmp byte [ebx], 0
je 0x424a18
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
sub esp, 4
cmp eax, 0xffffffff
je 0x424a30
test al, 0x10
je 0x424a18
lea edi, [ebp - 0x11c]
mov dword [esp + 4], ebx
mov ebx, edi
mov dword [esp + 8], 0x104
mov dword [esp], edi
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__fullpath
mov edx, dword [ebx]
add ebx, 4
lea eax, [edx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x424904
mov edx, eax
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea edx, [ebx + 2]
cmove ebx, edx
add al, al
sbb ebx, 3
sub ebx, edi
lea eax, [ebx + 0x233]
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
test eax, eax
mov esi, eax
je 0x424a3f
lea edx, [eax + 0x22c]
lea eax, [ebx + 1]
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [ebp - 0x12c], edx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edx, dword [ebp - 0x12c]
cmp byte [esi + 0x22c], 0
je 0x424993
movzx eax, byte [esi + ebx + 0x22b]
cmp al, 0x2f
je 0x424993
cmp al, 0x5c
je 0x424993
mov edi, 0x5c
mov word [edx + ebx], di
mov eax, edx
mov ecx, dword [eax]
add eax, 4
lea edx, [ecx - 0x1010101]
not ecx
and edx, ecx
and edx, 0x80808080
je 0x424995
mov ecx, edx
shr ecx, 0x10
test edx, 0x8080
cmove edx, ecx
lea ecx, [eax + 2]
cmove eax, ecx
add dl, dl
sbb eax, 3
mov edx, 0x2a
mov word [eax], dx
xor ecx, ecx
xor eax, eax
lea edx, [esi + 0x120]
xor ebx, ebx
mov word [esi + 0x11c], cx
mov edi, edx
mov ecx, 0x41
mov dword [esi + 0x224], 0xffffffff
mov dword [esi + 0x228], 0
mov dword [esi + 0x118], 0
mov word [esi + 0x11e], bx
rep stosd dword es:[edi], eax
mov eax, esi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [eax], 0x14
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [eax], 2
xor eax, eax
jmp 0x424a10
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [eax], 0xc
xor eax, eax
jmp 0x424a10
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [eax], 0xe
xor eax, eax
jmp 0x424a10

Function at 0x425770
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
jmp fcn.00425170
Function at 0x431270
Capabilities:
Encode data using xor

Disassembly:
push ebx
push edi
push esi
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
test ebx, ebx
je 0x4312f4
mov ecx, dword [esp + 0x14]
test bl, 1
jne 0x431291
mov edx, ebx
cmp ebx, 1
jne 0x4312b1
jmp 0x4312f4
lea edx, [ebx - 1]
movzx esi, ah
movzx edi, byte [ecx]
add ecx, 1
movzx eax, al
xor eax, edi
movzx eax, word [eax + eax + 0x496b80]
xor eax, esi
cmp ebx, 1
je 0x4312f4
xor esi, esi
nop word cs:[eax + eax]
nop dword [eax]
movzx edi, al
shr eax, 8
movzx ebx, byte [ecx + esi]
xor edi, ebx
movzx edi, word [edi + edi + 0x496b80]
xor eax, edi
shr edi, 8
movzx ebx, byte [ecx + esi + 1]
movzx eax, al
xor eax, ebx
movzx eax, word [eax + eax + 0x496b80]
xor eax, edi
add esi, 2
cmp edx, esi
jne 0x4312c0
pop esi
pop edi
pop ebx
ret
Function at 0x43b8b0
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x43b8e8
xor edx, edx
nop
mov ecx, dword [eax + 0xc]
cmp ecx, ebx
ja 0x43b8de
add ecx, dword [eax + 8]
cmp ebx, ecx
jb 0x43b8ea
add edx, 1
add eax, 0x28
cmp edx, esi
jb 0x43b8d0
xor eax, eax
pop ebx
pop esi
ret