joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4bcd20
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x510958
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x54d028]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
push esi
push edi
mov eax, dword [0x54d028]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov edi, dword [esp + 0x54]
cmp dword [edi + 0x14], 8
mov ebx, dword [esp + 0x50]
mov esi, dword [esp + 0x58]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], esi
jb 0x4bcd6f
mov eax, dword [edi]
jmp 0x4bcd71
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x4bcd91
push esi
push edi
push ebx
call fcn.004bc950
add esp, 0xc
jmp 0x4bced0
test eax, 0x400
je 0x4bce9e
cmp dword [edi + 0x14], 8
jb 0x4bcda6
mov esi, dword [edi]
jmp 0x4bcda8
mov esi, edi
mov ebx, 7
xor eax, eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], 0
mov word [esp + 0x20], ax
mov dword [esp + 0x48], eax
call fcn.004be0d0
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4bcdd0
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [esp + 0x28]
call fcn.00404480
cmp dword [esp + 0x34], 8
mov eax, dword [esp + 0x20]
mov dword [esp + 0x48], 1
jae 0x4bce01
lea eax, [esp + 0x20]
push 0
push 0x2000000
push 3
push 0
push ebx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x1c], esi
cmp dword [esp + 0x34], 8
mov byte [esp + 0x48], 3
jb 0x4bce35
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004d62da
add esp, 4
mov dword [esp + 0x34], ebx
xor edx, edx
or ebx, 0xffffffff
mov dword [esp + 0x30], 0
mov word [esp + 0x20], dx
cmp esi, ebx
jne 0x4bce66
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
push eax
push edi
push esi
call fcn.004bc950
add esp, 0xc
mov eax, esi
jmp 0x4bced2
push edi
call fcn.004bb740
add esp, 4
mov dword [esp + 0x48], ebx
push esi
test al, al
jne 0x4bce8c
mov edi, dword [esp + 0x18]
mov dword [edi], 9
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x4bced2
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
test esi, esi
je 0x4bceb4
mov dword [esi], 0
call fcn.004befe0
mov dword [esi + 4], eax
mov eax, dword [esp + 0x10]
test al, 0x10
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 3
jne 0x4bcecc
mov dword [esp + 0x10], 2
mov ecx, dword [eax]
mov dword [ebx], ecx
mov eax, ebx
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004d62e5
add esp, 0x3c
ret
Function at 0x4bd180
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x5109e8
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x54d028]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x54d028]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov edi, dword [esp + 0x88]
cmp dword [edi + 0x14], 8
mov esi, dword [esp + 0x8c]
jb 0x4bd1ca
mov eax, dword [edi]
jmp 0x4bd1cc
mov eax, edi
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4bd1ef
cmp esi, ebx
je 0x4bd1e8
mov dword [esi], ebx
call fcn.004befe0
mov dword [esi + 4], eax
mov al, 1
jmp 0x4bd28d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
mov dword [esp + 0x14], ebx
call fcn.004befe0
mov dword [esp + 0x18], eax
cmp ebp, 0xb7
jne 0x4bd231
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push edi
push ecx
call fcn.004bcd20
add esp, 0xc
cmp dword [eax], 3
jne 0x4bd231
cmp esi, ebx
je 0x4bd28b
mov dword [esi], ebx
call fcn.004befe0
jmp 0x4bd288
cmp esi, ebx
jne 0x4bd281
push 0x23
push str.boost::filesystem::create_directory
lea ecx, [esp + 0x28]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.00407ad0
mov dword [esp + 0x80], ebx
call fcn.004befe0
push eax
push ebp
push edi
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x4c]
call fcn.004bc1c0
push 0x53b418
lea eax, [esp + 0x40]
push eax
call fcn.004da48a
call fcn.004befe0
mov dword [esi], ebp
mov dword [esi + 4], eax
xor al, al
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.004d62e5
add esp, 0x70
ret

