joyce8/EMBER2024-capa huggingface dataset:
Function at 0x436d10
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x404
call fcn.004403c0
mov eax, dword [0x470324]
xor eax, esp
mov dword [esp + 0x400], eax
push esi
mov esi, dword [esp + 0x40c]
push edi
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
push 5
push str.pass:
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x436d75
push 0x17b
lea eax, [esi + 5]
push str.apps_apps.c
push eax
call sub.libcrypto_1_1.dll_CRYPTO_strdup
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.004403ed
add esp, 0x404
ret
push 4
push str.env:
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x436dcc
add esi, 4
push esi
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
jne 0x436da2
push esi
push str.Cant_read_environment_variable__s_n
jmp 0x436f15
push 0x182
push str.apps_apps.c
push eax
call sub.libcrypto_1_1.dll_CRYPTO_strdup
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.004403ed
add esp, 0x404
ret
cmp dword [esp + 0x414], 0
je 0x436de3
mov eax, dword [0x471738]
test eax, eax
jne 0x436e7b
push 5
push str.file:
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x436e19
add esi, 5
push 0x44491c
push esi
call sub.libcrypto_1_1.dll_BIO_new_file
add esp, 8
mov dword [0x471738], eax
test eax, eax
jne 0x436e7b
push esi
push str.Cant_open_file__s_n
jmp 0x436f15
mov ecx, str.stdin
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x436e40
test dl, dl
je 0x436e3c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x436e40
add eax, 2
add ecx, 2
test dl, dl
jne 0x436e20
xor eax, eax
jmp 0x436e45
sbb eax, eax
or eax, 1
test eax, eax
jne 0x436f0f
push 0x8001
call fcn.00437de0
add esp, 4
mov dword [0x471738], eax
test eax, eax
jne 0x436e7b
push str.Cant_open_BIO_for_stdin_n
push dword [0x4703fc]
call sub.libcrypto_1_1.dll_BIO_printf
add esp, 8
jmp 0x436f23
push 0x400
lea ecx, [esp + 0xc]
push ecx
push eax
call sub.libcrypto_1_1.dll_BIO_gets
add esp, 0xc
mov esi, eax
cmp dword [esp + 0x414], 1
je 0x436eb2
push dword [0x471738]
call sub.libcrypto_1_1.dll_BIO_free_all
add esp, 4
mov dword [0x471738], 0
test esi, esi
jg 0x436ecb
push str.Error_reading_password_from_BIO_n
push dword [0x4703fc]
call sub.libcrypto_1_1.dll_BIO_printf
add esp, 8
jmp 0x436f23
lea eax, [esp + 8]
push 0xa
push eax
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
je 0x436ee1
mov byte [eax], 0
push 0x1ba
lea eax, [esp + 0xc]
push str.apps_apps.c
push eax
call sub.libcrypto_1_1.dll_CRYPTO_strdup
add esp, 0xc
pop edi
pop esi
mov ecx, dword [esp + 0x400]
xor ecx, esp
call fcn.004403ed
add esp, 0x404
ret
push esi
push str.Invalid_password_argument___s__n
push dword [0x4703fc]
call sub.libcrypto_1_1.dll_BIO_printf
add esp, 0xc
mov ecx, dword [esp + 0x408]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.004403ed
add esp, 0x404
ret
Function at 0x436f40
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, 0x20c
call fcn.004403c0
mov eax, dword [0x470324]
xor eax, esp
mov dword [esp + 0x208], eax
push ebx
mov ebx, dword [esp + 0x214]
push esi
mov esi, ebx
push edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x436f67
sub esi, ecx
lea edi, [esi + 1]
cmp edi, 0x104
ja 0x43706d
push 0x104
lea eax, [esp + 0x10]
push eax
push edi
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x43703f
test edi, edi
je 0x43703f
cmp edi, 0x20
jb 0x437026
lea edx, [esp + 0xc]
lea ecx, [esi + ebx]
lea edx, [edx + esi*2]
lea esi, [esp + 0xc]
cmp esi, ecx
ja 0x436fc0
cmp edx, ebx
jae 0x437026
mov ecx, edi
and ecx, 0xffffffe0
nop word [eax + eax]
movq xmm0, qword [ebx + eax]
punpcklbw xmm0, xmm0
psraw xmm0, 8
movups xmmword [esp + eax*2 + 0xc], xmm0
movq xmm0, qword [ebx + eax + 8]
punpcklbw xmm0, xmm0
psraw xmm0, 8
movups xmmword [esp + eax*2 + 0x1c], xmm0
movq xmm0, qword [ebx + eax + 0x10]
punpcklbw xmm0, xmm0
psraw xmm0, 8
movups xmmword [esp + eax*2 + 0x2c], xmm0
movq xmm0, qword [ebx + eax + 0x18]
punpcklbw xmm0, xmm0
psraw xmm0, 8
movups xmmword [esp + eax*2 + 0x3c], xmm0
add eax, 0x20
cmp eax, ecx
jb 0x436fd0
cmp eax, edi
jae 0x43703f
nop word [eax + eax]
movsx cx, byte [ebx + eax]
mov word [esp + eax*2 + 0xc], cx
inc eax
cmp eax, edi
jb 0x437030
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x43706d
pop edi
shr eax, 4
pop esi
and eax, 1
pop ebx
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.004403ed
add esp, 0x20c
ret
mov ecx, dword [esp + 0x214]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004403ed
add esp, 0x20c
ret

