joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40bfc0
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push ebx
push ecx
push ebp
push esi
push edi
push dword [esp + 0x20]
pop dword [0x412380]
mov esi, esp
sub esp, 0x24
mov eax, esp
mov edx, eax
add edx, 0x24
mov dword [eax], 0
add eax, 4
cmp eax, edx
jne 0x40bfdb
mov edx, dword [esi + 0x18]
lea ecx, [esp]
call fcn.0040bd81
mov eax, dword [esi + 0x1c]
mov byte [esp + 4], al
mov byte [esp + 5], 1
mov dword [esp + 6], 0x80000000
mov dword [esp + 0xa], 0
mov dword [esp + 0xe], 0
mov dword [esp + 0x12], 0
push dword [0x412380]
mov eax, 0x800
call fcn.0040b80b
lea ecx, [esp + 0x1a]
pop edx
call fcn.0040bd14
mov edx, 0x412390
lea ecx, [esp + 0x1a]
call fcn.0040bd60
push 0
push 0
push 0
movsx eax, byte [esp + 0x10]
push eax
push str.Opera_6.01
call sub.WININET.dll_InternetOpenA
mov dword [esp + 0xa], eax
push 0
push dword [esp + 0xa]
push 0
push 0
push dword [esp + 0x10]
push dword [esp + 0x1e]
call sub.WININET.dll_InternetOpenUrlA
mov dword [esp + 0xe], eax
mov eax, 1
call fcn.004171c0
lea eax, [esp + 0x12]
push eax
mov eax, dword [esp + 0x1a]
call fcn.0040b5b7
push eax
mov eax, dword [esp + 0x1e]
push eax
push dword [esp + 0x1a]
call sub.WININET.dll_InternetReadFile
mov ebx, dword [esp + 0x12]
cmp ebx, 0
jne 0x40c0c5
mov byte [esp + 5], 0
jmp 0x40c0f2
mov edx, dword [esp + 0x1a]
push dword [0x412380]
call fcn.0040bdc0
push dword [0x412380]
push dword [esp + 0x1a]
mov eax, dword [esp + 0x22]
call fcn.0040b57a
pop eax
lea ecx, [esp + 0x1e]
pop edx
call fcn.0040bd14
mov ebx, dword [esp + 0x1e]
add ebx, dword [esp + 0x12]
mov dword [esp + 0x1e], ebx
movsx ebx, byte [esp + 5]
cmp ebx, 0
jne 0x40c08e
push dword [esp + 0xe]
call sub.WININET.dll_InternetCloseHandle
push dword [esp + 0xa]
call sub.WININET.dll_InternetCloseHandle
mov edx, dword [esp + 0x1a]
push dword [0x412380]
call fcn.0040bdc0
pop eax
jmp 0x40c134
mov edx, dword [esp + 0x16]
call fcn.0040bde0
mov edx, dword [esp + 0x1a]
call fcn.0040bde0
mov edx, dword [esp]
call fcn.0040bde0
add esp, 0x24
pop edi
pop esi
pop ebp
pop ecx
pop ebx
ret 8

Function at 0x40c160
Capabilities:
Get common file path

Disassembly:
push ebx
push ecx
push ebp
push esi
push edi
push dword [esp + 0x18]
pop dword [0x412380]
mov esi, esp
sub esp, 4
mov eax, esp
mov edx, eax
add edx, 4
mov dword [eax], 0
add eax, 4
cmp eax, edx
jne 0x40c17b
push dword [0x412380]
mov eax, 0x1f4
call fcn.0040b80b
lea ecx, [esp + 4]
pop edx
call fcn.0040bd14
mov eax, dword [esp]
push eax
push 0x226
call sub.KERNEL32.DLL_GetCurrentDirectoryA
mov edx, dword [esp]
push dword [0x412380]
call fcn.0040bdc0
pop eax
jmp 0x40c1c9
mov edx, dword [esp]
call fcn.0040bde0
add esp, 4
pop edi
pop esi
pop ebp
pop ecx
pop ebx
ret
Function at 0x40e54e
Capabilities:
Enumerate gui resources

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
cmp dword [ebp + 8], 0
je 0x40e568
push dword [ebp + 8]
push 0x40e4e0
call sub.USER32.dll_EnumWindows
jmp 0x40e59f
mov edi, dword [0x4142e0]
jmp 0x40e59b
mov esi, dword [edi]
call sub.KERNEL32.DLL_GetCurrentThreadId
cmp dword [edi + 8], eax
jne 0x40e599
push 1
push dword [edi + 0xc]
call sub.USER32.dll_EnableWindow
mov eax, edi
add eax, 8
push eax
push 0x4142e0
call fcn.00410f00
add esp, 8
mov edi, esi
or edi, edi
jne 0x40e570
pop edi
pop esi
pop ebp
ret 4