Function at 0x4bda70
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x510b30
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push esi
mov eax, dword [0x54d028]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 8], esi
mov dword [esi + 4], 0
push 0x51da5c
lea ecx, [esp + 0x10]
mov dword [esp + 0x3c], 0
mov dword [esi], vtable.std::codecvt_wchar_t__char__int_.0
call fcn.00403ec0
mov byte [esp + 0x38], 1
call fcn.004ba7f2
lea ecx, [esp + 0xc]
mov dword [esi + 8], eax
mov dword [esi + 0xc], edx
mov byte [esp + 0x38], 0
call fcn.00403f90
mov dword [esi], vtable.windows_file_codecvt.0
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x34
ret
Function at 0x4be450
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x510cd0
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x54d028]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
mov eax, dword [0x54d028]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esp + 0x40]
mov eax, 7
xor edx, edx
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], 0
mov dword [esp + 0xc], esi
mov word [esi], dx
mov dword [esp + 0x24], eax
xor eax, eax
mov word [esp + 0x10], ax
mov eax, ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x20], edx
lea ebx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x4be4b6
sub eax, ebx
sar eax, 1
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00404cb0
mov byte [esp + 0x38], 1
call fcn.004be0d0
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x14]
push esi
push ecx
call fcn.0040aad0
add esp, 0xc
cmp dword [esp + 0x24], 8
jb 0x4be4ff
mov edx, dword [esp + 0x10]
push edx
call fcn.004d62da
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.004d62e5
add esp, 0x30
ret 8
Function at 0x4c0eb0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push 0xffffffffffffffff
push 0x511140
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x54d028]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov eax, dword [0x554020]
test eax, eax
jne 0x4c0ee4
xor esi, esi
jmp 0x4c0eed
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov dword [esp + 0x14], esi
mov ebp, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esp + 0x30], 0
test esi, esi
je 0x4c0f37
cmp dword [esi + 0x14], 0
jne 0x4c0f79
cmp dword [esi + 0x10], 0
jne 0x4c0f80
push 0x4bfe30
push 0x554018
call fcn.004c01f0
mov eax, dword [0x554020]
add esp, 8
test eax, eax
je 0x4c102d
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [esp + 0x30], 0xffffffff
test esi, esi
je 0x4c0f65
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4c0f65
mov eax, dword [esi]
mov edx, dword [eax]
push 0
mov ecx, esi
call edx
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
cmp dword [esi + 0x10], 0
je 0x4c0fc0
nop
mov ebx, dword [esi + 0x10]
mov eax, dword [ebx + 4]
mov dword [esi + 0x10], eax
mov ecx, dword [ebx]
test ecx, ecx
je 0x4c0fae
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebx]
mov edx, dword [edi]
mov eax, dword [edx]
push 0
mov ecx, edi
call eax
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
cmp dword [esi + 0x10], 0
jne 0x4c0f80
cmp dword [esi + 0x14], 0
je 0x4c0f09
mov edi, dword [esi + 0x14]
mov ecx, dword [edi + 0x10]
mov dword [esi + 0x14], ecx
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x4c0fe5
mov edx, dword [ecx]
mov eax, dword [edi + 0xc]
mov edx, dword [edx + 4]
push eax
call edx
mov ebx, dword [edi + 8]
test ebx, ebx
je 0x4c1016
lea eax, [ebx + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x4c1016
mov edx, dword [ebx]
mov eax, dword [edx + 4]
mov ecx, ebx
call eax
lea ecx, [ebx + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4c1016
mov eax, dword [ebx]
mov edx, dword [eax + 8]
mov ecx, ebx
call edx
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebp
cmp dword [esi + 0x14], 0
jne 0x4c0fca
jmp 0x4c0f03
lea ecx, [esp + 0x18]
call fcn.004d68d1
mov dword [esp + 0x24], 0
mov dword [esp + 0x18], vtable.boost::thread_resource_error.0
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x34], 1
call fcn.004334d0
int3
Function at 0x4c1120
Capabilities:
Create thread
Resume thread

Disassembly:
push 0xffffffffffffffff
push 0x511198
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x54d028]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi]
lea ecx, [eax + 0x1c]
push ecx
push 4
push eax
push 0x4c1060
push 0
push 0
call fcn.004dd737
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x4c118b
lea ecx, [esp + 0x10]
call fcn.004d68d1
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], vtable.boost::thread_resource_error.0
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x2c], ebx
call fcn.004334d0
mov eax, dword [edi]
add eax, 4
mov ecx, 1
lock xadd dword [eax], ecx
mov esi, dword [edi]
mov eax, dword [esi + 8]
test eax, eax
je 0x4c11ae
cmp eax, 0xffffffff
je 0x4c11ae
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], ebx
mov edx, dword [edi]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
Function at 0x4c2b50
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
xor ecx, ecx
cmp eax, edx
je 0x4c2b7f
push esi
push edi
mov esi, ecx
mov edi, ecx
shl esi, 6
shr edi, 2
add esi, edi
movsx edi, byte [eax]
lea esi, [esi + edi - 0x61c88647]
inc eax
xor ecx, esi
cmp eax, edx
jne 0x4c2b60
pop edi
pop esi
mov eax, 0x4e25
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add edx, eax
shr edx, 0x1e
imul edx, edx, 0x7fffd8ee
mov eax, ecx
sub eax, edx
add eax, 0x2710
ret
Function at 0x4d5e30
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xf0
mov eax, 0x529c65
mov dword [esp], eax
mov dword [esp + 4], 0x51f9b4
mov dword [esp + 8], 0x52b62c
mov dword [esp + 0xc], 0x51f9b0
mov dword [esp + 0x10], 0x51f9ac
mov dword [esp + 0x14], 0x52ef9c
mov dword [esp + 0x18], 0x51da50
mov dword [esp + 0x1c], 0x51f9a8
mov dword [esp + 0x20], 0x52edbc
mov dword [esp + 0x24], 0x533140
mov dword [esp + 0x28], 0x52b658
mov dword [esp + 0x2c], 0x51f9a4
mov dword [esp + 0x30], 0x51f9a0
mov dword [esp + 0x34], 0x51f99c
mov dword [esp + 0x38], 0x51f998
mov dword [esp + 0x3c], 0x51f994
mov dword [esp + 0x40], 0x51f990
mov dword [esp + 0x44], 0x51f984
mov dword [esp + 0x48], 0x51f680
mov dword [esp + 0x4c], 0x51f73c
mov dword [esp + 0x50], 0x51f980
mov dword [esp + 0x54], 0x52b66c
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], 0x51f97c
mov dword [esp + 0x64], 0x51f978
mov dword [esp + 0x68], 0x52f034
mov dword [esp + 0x6c], 0x530688
mov dword [esp + 0x70], 0x51dbc0
mov dword [esp + 0x74], 0x51f674
mov dword [esp + 0x78], 0x51f654
mov dword [esp + 0x7c], 0x51dbb8
mov dword [esp + 0x80], 0x51f640
mov dword [esp + 0x84], 0x51f638
mov dword [esp + 0x88], 0x51f634
mov dword [esp + 0x8c], 0x51f67c
mov dword [esp + 0x90], 0x51f974
mov dword [esp + 0x94], 0x51f970
mov dword [esp + 0x98], 0x52a024
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], eax
mov dword [esp + 0xbc], 0x52a020
mov dword [esp + 0xc0], 0x51f708
mov dword [esp + 0xc4], 0x51f6ec
mov dword [esp + 0xc8], 0x51da5c
mov dword [esp + 0xcc], str.ZYXWVUTSRQPONMLKJIHGFDBA
mov dword [esp + 0xd0], 0x51f730
mov dword [esp + 0xd4], str._:_
mov dword [esp + 0xd8], 0x51f64c
mov dword [esp + 0xdc], 0x51f70c
mov dword [esp + 0xe0], 0x51f714
mov dword [esp + 0xe4], 0x51f968
mov dword [esp + 0xe8], 0x51f720
mov dword [esp + 0xec], 0x51f704
cmp cl, 0x3c
jae 0x4d604d
movzx eax, cl
mov eax, dword [esp + eax*4]
add esp, 0xf0
ret

