joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402538
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
push 0xe
push dword [esp + 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
jne 0x402563
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x40261f
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x402555
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
mov dword [esp + 0x14], esi
je 0x402555
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
call ebx
push eax
push esi
push 0x404
mov ebp, dword [sym.imp.KERNEL32.dll_UpdateResourceA]
push dword [esp + 0x2c]
push 0xe
push dword [esp + 0x38]
call ebp
test eax, eax
je 0x40255c
and dword [esp + 0x20], 0
cmp word [esi + 4], 0
jbe 0x40261c
add esi, 0x12
movzx eax, word [esi]
push 3
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x40255c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [esp + 0x10], eax
je 0x40255c
push dword [esp + 0x1c]
push edi
call ebx
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push 0x404
movzx eax, word [esi]
push eax
push 3
push dword [esp + 0x38]
call ebp
test eax, eax
je 0x40255c
mov eax, dword [esp + 0x14]
add esi, 0xe
inc dword [esp + 0x20]
movzx eax, word [eax + 4]
cmp dword [esp + 0x20], eax
jb 0x4025b6
push 1
pop eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret

Function at 0x402652
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
lea eax, [ebp - 8]
push 0
push eax
push 2
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
pop edi
lea eax, [ebp - 2]
push edi
push eax
push dword [ebp + 8]
call esi
test eax, eax
je 0x4026bb
cmp dword [ebp - 8], edi
jne 0x4026bb
cmp word [ebp - 2], 0
jne 0x4026bb
lea eax, [ebp - 8]
push 0
push eax
lea eax, [ebp - 2]
push edi
push eax
push dword [ebp + 8]
call esi
test eax, eax
je 0x4026bb
cmp dword [ebp - 8], edi
jne 0x4026bb
cmp word [ebp - 2], 1
jne 0x4026bb
lea eax, [ebp - 8]
push 0
push eax
lea eax, [ebp - 2]
push edi
push eax
push dword [ebp + 8]
call esi
test eax, eax
je 0x4026bb
cmp dword [ebp - 8], edi
je 0x4026c0
or eax, 0xffffffff
jmp 0x4026c4
movzx eax, word [ebp - 2]
pop edi
pop esi
leave
ret 4
Function at 0x4026ca
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, ecx
push edi
xor ecx, ecx
mov eax, dword [esi + 0x68]
push ecx
push 0x80
push 3
push ecx
push ecx
push 0x80000000
push eax
mov dword [ebp - 0x18], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0xc], edi
je 0x402864
push edi
mov ecx, esi
call fcn.00402652
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x10], ebx
jne 0x402719
push edi
jmp 0x40285e
mov esi, ebx
shl esi, 4
push esi
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x18]
push 0
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40274f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 4]
call sub.MFC42.DLL_operatordelete
jmp 0x402883
mov esi, ebx
imul esi, esi, 0xe
add esi, 6
push esi
call sub.MFC42.DLL_operatornew
mov edi, eax
push esi
push 0
push edi
call sub.MSVCRT.dll_memset
and word [edi], 0
and dword [ebp - 8], 0
add esp, 0x10
cmp dword [ebp - 0x10], 0
mov word [edi + 4], bx
mov word [edi + 2], 1
lea ebx, [edi + 6]
jbe 0x4027b4
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
push 0xe
push dword [ebp - 0x14]
push ebx
call sub.MSVCRT.dll_memcpy
mov eax, dword [ebp - 8]
add dword [ebp - 0x14], 0x10
add esp, 0xc
add ebx, 0xe
lea ecx, [eax + 1]
inc eax
cmp eax, dword [ebp - 0x10]
mov word [ebx - 2], cx
mov dword [ebp - 8], eax
jb 0x40278c
mov ebx, dword [sym.imp.KERNEL32.dll_UpdateResourceA]
push esi
push edi
push 0x404
push 0x80
push 0xe
push dword [ebp + 8]
call ebx
test eax, eax
je 0x40286b
push edi
call sub.MFC42.DLL_operatordelete
and dword [ebp - 8], 0
cmp dword [ebp - 0x10], 0
pop ecx
jbe 0x402852
mov eax, dword [ebp - 4]
lea esi, [eax + 8]
push dword [esi]
call sub.MFC42.DLL_operatornew
pop ecx
mov edi, eax
push 0
push 0
push dword [esi + 4]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40286b
lea eax, [ebp - 0x18]
push 0
push eax
push dword [esi]
push edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40286b
mov eax, dword [ebp - 8]
push dword [ebp - 0x18]
inc eax
movzx eax, ax
push edi
push 0x404
push eax
push 3
push dword [ebp + 8]
call ebx
test eax, eax
je 0x40286b
push edi
call sub.MFC42.DLL_operatordelete
inc dword [ebp - 8]
add esi, 0x10
mov eax, dword [ebp - 8]
pop ecx
cmp eax, dword [ebp - 0x10]
jb 0x4027ec
push dword [ebp - 4]
call sub.MFC42.DLL_operatordelete
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret 4
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call sub.MFC42.DLL_operatordelete
push dword [ebp - 4]
call sub.MFC42.DLL_operatordelete
pop ecx
pop ecx
jmp 0x402864
Function at 0x807d19
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
lea eax, [ebp - 0x140]
push 0x100
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x807d7f
mov eax, dword [eax + 0xc]
push esi
lea ecx, [ebp - 0x40]
xor esi, esi
sub ecx, eax
mov edx, dword [eax]
test edx, edx
je 0x807d7a
mov edx, dword [edx]
inc esi
mov dword [ecx + eax], edx
add eax, 4
cmp esi, 0x10
jl 0x807d50
jmp 0x807d7a
mov eax, dword [ebp + esi*4 - 0x44]
dec esi
test eax, eax
je 0x807d7a
push eax
push dword [ebp + 8]
call fcn.00807545
pop ecx
pop ecx
test esi, esi
jg 0x807d66
pop esi
leave
ret