Function at 0x40e700
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
xor ebx, ebx
or esi, esi
je 0x40e7d8
mov dword [ebp - 0x40], esi
push esi
call sub.CRTDLL.dll_strlen
pop ecx
lea edi, [eax + esi - 1]
jmp 0x40e72a
dec edi
cmp edi, esi
jbe 0x40e733
cmp byte [edi], 0x5c
jne 0x40e729
cmp edi, esi
jbe 0x40e769
mov byte [edi], 0
push esi
lea eax, [ebp - 0x240]
push eax
call sub.CRTDLL.dll_strcpy
push 0x4142f6
lea eax, [ebp - 0x240]
push eax
call sub.CRTDLL.dll_strcat
add esp, 0x10
lea eax, [ebp - 0x240]
mov dword [ebp - 0x40], eax
mov byte [edi], 0x5c
jmp 0x40e76d
and dword [ebp - 0x40], 0
mov eax, dword [ebp + 0x10]
or eax, eax
je 0x40e77c
cmp byte [eax], 0
je 0x40e77c
mov dword [ebp - 0x40], eax
xor edi, edi
inc edi
test byte [ebp + 0x14], 2
je 0x40e787
xor edi, edi
mov dword [ebp - 0x3c], 0x3c
mov dword [ebp - 0x38], 0x40
mov dword [ebp - 0x20], edi
lea eax, str.Open
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x2c], esi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x3c]
push eax
call sub.SHELL32.DLL_ShellExecuteExA
mov ebx, eax
or eax, eax
je 0x40e7d8
cmp dword [ebp - 4], 0
je 0x40e7d8
test byte [ebp + 0x14], 1
je 0x40e7d5
push 0xffffffffffffffff
push dword [ebp - 4]
call sub.KERNEL32.DLL_WaitForSingleObject
mov ebx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x40fb40
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
push 9
call sub.USER32.dll_GetKeyState
mov ebx, eax
movsx ebx, bx
test bl, 0x80
je 0x40fbba
push 0x11
call sub.USER32.dll_GetKeyState
mov ebx, eax
movsx ebx, bx
test bl, 0x80
jne 0x40fbba
push 0x10
call sub.USER32.dll_GetKeyState
mov ebx, eax
movsx ebx, bx
test bl, 0x80
jne 0x40fbba
push 0x12
call sub.USER32.dll_GetKeyState
mov ebx, eax
movsx ebx, bx
test bl, 0x80
jne 0x40fbba
call sub.USER32.dll_GetFocus
push 5
lea ebx, [ebp - 5]
push ebx
push eax
call sub.USER32.dll_GetClassNameA
push 4
push str.Rich
lea eax, [ebp - 5]
push eax
call sub.CRTDLL.dll_strncmp
add esp, 0xc
or eax, eax
jne 0x40fbba
jmp 0x40fc00
mov edi, dword [0x415d08]
jmp 0x40fbce
cmp dword [edi + 8], esi
jne 0x40fbcc
mov eax, dword [edi + 0x14]
jmp 0x40fc00
mov edi, dword [edi]
or edi, edi
jne 0x40fbc2
jmp 0x40fbf6
mov ebx, edi
shl ebx, 4
mov edx, dword [0x415cc4]
cmp dword [edx + ebx], esi
jne 0x40fbf5
mov ebx, edi
shl ebx, 4
mov edx, dword [0x415cc4]
mov eax, dword [ebx + edx + 0xc]
jmp 0x40fc00
inc edi
cmp edi, dword [0x415cc0]
jl 0x40fbd4
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x4010f0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x4263d0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x4269c2], 0
je 0x401113
cmp byte [ebp + 8], 0
je 0x401216
lea eax, [ebp - 0x14]
push eax
push 0x20019
push 0
push str.SOFTWAREAdobeAdobe_AcrobatDCInstaller_
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40120f
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40120f
cmp byte [0x4269c2], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x10], 4
jne 0x40118d
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push 0
push str.bIsSingleClientApp
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40118d
cmp dword [ebp - 0xc], 4
jne 0x40118d
cmp dword [ebp - 8], eax
setne byte [0x4269c1]
cmp byte [0x4269c1], 0
je 0x401206
lea eax, [ebp - 0x10]
mov dword [ebp - 8], 0
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push str.bIsSCAcroAppInstalled
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4011cd
cmp dword [ebp - 0xc], 4
jne 0x4011cd
cmp dword [ebp - 8], eax
setne byte [0x4269c0]
lea eax, [ebp - 0x10]
mov dword [ebp - 8], 0
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
push str.SCAPackageLevel
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401206
mov eax, dword [section..data]
cmp dword [ebp - 0xc], 4
cmove eax, dword [ebp - 8]
mov dword [section..data], eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [0x4269c2], 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b330
mov esp, ebp
pop ebp
ret