Function at 0x4d62e5
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x54d028]
jne 0x4d62ef
repz ret
jmp fcn.004dd89f
Function at 0x4e800c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x54d028]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.004dec58
and dword [ebp - 0x14], 0
cmp dword [0x554f20], 0
mov dword [ebp - 0x18], eax
jne 0x4e80bf
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x4e8167
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x52282c
push ebx
call edi
test eax, eax
je 0x4e8167
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x554f20], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x554f24], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x554f28], eax
call edi
push eax
call esi
mov dword [0x554f30], eax
test eax, eax
je 0x4e80bf
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x554f2c], eax
mov eax, dword [0x554f2c]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x4e8118
cmp dword [0x554f30], ecx
je 0x4e8118
push eax
call esi
push dword [0x554f30]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x4e8118
test ebx, ebx
je 0x4e8118
call edi
test eax, eax
je 0x4e810f
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x4e810f
test byte [ebp - 8], 1
jne 0x4e8118
or dword [ebp + 0x10], 0x200000
jmp 0x4e814b
mov eax, dword [0x554f24]
cmp eax, dword [ebp - 0x18]
je 0x4e814b
push eax
call esi
test eax, eax
je 0x4e814b
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4e814b
mov eax, dword [0x554f28]
cmp eax, dword [ebp - 0x18]
je 0x4e814b
push eax
call esi
test eax, eax
je 0x4e814b
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x554f20]
call esi
test eax, eax
je 0x4e8167
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x4e8169
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d62e5
leave
ret

Function at 0x4ef0c0
Capabilities:
Encode data using xor

Disassembly:
movzx ecx, word [edx]
mov eax, dword [eax + 0x1f0]
test cx, cx
je 0x4ef0e6
mov edi, edi
imul eax, eax, 0xf4243
movzx ecx, cx
add edx, 2
xor eax, ecx
movzx ecx, word [edx]
test cx, cx
jne 0x4ef0d0
ret
Function at 0x404510
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 0x40453c
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 0x404564
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x40456a
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 0x4045d2
jg 0x404581
test esi, esi
je 0x4045d2
test ecx, ecx
jl 0x4045cd
jg 0x40458b
test eax, eax
je 0x4045cd
cmp edi, ecx
jg 0x40459f
jl 0x404595
cmp esi, eax
jae 0x40459f
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 0x4045d5
mov ecx, dword [ebp + 8]
jmp 0x4045df
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x4045f9
jg 0x4045df
test esi, esi
je 0x4045f9
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x4045f9
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 0x404610
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 0x40463c
jl 0x404630
test ecx, ecx
jne 0x40463c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x404655
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 0x4046a3
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x4046a9
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x4046a9
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x404716
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x4046d2
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 0x404704
nop
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 0x404716
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x4046e0
test edi, edi
je 0x404716
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 0x404a90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x40c004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x404ac0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040774e
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x404af0
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x404af0
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.0040774e
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x404bc8
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x404b19
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 0x404b25
movsx eax, bl
jmp 0x404b5d
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 0x404b87
sub eax, 1
je 0x404b87
sub eax, 2
jne 0x404bc8
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.0040774e
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x404ba5
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 0x404bc8
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.0040774e
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.0040774e
mov esp, ebp
pop ebp
ret 4