Function at 0x437320
Capabilities:
Terminate process

Disassembly:
push 0x3b6
push str.apps_apps.c
push dword [esp + 0xc]
call sub.libcrypto_1_1.dll_CRYPTO_malloc
add esp, 0xc
test eax, eax
jne 0x43736e
push dword [esp + 8]
push dword [esp + 8]
call fcn.00435930
push eax
push str._s:_Could_not_allocate__d_bytes_for__s_n
push dword [0x4703fc]
call sub.libcrypto_1_1.dll_BIO_printf
push dword [0x4703fc]
call sub.libcrypto_1_1.dll_ERR_print_errors
add esp, 0x18
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
ret
Function at 0x437550
Capabilities:
Query environment variable

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
test edi, edi
je 0x437620
mov ecx, 0x45a4a8
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x437586
test dl, dl
je 0x437582
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x437586
add eax, 2
add ecx, 2
test dl, dl
jne 0x437566
xor eax, eax
jmp 0x43758b
sbb eax, eax
or eax, 1
test eax, eax
je 0x437620
push dword [esp + 0x18]
mov ebx, dword [esp + 0x18]
push ebx
call fcn.004395e0
push eax
push edi
call sub.libcrypto_1_1.dll_BIO_new_file
add esp, 0x10
mov esi, eax
cmp dword [esp + 0x1c], 0
jne 0x4376bc
test esi, esi
jne 0x43770e
cmp bl, 0x61
je 0x4375e3
cmp bl, 0x72
je 0x4375dc
cmp bl, 0x77
mov esi, str._doing_something_
mov eax, str.writing
cmove esi, eax
jmp 0x4375e8
mov esi, str.reading
jmp 0x4375e8
mov esi, str.appending
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
push eax
push esi
push edi
push str.Cant_open__s_for__s___s_n
push dword [0x4703fc]
call sub.libcrypto_1_1.dll_BIO_printf
add esp, 0x18
push dword [0x4703fc]
call sub.libcrypto_1_1.dll_ERR_print_errors
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
ret
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
shr edi, 0xf
and edi, 1
mov eax, edi
shl eax, 4
push eax
cmp bl, 0x72
jne 0x437651
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call sub.libcrypto_1_1.dll_BIO_new_fp
add esp, 8
mov esi, eax
jmp 0x4376b5
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call sub.libcrypto_1_1.dll_BIO_new_fp
add esp, 8
mov esi, eax
test edi, edi
je 0x4376b5
push str.HARNESS_OSSL_PREFIX
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edi, eax
add esp, 4
test edi, edi
je 0x4376b5
mov eax, dword [0x471748]
test eax, eax
jne 0x437692
call fcn.0043e1d0
mov dword [0x471748], eax
push esi
push eax
call sub.libcrypto_1_1.dll_BIO_new
add esp, 4
push eax
call sub.libcrypto_1_1.dll_BIO_push
push edi
push 0
mov esi, eax
push 0x8000
push esi
call sub.libcrypto_1_1.dll_BIO_ctrl
add esp, 0x18
cmp dword [esp + 0x1c], 0
je 0x4376c7
call sub.libcrypto_1_1.dll_ERR_clear_error
pop edi
mov eax, esi
pop esi
pop ebx
ret
test esi, esi
jne 0x4376c1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
push eax
mov ecx, str.stdout
cmp bl, 0x72
mov eax, str.stdin
cmovne eax, ecx
push eax
push str.Cant_open__s___s_n
push dword [0x4703fc]
call sub.libcrypto_1_1.dll_BIO_printf
add esp, 0x14
push dword [0x4703fc]
call sub.libcrypto_1_1.dll_ERR_print_errors
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
ret
Function at 0x437e10
Capabilities:
Query environment variable

