joyce8/EMBER2024-capa huggingface dataset:
Function at 0x2e01e341
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x30
mov eax, 0x2e030586
call fcn.2e02e16c
lea eax, [ebp - 0x2c]
xor ebx, ebx
push eax
push str.softwaremicrosoftwindows_shell_associationsurlassociationshttpuserchoice
push 0x80000001
mov edi, ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x2e01e45f
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push ebx
push str.progid
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x2e01e456
mov eax, dword [ebp - 0x30]
inc eax
push eax
call fcn.2e00f1e1
mov esi, eax
pop ecx
mov dword [ebp - 0x3c], esi
lea eax, [ebp - 0x30]
mov dword [ebp - 4], ebx
push eax
push esi
push ebx
push ebx
push str.progid
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
xor ecx, ecx
inc ecx
test eax, eax
jne 0x2e01e449
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], bl
call fcn.2e010c49
push str.IE.HTTP
lea ecx, [ebp - 0x28]
call fcn.2e00f1e1
test al, al
jne 0x2e01e3fc
push ebx
push str.AppX
lea ecx, [ebp - 0x28]
call fcn.2e00f1e1
push 1
test eax, eax
pop edx
cmove edi, edx
jmp 0x2e01e3ff
xor edx, edx
inc edx
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x2e01e439
mov ecx, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], ecx
mov byte [ebp - 4], dl
cmp eax, 0x1000
jb 0x2e01e430
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.2e00f1e1
mov eax, dword [ebp - 0x34]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x38]
push eax
push ecx
call fcn.2e00f1e1
pop ecx
pop ecx
xor ecx, ecx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 0xf
inc ecx
mov byte [ebp - 0x28], bl
or dword [ebp - 4], 0xffffffff
push ecx
push esi
call fcn.2e00f1e1
pop ecx
pop ecx
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ax, di
call fcn.2e02e14a
ret
Function at 0x1001c6a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x2d], 0
jne 0x1001c73b
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 4]
push esi
push 0
push eax
push ebx
push dword [ebp + 0xc]
push dword [edi + 0x30]
call dword [sym.imp.kernel32.dll_ReadFile]
mov esi, dword [ebp - 4]
cmp esi, ebx
je 0x1001c6f2
mov byte [edi + 0x2d], 0xff
test esi, esi
je 0x1001c6f2
cmp esi, ebx
jge 0x1001c6f2
mov eax, ebx
sub eax, esi
push eax
mov eax, dword [ebp + 0xc]
add eax, esi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp dword [edi + 0x18], 0
je 0x1001c735
add dword [edi + 0x1c], ebx
cmp dword [edi + 0x1c], 0xffff
jle 0x1001c735
xor eax, eax
mov word [edi + 0x1e], ax
mov eax, dword [edi]
push edi
mov esi, dword [eax + 0x2c]
mov ecx, esi
call dword [0x100252e4]
call esi
mov ecx, dword [edi + 0x18]
push 1
push dword [edi + 0x20]
mov esi, dword [ecx]
push eax
push ecx
mov ecx, dword [esi + 0xc]
call dword [0x100252e4]
call dword [esi + 0xc]
mov esi, dword [ebp - 4]
mov eax, esi
pop esi
pop ebx
jmp 0x1001c74d
push dword [ebp + 0x10]
push 0
push dword [ebp + 0xc]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
pop edi
leave
ret 0xc

Function at 0x1001c970
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x1002d6f4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1002da0c], 0
mov eax, dword [ebp + 8]
je 0x1001c998
push eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
jmp 0x1001c9b2
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.10013907
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
test eax, eax
setne al
xor ecx, ebp
call fcn.10022650
leave
ret 4