Function at 0x807d81
Capabilities:
Create tcp socket
Create thread
Create udp socket
Start tcp server

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
push 0x2c
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
push 0x2c
push 0
push esi
mov dword [0x808244], esi
call sub.MSVCRT.dll_memset
call fcn.008071e7
push esi
mov dword [esi + 0x24], eax
call fcn.00807d19
push esi
call fcn.00807c77
push esi
call fcn.00807400
push esi
call fcn.008074a2
mov edi, dword [sym.imp.WS2_32.dll_htons]
and dword [esi + 4], 0
add esp, 0x20
mov word [esi], 2
push 0x412
call edi
mov ebx, dword [sym.imp.WS2_32.dll_socket]
push 6
push 1
push 2
mov word [esi + 2], ax
call ebx
mov ebp, dword [sym.imp.WS2_32.dll_bind]
jmp 0x807e23
push dword [esi + 0x10]
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x3e8
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov word [esi], 2
and dword [esi + 4], 0
push 0x412
call edi
push 6
push 1
push 2
mov word [esi + 2], ax
call ebx
push 0x10
push esi
push eax
mov dword [esi + 0x10], eax
call ebp
test eax, eax
jne 0x807df3
push bind
push dword [esi + 0x10]
call dword [sym.imp.WS2_32.dll_listen]
mov ebp, dword [sym.imp.KERNEL32.DLL_CreateThread]
lea eax, [esp + 0x10]
xor ebx, ebx
push eax
push ebx
push esi
push 0x807b7a
push ebx
push ebx
call ebp
push 0x1c
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
push 0x1c
push ebx
push edi
call sub.MSVCRT.dll_memset
add esp, 0x10
lea eax, [edi + 0x18]
mov dword [edi], esi
mov dword [eax], 0x10
push eax
lea eax, [edi + 8]
push eax
push dword [esi + 0x10]
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, ebx
mov dword [edi + 4], eax
jg 0x807e9e
push 0x32
call dword [sym.imp.KERNEL32.DLL_Sleep]
push edi
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
jmp 0x807e56
lea eax, [esp + 0x10]
push eax
push ebx
push edi
push 0x80783e
jmp 0x807e52

Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43300c
pop eax
nop
nop
nop
nop
nop
nop
add eax, 0x40a063
nop
sub eax, 0x40a009
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x433030
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43301e
nop
nop
nop
popal
nop
nop
nop
jmp 0x431219
Function at 0x401000
Capabilities:
Authenticate hmac
Encode data using base64
Encrypt data using des
Parse pe header

Disassembly:
xor eax, eax
cmp dword [esp + 0xc], eax
jbe 0x40101d
mov ecx, dword [esp + 8]
mov cl, byte [eax + ecx]
mov edx, dword [esp + 4]
jmp loc.00408deb
ret 0xc
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43000c
nop
nop
nop
pop eax
nop
nop
nop
add eax, 0x403daa
sub eax, 0x403d50
nop
nop
nop
nop
nop
mov ebx, dword [eax]
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
jl 0x430030
nop
nop
nop
nop
add eax, 0xc
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43001e
nop
nop
nop
popal
nop
nop
nop
nop
jmp loc.00401219
Function at 0x419348
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov eax, 0xfffefdfc
mov ecx, 0x40
mov ebx, dword [ebp + 0x10]
mov dword [ebx + ecx*4 - 4], eax
sub eax, 0x4040404
dec ecx
jne 0x41935b
mov edi, dword [ebp + 0xc]
mov esi, 0x40
xor ebx, ebx
push ebp
mov ebp, dword [ebp + 0x10]
mov eax, ecx
xor edx, edx
div esi
mov al, cl
mov dl, byte [edi + edx]
add dl, byte [ebp + eax]
add dl, bl
mov bl, byte [ebp + edx]
mov dl, byte [ebp + ebx]
xchg byte [ebp + eax], dl
mov byte [ebp + ebx], dl
inc ecx
cmp ecx, 0x300
jne 0x419375
pop ebp
xor ecx, ecx
mov edi, dword [ebp + 8]
mov esi, 0x20
push ebp
mov ebp, dword [ebp + 0x10]
mov eax, ecx
xor edx, edx
div esi
mov al, cl
mov dl, byte [edi + edx]
add dl, byte [ebp + eax]
add dl, bl
mov bl, byte [ebp + edx]
mov dl, byte [ebp + ebx]
xchg byte [ebp + eax], dl
mov byte [ebp + ebx], dl
inc ecx
cmp ecx, 0x300
jne 0x4193ae
pop ebp
xor ecx, ecx
mov edi, dword [ebp + 0xc]
mov esi, 0x40
push ebp
mov ebp, dword [ebp + 0x10]
mov eax, ecx
xor edx, edx
div esi
mov al, cl
mov dl, byte [edi + edx]
add dl, byte [ebp + eax]
add dl, bl
mov bl, byte [ebp + edx]
mov dl, byte [ebp + ebx]
xchg byte [ebp + eax], dl
mov byte [ebp + ebx], dl
inc ecx
cmp ecx, 0x300
jne 0x4193e7
pop ebp
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret 0xc