Disassembly:
push esi
mov esi, dword [esp + 8]
shr esi, 0xf
and esi, 1
mov eax, esi
push edi
shl eax, 4
push eax
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call sub.libcrypto_1_1.dll_BIO_new_fp
add esp, 8
mov edi, eax
test esi, esi
je 0x437e90
push ebx
push str.HARNESS_OSSL_PREFIX
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x437e8d
mov eax, dword [0x471748]
test eax, eax
jne 0x437e64
call fcn.0043e1d0
mov dword [0x471748], eax
push edi
push eax
call sub.libcrypto_1_1.dll_BIO_new
add esp, 4
push eax
call sub.libcrypto_1_1.dll_BIO_push
push ebx
push 0
mov esi, eax
push 0x8000
push esi
call sub.libcrypto_1_1.dll_BIO_ctrl
add esp, 0x18
mov eax, esi
pop ebx
pop edi
pop esi
ret
mov eax, edi
pop ebx
pop edi
pop esi
ret
Function at 0x43b050
Capabilities:
Enumerate files on windows

Disassembly:
mov eax, 0x25c
call fcn.004403c0
mov eax, dword [0x470324]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
mov ebx, dword [esp + 0x264]
xor eax, eax
push ebp
push esi
push edi
mov edi, dword [esp + 0x274]
xor ebp, ebp
test edi, edi
jle 0x43b098
movzx ecx, word [ebx + eax*2]
cmp ecx, 0x2f
je 0x43b090
cmp ecx, 0x5c
jne 0x43b093
lea ebp, [eax + 1]
inc eax
cmp eax, edi
jl 0x43b082
mov eax, ebp
cmp ebp, edi
jge 0x43b0b3
nop
movzx ecx, word [ebx + eax*2]
cmp ecx, 0x2a
je 0x43b0b3
cmp ecx, 0x3f
je 0x43b0b3
inc eax
cmp eax, edi
jl 0x43b0a0
cmp eax, edi
je 0x43b224
movzx esi, word [ebx + edi*2]
xor eax, eax
mov word [ebx + edi*2], ax
lea eax, [esp + 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x10], eax
mov word [ebx + edi*2], si
cmp eax, 0xffffffff
je 0x43b224
test ebp, ebp
je 0x43b101
push 0
push 0
push 0
push 0
push ebp
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
jmp 0x43b103
xor edi, edi
cmp word [esp + 0x44], 0x2e
jne 0x43b12b
mov ax, word [esp + 0x46]
test ax, ax
je 0x43b1fc
cmp ax, 0x2e
jne 0x43b12b
cmp word [esp + 0x48], 0
je 0x43b1fc
mov esi, dword [0x471754]
mov ecx, dword [0x47175c]
inc esi
cmp esi, ecx
jl 0x43b16f
mov eax, esi
sub eax, ecx
add ecx, 0x40
and eax, 0xffffffc0
add eax, ecx
mov dword [0x47175c], eax
shl eax, 2
push eax
push dword [0x471758]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
je 0x43b213
mov dword [0x471758], eax
jmp 0x43b174
mov eax, dword [0x471758]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
mov dword [eax + esi*4], 0
lea eax, [esp + 0x58]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [esp + 0x14], eax
lea ecx, [eax + edi]
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x43b213
test edi, edi
je 0x43b1c7
push 0
push 0
push edi
push esi
push ebp
push ebx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push dword [esp + 0x1c]
lea eax, [esi + edi]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x58]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [0x471754]
mov eax, dword [0x471758]
mov dword [eax + ecx*4], esi
inc ecx
mov dword [0x471754], ecx
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x43b103
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x43b226
xor eax, eax
mov ecx, dword [esp + 0x268]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004403ed
add esp, 0x25c
ret
Function at 0x43bdc0
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 0xc]
lea eax, [esi*2 + 1]
cmp eax, esi
jb 0x43be24
test eax, eax
js 0x43be24
push ebx
push str.TLSA_hex_data_buffer
push eax
call fcn.00437320
add esp, 8
mov ebx, eax
mov ecx, ebx
test esi, esi
je 0x43be1c
mov edx, dword [esp + 0xc]
push edi
mov edi, dword [str.0123456789abcdef]
movzx eax, byte [edx]
lea edx, [edx + 1]
shr eax, 4
movzx eax, byte [eax + edi]
mov byte [ecx], al
movzx eax, byte [edx - 1]
and eax, 0xf
movzx eax, byte [eax + edi]
mov byte [ecx + 1], al
add ecx, 2
sub esi, 1
jne 0x43bdf6
pop edi
mov eax, ebx
mov byte [ecx], 0
pop ebx
pop esi
ret
push esi
call fcn.00435930
push eax
push str._s:__zu_byte_buffer_too_large_to_hexencode_n
push dword [0x4703fc]
call sub.libcrypto_1_1.dll_BIO_printf
add esp, 0x10
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
Function at 0x408d66
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
je 0x408d7e
push dword [esp + 4]
push 0x408cff
call dword [sym.imp.USER32.dll_EnumWindows]
jmp 0x408dbb
push esi
mov esi, dword [0x48b6b8]
test esi, esi
je 0x408dba
push ebx
push edi
mov ebx, dword [esi]
lea edi, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi], eax
jne 0x408db2
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_EnableWindow]
push edi
push 0x48b6b8
call fcn.0040cc11
pop ecx
pop ecx
test ebx, ebx
mov esi, ebx
jne 0x408d8b
pop edi
pop ebx
pop esi
ret 4
Function at 0x40c0b4
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
push 9
call esi
test al, al
jns 0x40c122
push 0x11
call esi
test al, al
js 0x40c122
push 0x10
call esi
test al, al
js 0x40c122
push 0x12
call esi
test al, al
js 0x40c122
mov esi, dword [sym.imp.USER32.dll_GetFocus]
push 5
lea eax, [ebp - 8]
push eax
call esi
push eax
call dword [sym.imp.USER32.dll_GetClassNameA]
push 4
lea eax, [ebp - 8]
push str.Rich
push eax
call sub.MSVCRT.dll_strncmp
add esp, 0xc
test eax, eax
jne 0x40c122
push eax
push eax
push 0x44e
call esi
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
test ax, 0x800
je 0x40c146
push str.PB_WindowID
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetPropA]
test eax, eax
je 0x40c146
dec eax
push eax
push dword [0x48ba80]
call fcn.0040ca55
mov eax, dword [eax + 0xc]
jmp 0x40c148
xor eax, eax
pop esi
leave
ret 4

Function at 0x40c1f0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
xor eax, eax
cmp dword [esi + 0x14], eax
mov dword [esp + 4], eax
jne 0x40c225
mov ecx, dword [esi + 8]
sub ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push eax
lea eax, [esp + 8]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esi + 8]
mov eax, dword [esp + 4]
mov dword [esi + 0xc], ecx
pop esi
pop ecx
ret 4

Function at 0x40c4b0
Capabilities:
Write file on windows

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0x10]
xor eax, eax
test edi, edi
mov dword [esp + 4], eax
je 0x40c509
push esi
mov esi, dword [esp + 0x18]
test esi, esi
je 0x40c508
mov eax, dword [esp + 0x10]
mov ecx, dword [0x48ba90]
push eax
push ecx
call fcn.0040ca55
test eax, eax
je 0x40c504
cmp dword [eax + 4], 0
je 0x40c4f2
push esi
push edi
push eax
call fcn.0040c7e0
pop esi
pop edi
pop ecx
ret 0xc
mov eax, dword [eax]
push 0
lea edx, [esp + 0xc]
push edx
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop esi
pop edi
pop ecx
ret 0xc

Function at 0x40c510
Capabilities:
Get file size

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x48ba90]
push ebx
push esi
push edi
push eax
or edi, 0xffffffff
push ecx
or ebx, edi
call fcn.0040ca55
mov esi, eax
test esi, esi
je 0x40c56a
mov eax, dword [esi]
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov eax, dword [esp + 0x10]
xor edi, edi
xor edx, edx
or ecx, edx
or edi, eax
cmp dword [esi + 4], edx
je 0x40c560
cmp dword [esi + 0x14], edx
jne 0x40c560
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
cdq
add ecx, eax
adc edi, edx
mov edx, edi
pop edi
pop esi
mov eax, ecx
pop ebx
ret 4
mov eax, edi
pop edi
pop esi
mov edx, ebx
pop ebx
ret 4
Function at 0x40c580
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x48ba90]
push eax
push ecx
mov byte [esp + 0xb], 0
call fcn.0040ca55
test eax, eax
je 0x40c5ca
cmp dword [eax + 4], 0
lea edx, [esp + 3]
je 0x40c5b7
push 1
push edx
push eax
call fcn.0040c8d0
movzx eax, byte [esp + 3]
pop ecx
ret 4
mov eax, dword [eax]
push 0
lea ecx, [esp + 0xc]
push ecx
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, byte [esp + 3]
pop ecx
ret 4