Function at 0x1001cb80
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x310
mov eax, dword [0x1002d6f4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1002da0c], 0
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
je 0x1001cbb6
push ebx
push dword [ebp + 0x10]
push edi
push esi
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
jmp 0x1001cc15
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x310]
push eax
push esi
call fcn.10013907
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.10013907
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
mov esi, eax
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.10013907
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10022650
leave
ret 0x10
Function at 0x1001cc30
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x1002d6f4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1002da0c], 0
push esi
mov esi, dword [ebp + 0xc]
je 0x1001cc5c
push esi
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_GetTempPathW]
jmp 0x1001cc8d
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
test eax, eax
je 0x1001cc8b
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.10013907
push esi
call dword [sym.imp.kernel32.dll_lstrlenW]
jmp 0x1001cc8d
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.10022650
leave
ret 8
Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
nop
nop
nop
nop
nop
pop eax
add eax, 0x40729f
nop
nop
sub eax, 0x407245
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x432030
nop
nop
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43201e
nop
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x431219
Function at 0x401ee2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x411280]
jne 0x401eec
repz ret
jmp fcn.00404369

Function at 0x4025e7
Capabilities:
Accept command line arguments
Parse pe header

Disassembly:
push 0x14
push 0x40f530
call fcn.00403770
mov eax, 0x5a4d
cmp word [0x400000], ax
jne 0x4024e7
mov eax, dword [0x40003c]
cmp dword [eax + 0x400000], 0x4550
jne 0x4024e7
mov ecx, 0x10b
cmp word [eax + 0x400018], cx
jne 0x4024e7
cmp dword [eax + 0x400074], 0xe
jbe 0x4024e7
xor ecx, ecx
cmp dword [eax + 0x4000e8], ecx
setne cl
mov dword [ebp - 0x1c], ecx
jmp 0x4024eb
and dword [ebp - 0x1c], 0
push 1
call fcn.00409c90
pop ecx
test eax, eax
jne 0x4024ff
push 0x1c
call fcn.00409c90
pop ecx
call fcn.00405287
test eax, eax
jne 0x402510
push 0x10
call fcn.00409c90
pop ecx
call fcn.00405952
and dword [ebp - 4], 0
call fcn.004032ff
test eax, eax
jge 0x40252a
push 0x1b
call fcn.00409c90
pop ecx
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x412ba0], eax
call fcn.00409c90
mov dword [0x41203c], eax
call fcn.00409c90
test eax, eax
jge 0x402550
push 8
call fcn.00409c90
pop ecx
call fcn.00405fde
test eax, eax
jge 0x402561
push 9
call fcn.00409c90
pop ecx
push 1
call fcn.00409c90
pop ecx
test eax, eax
je 0x402574
push eax
call fcn.00409c90
pop ecx
mov eax, dword [0x412018]
mov dword [0x41201c], eax
push eax
push dword [0x412010]
push dword [0x41200c]
call main
add esp, 0xc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], 0
jne 0x4025a2
push eax
call fcn.00409c90
call fcn.00402400
jmp 0x4025d7
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x20]
call fcn.004037b5
ret
call fcn.00409c90
jmp 0x402495

Function at 0x409c90
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
pushal
call 0x409c9f
pop dword [ebp - 0x44]
mov eax, 0x7b8b6de8
sub eax, 0x7b4ad149
sub dword [ebp - 0x44], eax
push 0x40
push 0x1000
push 0x3756a
push 0
mov eax, 0x38b1aa3
add eax, 0xfcb5c635
add eax, dword [ebp - 0x44]
call dword [eax]
mov ecx, 0x6646d97b
add ecx, 0x99b96714
mov esi, eax
mov edi, 0x413bc4
add edi, dword [ebp - 0x44]
mov edx, 0x955f772c
sub edx, 0x2e4d7487
sub dword [ebp - 0x28], 0xdf7a9747
mov ebx, dword [edi]
xor dword [ebp - 0x28], esi
sub ebx, edx
xor dword [ebp - 0x28], edi
mov dword [esi], ebx
add dword [ebp - 4], esi
add esi, 0x434b3b90
sub esi, 0x434b3b8c
add edi, 0x3abd1e96
add edi, 0xc542e16e
loop 0x409cf8
add eax, 0xf50f
xor ebx, ebx
add ebx, eax
add eax, 0x3c6a7d5d
add eax, 0xc39582a8
mov ecx, 0x20df4a83
add ecx, 0xdf60b57d
add ecx, dword [ebp - 0x44]
call ebx
leave
ret
Function at 0x410728
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
push ebx
push esi
push edi
mov dword [ebp - 4], 0
push 0x10
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx eax, ax
test ah, 0x80
je 0x410750
add dword [ebp - 4], 2
push 0x11
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx eax, ax
test ah, 0x80
je 0x410767
inc dword [ebp - 4]
push 0x12
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx eax, ax
test ah, 0x80
je 0x41077f
add dword [ebp - 4], 8
mov ax, word [ebp - 4]
jmp 0x410788
pop edi
pop esi
pop ebx
leave
ret

Function at 0x419c90
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
pushal
call 0x419c9f
pop dword [ebp - 0x28]
mov eax, 0x86d3bd14
add eax, 0x796ddf8b
sub dword [ebp - 0x28], eax
push 0x40
push 0x1000
push 0x4fa93
push 0
mov eax, 0x56d59065
add eax, 0xa970d773
add eax, dword [ebp - 0x28]
call dword [eax]
mov ecx, 0x5bf818e3
add ecx, 0xa4083728
mov edx, eax
mov edi, 0x48e000
add edi, dword [ebp - 0x28]
mov esi, 0x45cb2432
sub esi, 0xe1e5910e
xor dword [ebp - 0x10], esi
mov ebx, dword [edi]
sub ebx, esi
mov dword [ebp - 0x20], 0x706f10d7
mov dword [edx], ebx
add dword [ebp - 0x14], 0xa07b9e27
add edx, 0x105a796d
sub edx, 0x105a7969
add edi, 0x2e142d87
add edi, 0xd1ebd27d
loop 0x419cf8
add eax, 0x132ff
mov ebx, eax
add eax, 0x909ba5f0
sub eax, 0x909ba5eb
mov ecx, 0x400000
add ecx, dword [ebp - 0x28]
call ebx
leave
ret
Function at 0x40279c
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
imul edx, dword [0x40c02c], 0x8088405
inc edx
mov dword [0x40c02c], edx
mul edx
mov eax, edx
ret

Function at 0x40520c
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x405245
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403278
jmp 0x40524e
mov eax, ebx
mov edx, esi
call fcn.0040322c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x405258
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x405279
mov al, byte [esp]
jmp 0x40527b
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x405b10
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x4a9ce751
xor eax, 0x4a9ce755
sub esp, eax
mov eax, esp
mov ecx, 0
xor ecx, eax
mov dword [ecx], edx
push 0x4ec4d23f
mov edi, 0x4ec4d23b
pop ecx
xor edi, ecx
sub esp, edi
mov edi, 0x5d8030c9
mov eax, 0x5d8030c9
xor eax, edi
xor eax, esp
mov dword [eax], ebx
xor edx, edx
mov dl, byte [esi]
add ebx, edx
mov dl, byte [ebx]
mov ecx, 0x30bc2a45
mov edi, 0x193c011d
xor edi, ecx
push 0x5aa7821f
mov eax, 0x1a92823d
pop ecx
xor eax, ecx
xor edi, eax
cmp ebx, 0
je 0x405a7d
pop ebx
mov byte [esi], dl
mov edi, 0x5a3ad474
xor edi, 0xa5c52b8b
add esi, edi
pop edx
mov eax, 0x4f0e49b5
xor eax, 0xc79b80b
push 0x10d58394
mov edi, 0x53a2722b
pop ecx
xor edi, ecx
xor edi, eax
sub edx, edi
mov eax, 0x7ff3f907
mov ecx, 0x7ff3f907
xor ecx, eax
mov edi, 0
mov eax, 0
xor edi, eax
xor ecx, edi
xor ecx, edx
or ecx, edx
jne 0x405a7d
mov ebx, 0x1e74e8a3
xor ebx, 0x43be6b81
push ebx
mov esi, 0x30020559
mov eax, 0x404800a0
xor esi, eax
mov eax, esi
xor eax, 0xffffffff
and eax, 0x2dc0e0da
and esi, 0xd23f1f25
or esi, eax
pop edi
xor esi, edi
call esi
pop esi
pop esi
ret

Function at 0x406c2c
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x406cba
push dword fs:[eax]
mov dword fs:[eax], esp
test ebx, ebx
jne 0x406c77
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
lea edx, [ebp - 0x108]
mov eax, esi
call fcn.00403278
jmp 0x406ca4
call sub.kernel32.dll_GetCommandLineA_1
cmp byte [eax], 0
jne 0x406c8b
lea eax, [ebp - 4]
call fcn.00403198
jmp 0x406c9a
lea edx, [ebp - 4]
call fcn.00406af0
test ebx, ebx
je 0x406c9a
dec ebx
jmp 0x406c7c
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.0040322c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406cc1
lea eax, [ebp - 4]
call fcn.00403198
ret
Function at 0x4022c0
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.00407b20
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
lea esi, [esi]

Function at 0x402320
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 [0x4be500]
test eax, eax
jle 0x402430
mov edx, dword [0x4be504]
xor ebx, ebx
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x402351
mov edi, dword [edx + 0x10]
add ecx, dword [edi + 8]
cmp esi, ecx
jb 0x4023ca
add ebx, 1
add edx, 0x14
cmp ebx, eax
jne 0x402340
mov dword [esp], esi
call fcn.00407c80
test eax, eax
mov edi, eax
je 0x402457
lea esi, [ebx + ebx*4]
mov ebx, dword [0x4be504]
shl esi, 2
add ebx, esi
mov dword [ebx + 0x10], eax
mov dword [ebx], 0
call fcn.00407d70
add eax, dword [edi + 0xc]
mov dword [ebx + 0xc], eax
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [0x4be504]
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 0x402437
mov eax, dword [ebp - 0x20]
cmp eax, 0x40
jne 0x4023d2
add dword [0x4be500], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 4
je 0x4023c3
cmp eax, 0x80
je 0x4023c3
cmp eax, 8
je 0x4023c3
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x28]
add esi, dword [0x4be504]
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 0x4023c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.004022c0
nop
lea esi, [esi]
xor ebx, ebx
jmp 0x40235b
mov eax, dword [0x4be504]
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.004022c0
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.004022c0
mov esi, esi
lea edi, [edi]
Function at 0x404970
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x40
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov byte [esp + 0xf], 0
lea ebx, [esp + 0x20]
push ebx
call fcn.0040bd00
add esp, 4
push 0
push 0
push 0
call fcn.0040c070
add esp, 0xc
test edi, edi
je 0x4049ff
push dword [ebp + 0x14]
push edi
push eax
call fcn.0040c070
add esp, 0xc
mov esi, eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
lea edx, [esp + 0xf]
push eax
push ecx
push edx
push dword [ebp + 0x14]
push edi
push 1
push 2
push ebx
call fcn.0040d680
add esp, 0x20
jmp 0x404aac
mov dword [esp + 0x1c], eax
xor ebx, ebx
push 0x100000
call fcn.00405d60
add esp, 4
mov dword [esp + 0x10], eax
nop word cs:[eax + eax]
mov esi, dword [ebp + 0xc]
push esi
push 0x100000
push 1
push dword [esp + 0x1c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
mov edi, eax
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
add esp, 4
test eax, eax
jne 0x404afa
cmp edi, 0x100000
movzx ebx, bl
mov eax, 1
cmovb ebx, eax
push edi
mov esi, dword [esp + 0x14]
push esi
push dword [esp + 0x24]
call fcn.0040c070
add esp, 0xc
mov dword [esp + 0x1c], eax
mov eax, ebx
and eax, 1
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x17]
push ecx
push edi
push esi
push eax
push 2
lea eax, [esp + 0x3c]
push eax
call fcn.0040d680
add esp, 0x20
test bl, 1
je 0x404a20
push dword [esp + 0x10]
call fcn.00405e40
add esp, 4
mov esi, dword [esp + 0x1c]
push dword [ebp + 8]
push dword [esp + 0x18]
push 1
push dword [esp + 0x24]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
mov edi, dword [esp + 0x14]
cmp eax, edi
jne 0x404ad2
mov eax, dword [ebp + 0x18]
mov dword [eax], esi
xor esi, esi
jmp 0x404b27
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_strerror
add esp, 4
push eax
push edi
push str.fwrite__zu_bytes_failed___s
push 0x4aa9d8
push 5
call fcn.0040ab40
add esp, 0x14
jmp 0x404b22
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
push str.deflate_read_failed__errno_d__n
push 0x4aa9d8
push 3
call fcn.0040ab40
add esp, 0x10
push dword [esp + 0x10]
call fcn.00405e40
add esp, 4
mov esi, 0x80000000
push dword [esp + 0x18]
call fcn.0040af20
add esp, 4
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x14
Function at 0x404b40
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x8000
call fcn.0040f658
mov edi, dword [esp + 0x801c]
mov ebx, dword [esp + 0x8018]
mov ebp, esp
push 0x8000
push 0
push ebp
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push 0
push 0
push 0
call fcn.0040c070
add esp, 0xc
mov dword [edi], eax
nop
push ebx
push 0x8000
push 1
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
mov esi, eax
push ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
add esp, 4
test eax, eax
jne 0x404be8
push dword [esp + 0x8014]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
add esp, 4
test eax, eax
jne 0x404be8
test esi, esi
je 0x404c34
push esi
push ebp
push dword [edi]
call fcn.0040c070
add esp, 0xc
mov dword [edi], eax
push dword [esp + 0x8014]
push esi
push 1
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
cmp eax, esi
je 0x404b80
mov edi, 0x80000000
mov ebx, str.fwrite__zu_bytes_failed___s
jmp 0x404c10
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov eax, dword [eax]
cmp eax, 0xd
mov ecx, 0xffffffff
mov edx, 0x80000000
cmove edx, ecx
cmp eax, 2
mov edi, 0xfffffffe
cmovne edi, edx
mov ebx, str.fread__zu_bytes_failed___s
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_strerror
add esp, 4
push eax
push esi
push ebx
push 0x4aa9d8
push 5
call fcn.0040ab40
add esp, 0x14
jmp 0x404c36
xor edi, edi
mov eax, edi
add esp, 0x8000
pop esi
pop edi
pop ebx
pop ebp
ret 0xc

Function at 0x404c50
Capabilities:
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
push 0
push 0
push 0
call fcn.0040c070
add esp, 0xc
mov dword [ebx], eax
xor esi, esi
test edi, edi
je 0x404cc2
mov ebp, dword [esp + 0x18]
push edi
push ebp
push eax
call fcn.0040c070
add esp, 0xc
mov dword [ebx], eax
push dword [esp + 0x14]
push edi
push 1
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
cmp eax, edi
je 0x404cc2
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_strerror
add esp, 4
push eax
push edi
push str.fwrite__zu_bytes_failed___s
push 0x4aa9d8
push 5
call fcn.0040ab40
add esp, 0x14
mov esi, 0x80000000
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
Function at 0x404fb0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x8000
call fcn.0040f658
mov edi, dword [esp + 0x8020]
mov ebx, dword [esp + 0x801c]
mov esi, esp
push 0x8000
push 0
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
test edi, edi
je 0x404ff2
push 0
push 0
push 0
call fcn.0040c070
add esp, 0xc
mov dword [edi], eax
xor eax, eax
test ebx, ebx
je 0x4050c4
nop dword [eax]
cmp ebx, 0x8000
mov ebp, 0x8000
cmovb ebp, ebx
push dword [esp + 0x8018]
push ebp
push 1
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
cmp eax, ebp
jne 0x405056
test edi, edi
je 0x405037
push ebp
push esi
push dword [edi]
call fcn.0040c070
add esp, 0xc
mov dword [edi], eax
push dword [esp + 0x8014]
push ebp
push 1
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
cmp eax, ebp
jne 0x405080
sub ebx, ebp
jne 0x405000
xor eax, eax
jmp 0x4050c4
push dword [esp + 0x8018]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
add esp, 4
test eax, eax
je 0x405099
push ebp
push str.fread__zu_bytes_failed__unexpected_EOF
push 0x4aa9d8
push 5
call fcn.0040ab40
add esp, 0x10
jmp 0x4050bf
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_strerror
add esp, 4
push eax
push ebp
push str.fwrite__zu_bytes_failed___s
jmp 0x4050b0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll_strerror
add esp, 4
push eax
push ebp
push str.fread__zu_bytes_failed___s
push 0x4aa9d8
push 5
call fcn.0040ab40
add esp, 0x14
mov eax, 0x80000000
add esp, 0x8000
pop esi
pop edi
pop ebx
pop ebp
ret 0x10