Function at 0x401340
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
xor eax, eax
mov edx, eax
mov ecx, eax
and edx, 1
shr ecx, 1
neg edx
and edx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr edx, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, edx
mov edx, ecx
shr ecx, 1
and edx, 1
neg edx
and edx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr edx, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, edx
mov edx, ecx
shr ecx, 1
and edx, 1
neg edx
and edx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr edx, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, edx
mov edx, ecx
shr ecx, 1
and edx, 1
neg edx
and edx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr edx, 1
and ecx, 1
neg ecx
and ecx, 0xedb88320
xor ecx, edx
mov dword [eax*4 + 0x426e20], ecx
inc eax
cmp eax, 0x100
jb 0x401342
cmp eax, 0x800
jae 0x401413
nop word [eax + eax]
mov edx, dword [eax*4 + 0x426a20]
movzx ecx, dl
shr edx, 8
xor edx, dword [ecx*4 + 0x426e20]
mov dword [eax*4 + 0x426e20], edx
inc eax
cmp eax, 0x800
jb 0x4013f0
mov dword [0x4269c4], 0x401440
call fcn.00405880
mov ecx, dword [0x4269c4]
test eax, eax
mov edx, 0x401440
cmove ecx, edx
mov dword [0x4269c4], ecx
ret
Function at 0x402230
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x4263d0]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], ecx
mov esi, dword [edi]
test esi, esi
je 0x4022af
mov dword [edi], 0
push 0
mov edx, 0x400000
mov dword [ebp - 8], 0
lea eax, [ebp - 8]
cmp esi, edx
push eax
mov eax, esi
cmova eax, edx
push eax
push ebx
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 8]
add ebx, ecx
add dword [edi], ecx
sub esi, ecx
test eax, eax
je 0x402298
test ecx, ecx
je 0x4022af
test esi, esi
je 0x4022af
mov ecx, dword [ebp - 0xc]
jmp 0x40225b
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b330
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041b330
mov esp, ebp
pop ebp
ret
Function at 0x4056d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x14]
sub esp, 0x14
mov ecx, dword [ebp + 0xc]
mov eax, dword [eax]
push ebx
xor ebx, ebx
and eax, 7
cmp ecx, 5
jae 0x4056f0
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
add dword [ebp + 0x10], 5
lea edx, [ecx - 4]
push esi
mov esi, dword [ebp + 8]
push edi
or edi, 0xffffffff
add edx, esi
mov dword [ebp - 4], edx
add esi, ebx
mov dword [ebp - 8], esi
cmp esi, edx
jae 0x405722
nop dword [eax]
mov cl, byte [esi]
and cl, 0xfe
cmp cl, 0xe8
je 0x40571f
inc esi
cmp esi, edx
jb 0x405710
mov dword [ebp - 8], esi
mov ebx, esi
sub ebx, dword [ebp + 8]
mov ecx, ebx
sub ecx, edi
cmp esi, edx
jae 0x40584a
cmp ecx, 3
jbe 0x405762
xor eax, eax
mov cl, byte [esi + 4]
mov edi, ebx
mov dword [ebp - 0x14], edi
test cl, cl
je 0x4057a0
cmp cl, 0xff
je 0x4057a0
mov edx, dword [ebp - 4]
and eax, 3
mov esi, dword [ebp + 8]
add eax, eax
mov ecx, 1
or eax, 1
add ebx, ecx
jmp 0x405704
dec ecx
shl eax, cl
and eax, 7
je 0x40573a
cmp byte [eax + 0x41e61c], 0
je 0x40578d
movzx ecx, byte [eax + 0x41e624]
mov edx, esi
sub edx, ecx
mov cl, byte [edx + 4]
test cl, cl
je 0x40578a
cmp cl, 0xff
jne 0x40573a
mov edx, dword [ebp - 4]
mov esi, dword [ebp + 8]
and eax, 3
add eax, eax
mov edi, ebx
or eax, 1
inc ebx
jmp 0x405704
movzx edi, cl
movzx ecx, byte [esi + 3]
shl edi, 8
or edi, ecx
movzx ecx, byte [esi + 2]
shl edi, 8
or edi, ecx
movzx ecx, byte [esi + 1]
mov esi, dword [ebp + 0x10]
shl edi, 8
or edi, ecx
cmp dword [ebp + 0x18], 0
je 0x4057ce
lea edx, [edi + ebx]
add edx, esi
jmp 0x4057d4
mov edx, edi
sub edx, ebx
sub edx, esi
test eax, eax
je 0x405812
movzx edi, byte [eax + 0x41e624]
mov ecx, 0x18
shl edi, 3
sub ecx, edi
mov dword [ebp - 0x10], edi
mov edi, edx
shr edi, cl
mov ecx, edi
mov dword [ebp - 0xc], edi
test cl, cl
je 0x4057fe
cmp cl, 0xff
jne 0x405812
mov ecx, 0x20
mov edi, 1
sub ecx, dword [ebp - 0x10]
shl edi, cl
dec edi
xor edi, edx
jmp 0x4057c1
mov esi, dword [ebp - 8]
mov ecx, edx
mov edi, dword [ebp - 0x14]
shr ecx, 0x18
and cl, 1
neg cl
mov byte [esi + 1], dl
mov byte [esi + 4], cl
mov ecx, edx
shr ecx, 0x10
mov byte [esi + 3], cl
mov ecx, edx
mov edx, dword [ebp - 4]
shr ecx, 8
mov byte [esi + 2], cl
mov ecx, 5
mov esi, dword [ebp + 8]
add ebx, ecx
jmp 0x405704
pop edi
pop esi
cmp ecx, 3
jbe 0x40585f
mov ecx, dword [ebp + 0x14]
xor eax, eax
mov dword [ecx], eax
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
dec ecx
shl eax, cl
mov ecx, dword [ebp + 0x14]
and eax, 7
mov dword [ecx], eax
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x409c00
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x409c59
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x409c59
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x409c4a
cmp esi, edx
jae 0x409c59
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x409c38
cmp esi, edx
jae 0x409c59
cmp word [esi], 0
je 0x409c59
mov eax, esi
pop esi
pop ebp
ret
xor eax, eax
pop esi
pop ebp
ret