Function at 0x40c5e0
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x48ba90]
push eax
push ecx
mov dword [esp + 8], 0
call fcn.0040ca55
test eax, eax
je 0x40c62a
cmp dword [eax + 4], 0
lea edx, [esp]
je 0x40c617
push 4
push edx
push eax
call fcn.0040c8d0
mov eax, dword [esp]
pop ecx
ret 4
mov eax, dword [eax]
push 0
lea ecx, [esp + 0xc]
push ecx
push 4
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp]
pop ecx
ret 4

Function at 0x40c640
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x48ba90]
push eax
push ecx
mov byte [esp + 0xb], 0
call fcn.0040ca55
test eax, eax
je 0x40c68a
cmp dword [eax + 4], 0
lea edx, [esp + 3]
je 0x40c677
push 1
push edx
push eax
call fcn.0040c8d0
movsx eax, byte [esp + 3]
pop ecx
ret 4
mov eax, dword [eax]
push 0
lea ecx, [esp + 0xc]
push ecx
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
movsx eax, byte [esp + 3]
pop ecx
ret 4

Function at 0x40c7e0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 1
push edi
mov dword [esp + 8], 0
jne 0x40c802
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ecx, edi
jle 0x40c87b
mov eax, dword [esi + 8]
add eax, dword [esi + 4]
sub eax, ecx
mov ecx, edi
sub ecx, 1
je 0x40c868
sub ecx, 1
je 0x40c853
sub ecx, 2
je 0x40c840
mov ecx, dword [esp + 0x14]
push edi
push ecx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
mov dword [eax], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cx, word [edx]
mov word [eax], cx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cl, byte [edx]
mov byte [eax], cl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
push esi
call fcn.0040c1f0
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x40c8a8
mov eax, dword [esp + 0x14]
mov ecx, dword [esi]
push 0
lea edx, [esp + 0xc]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x14]
push edi
push edx
add ecx, eax
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
Function at 0x40c8d0
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 0
push edi
jne 0x40c8f1
push esi
call fcn.0040c1f0
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ebx, edi
jl 0x40c96a
mov eax, dword [esi + 0x10]
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
sub ecx, 1
je 0x40c957
sub ecx, 1
je 0x40c942
sub ecx, 2
je 0x40c92f
push edi
push eax
mov eax, dword [esp + 0x1c]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov edx, dword [esp + 0x14]
mov dword [edx], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ax, word [eax]
mov ecx, dword [esp + 0x14]
mov word [ecx], ax
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov dl, byte [eax]
mov eax, dword [esp + 0x14]
mov byte [eax], dl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esi + 0x10]
push ebp
mov ebp, dword [esp + 0x18]
sub ecx, ebx
add ecx, dword [esi + 4]
push ebx
push ecx
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
cmp edi, eax
push 0
jl 0x40c9b3
mov eax, dword [esi]
lea edx, [esp + 0x18]
push edx
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
pop esi
add eax, ebx
pop ebx
ret 0xc
mov edx, dword [esi + 4]
lea ecx, [esp + 0x18]
push ecx
push eax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
cmp edi, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
jle 0x40c9d6
mov edi, eax
mov ecx, dword [esi + 4]
push edi
push ecx
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
add esp, 0xc
pop ebp
lea eax, [ebx + edi]
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x1001ada8
Capabilities:
Get file size
Read file via mapping

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x98
push esi
xor esi, esi
cmp dword [ebp + 8], esi
push edi
mov edi, ecx
mov dword [ebp - 4], esi
jne 0x1001adcb
mov eax, 0x8876086c
jmp 0x1001aee0
cmp dword [ebp + 0xc], esi
push ebx
je 0x1001ae63
lea eax, [ebp - 0x98]
push eax
mov dword [ebp - 0x98], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x88], 2
je 0x1001ae43
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push dword [ebp + 8]
push esi
push 0xfde9
call ebx
push eax
mov dword [ebp + 0xc], eax
call fcn.1013ca30
cmp eax, esi
pop ecx
mov dword [ebp - 4], eax
jne 0x1001ae27
mov eax, 0x8007000e
jmp 0x1001aedf
push esi
push esi
push dword [ebp + 0xc]
push eax
push 0xffffffffffffffff
push dword [ebp + 8]
push esi
push 0xfde9
call ebx
mov eax, dword [ebp - 4]
mov dword [ebp + 8], eax
mov dword [ebp + 0xc], esi
cmp dword [ebp + 0xc], esi
je 0x1001ae63
push esi
push 0x10000000
push 3
push esi
push 1
push connect
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x1001ae7c
push esi
push 0x10000000
push 3
push esi
push 1
push connect
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push dword [ebp - 4]
mov dword [edi], eax
call fcn.1013c8a0
mov eax, dword [edi]
cmp eax, 0xffffffff
pop ecx
je 0x1001aecd
push esi
push esi
push esi
push 2
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, 0xffffffff
mov dword [edi + 4], eax
je 0x1001aecd
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [edi + 0xc], eax
je 0x1001aecd
cmp eax, esi
je 0x1001aeda
push esi
push esi
push esi
push 4
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, esi
mov dword [edi + 8], eax
jne 0x1001aedd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 0x88760b59
jmp 0x1001aedf
mov dword [edi + 8], esi
xor eax, eax
pop ebx
pop edi
pop esi
leave
ret 8