Function at 0x41941c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor eax, eax
mov ebx, dword [ebp + 0x14]
xor ecx, ecx
xor edx, edx
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
test esi, esi
je 0x419468
push ebp
mov ebp, dword [ebp + 0x10]
mov dl, byte [ebp + ecx]
add dl, bl
mov bl, byte [ebp + edx]
mov dl, byte [ebp + ebx]
mov dl, byte [ebp + edx]
inc dl
mov al, byte [ebp + edx]
xor byte [edi], al
mov dl, byte [ebp + ebx]
xchg byte [ebp + ecx], dl
mov byte [ebp + ebx], dl
inc cl
inc edi
dec esi
test esi, esi
jne 0x419439
pop ebp
pop edi
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x42e00c
pop eax
nop
nop
nop
nop
nop
add eax, 0x403ac5
nop
nop
sub eax, 0x403a6b
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
xor dword [ebx], edx
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x42e030
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x42e01e
nop
nop
nop
popal
nop
nop
nop
nop
jmp loc.00401219
Function at 0x419760
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, 0x40f015
lea edi, [esi - 0xe015]
push edi
or ebp, 0xffffffff
jmp 0x419782
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x419789
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x419778
nop
push 1
nop
pop eax
add ebx, ebx
jne 0x41979b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x419790
jne 0x4197ac
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x419790
sub ecx, ecx
sub eax, 3
jb 0x4197c0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x419832
mov ebp, eax
add ebx, ebx
jne 0x4197cb
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x4197d8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x4197fc
inc ecx
add ebx, ebx
jne 0x4197e8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4197dd
jne 0x4197f9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4197dd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x41981c
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x41980d
jmp 0x41977e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x41981c
add edi, ecx
jmp 0x41977e
pop esi
push esi
pop edi
mov ecx, 0x2b3
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x41983a
cmp byte [edi], 5
jne 0x41983a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x41983f
lea edi, [esi + 0x17000]
mov eax, dword [edi]
or eax, eax
je 0x4198b7
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x19000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x1908c]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x41986c
push edi
pop ecx
jns 0x41989b
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x19090]
or eax, eax
je 0x4198b1
mov dword [ebx], eax
add ebx, 4
jmp 0x419889
call dword [esi + 0x190a0]
mov ebp, dword [esi + 0x19094]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x19f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x4198eb
sub esp, 0xffffff80
jmp 0x404c20

Function at 0x40894c
Capabilities:
Encode data using xor

Disassembly:
push 0x4085d8
pop edx
call fcn.00408976
add ecx, 0xf5195a5a
xor dword [edi], edx
sub esi, ecx
add edi, 1
cmp edi, eax
jne fcn.0040894c
and ecx, ecx
sub esi, 0xd1a2db02
ret
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
mov ebx, 0x408f6c
mov ecx, 0x286639a1
nop
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
cmp eax, ebx
nop
nop
jne 0x430024
nop
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x42e3d0
nop
mov ecx, 0x572483e
nop
nop
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x430084
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
add eax, 4
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
popal
nop
nop
jmp 0x401219
Function at 0x40a100
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x40a12c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x40a154
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x40a15a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x40a1c2
jg 0x40a171
test esi, esi
je 0x40a1c2
test ecx, ecx
jl 0x40a1bd
jg 0x40a17b
test eax, eax
je 0x40a1bd
cmp edi, ecx
jg 0x40a18f
jl 0x40a185
cmp esi, eax
jae 0x40a18f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x40a1c5
mov ecx, dword [ebp + 8]
jmp 0x40a1cf
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x40a1e9
jg 0x40a1cf
test esi, esi
je 0x40a1e9
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x40a1e9
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40a200
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x40a22c
jl 0x40a220
test ecx, ecx
jne 0x40a22c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x40a245
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x40a28d
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x40a293
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push dword [ebp - 4]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp - 4], esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x40a293
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x40a306
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x40a2bc
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x40a2f4
nop dword [eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x40a306
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x40a2d0
test edi, edi
je 0x40a306
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40a680
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x483008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40a6b0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d625
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x40a6e0
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x40a6e0
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d625
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x40a7b8
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40a709
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x40a715
movsx eax, bl
jmp 0x40a74d
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x40a777
sub eax, 1
je 0x40a777
sub eax, 2
jne 0x40a7b8
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d625
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40a795
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40a7b8
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d625
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043d625
mov esp, ebp
pop ebp
ret 4
Function at 0x40ae40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x483008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40aefc
cmp byte [esi + 0x3d], 0
je 0x40aefc
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40aeea
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x40aeb1
sub eax, 1
je 0x40aeb5
sub eax, 2
jne 0x40aeea
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d625
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40aed3
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40aeea
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d625
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043d625
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0043d625
mov esp, ebp
pop ebp
ret