Function at 0x409cc0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4263d0]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
mov edi, ecx
cmp dword [edi + 0x38], 0
je 0x409d88
cmp byte [edi + 0x3d], 0
je 0x409d88
mov eax, dword [edi]
push esi
push 0xffffffffffffffff
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x41e358]
mov ecx, edi
call esi
cmp eax, 0xffffffff
je 0x409d76
mov ecx, dword [edi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [edi + 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 0x409d3d
sub eax, 1
je 0x409d41
sub eax, 2
jne 0x409d76
mov byte [edi + 0x3d], al
mov al, 1
pop esi
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b330
mov esp, ebp
pop ebp
ret
mov byte [edi + 0x3d], 0
mov esi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub esi, eax
je 0x409d5f
push dword [edi + 0x4c]
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x409d76
cmp byte [edi + 0x3d], 0
pop esi
sete al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b330
mov esp, ebp
pop ebp
ret
pop esi
xor al, al
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b330
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop edi
call fcn.0041b330
mov esp, ebp
pop ebp
ret
Function at 0x40a290
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x4263d0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40a2c0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b330
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x40a2f0
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x40a2f0
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.0041b330
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x40a3ea
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40a319
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 0x40a34d
push dword [esi + 0x4c]
movsx eax, bl
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.0041b330
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
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]
test eax, eax
js 0x40a3ea
cmp eax, 1
jle 0x40a3ab
cmp eax, 3
jne 0x40a3ea
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.00407c90
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b330
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40a3c9
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 0x40a3ea
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x40a3ea
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041b330
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.0041b330
mov esp, ebp
pop ebp
ret 4
Function at 0x40ab30
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 + 8]
mov dword [ebp - 8], ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x40ab5c
jl 0x40ab50
test esi, esi
jne 0x40ab5c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x40ab75
push eax
push esi
push ecx
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, esi
mov edx, dword [eax]
test edx, edx
je 0x40ab88
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
jmp 0x40ab8a
xor eax, eax
mov dword [ebp - 4], esi
test eax, eax
je 0x40abb9
mov edi, dword [ebp + 0xc]
cmp eax, edi
cmovb esi, eax
push esi
push edx
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp - 8], esi
add esp, 0xc
mov dword [ebp - 4], edi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0xc]
cmp dword [ebx + 0x4c], 0
je 0x40ac65
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x40abe4
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 [ebx + 0x2c]
mov dword [eax], edx
mov eax, dword [ebp - 4]
mov edx, eax
mov ecx, dword [ebp - 8]
mov dword [ebp - 4], edx
cmp eax, 0xfff
jbe 0x40ac24
push dword [ebx + 0x4c]
push 0xfff
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, dword [ebp - 8]
sub edi, eax
add ecx, eax
mov dword [ebp - 4], edi
add esp, 0x10
mov dword [ebp - 8], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x40ac52
cmp edi, eax
ja 0x40abf6
cmp dword [ebp - 4], 0
jbe 0x40ac68
push dword [ebx + 0x4c]
push edi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, dword [ebp - 4]
add esp, 0x10
sub edx, eax
sub esi, edx
mov edx, dword [ebp + 0x10]
mov eax, esi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 0x10]
sub esi, edi
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp - 4]
sub esi, edx
mov edx, dword [ebp + 0x10]
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40ac80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x40aca5
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 ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov eax, dword [eax]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], eax
test eax, eax
je 0x40acc6
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x40acc8
xor eax, eax
cdq
mov dword [ebp - 4], eax
mov ecx, edx
mov dword [ebp - 8], ecx
test edi, edi
jl 0x40ad46
jg 0x40acdb
test esi, esi
je 0x40ad46
test ecx, ecx
jl 0x40ad1f
jg 0x40ace5
test eax, eax
je 0x40ad1f
cmp edi, ecx
jg 0x40acf7
jl 0x40acef
cmp esi, eax
jae 0x40acf7
mov eax, esi
mov dword [ebp - 4], esi
mov dword [ebp - 8], edi
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 4]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x30]
add edx, ecx
sub esi, ecx
sbb edi, dword [ebp - 8]
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
jmp 0x40ad22
mov edx, dword [ebp + 8]
test edi, edi
jl 0x40ad46
jg 0x40ad2c
test esi, esi
je 0x40ad46
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x40ad46
push eax
push esi
push 1
push edx
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 [ebp - 0x10]
mov edx, dword [ebp - 0x14]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc