joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1002f8a
Capabilities:
Check if file exists
Create directory
Delete directory
Delete file
Get common file path
Get file attributes

Disassembly:
sub esp, 0x104
push ebx
push ebp
push esi
mov esi, dword [esp + 0x118]
push edi
xor edi, edi
xor ebp, ebp
push edi
lea eax, [esp + 0x14]
push 0x1001348
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push dword [esp + 0x118]
inc edi
push esi
call dword [sym.imp.kernel32.dll_lstrcpyA]
lea eax, [esp + 0x10]
push eax
push esi
call fcn.01005bb8
push esi
call dword [sym.imp.kernel32.dll_RemoveDirectoryA]
push esi
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov ebx, dword [sym.imp.kernel32.dll_CreateDirectoryA]
je 0x1003025
cmp edi, 0x190
jl 0x1002f9f
push esi
push 0
push 0x1001344
push dword [esp + 0x124]
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
test eax, eax
je 0x1003016
xor ebp, ebp
push esi
inc ebp
call dword [sym.imp.kernel32.dll_DeleteFileA]
push 0
push esi
call ebx
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x104
ret 8
xor ebp, ebp
push ebp
push esi
call ebx
test eax, eax
je 0x1002fee
xor eax, eax
inc eax
mov dword [0x100b880], eax
mov ebp, eax
jmp 0x1003016

Function at 0x1003e8c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push ebx
call dword [sym.imp.kernel32.dll_lstrlenA]
add eax, 0x14
push eax
push 0x40
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov esi, eax
xor ebp, ebp
cmp esi, ebp
jne 0x1003ecc
push ebp
push 0x10
push ebp
push ebp
push 0x4b5
push ebp
call fcn.01006f1a
call fcn.01003573
mov dword [0x100aa5c], eax
xor eax, eax
jmp 0x1003f33
push edi
push ebx
push esi
call dword [sym.imp.kernel32.dll_lstrcpyA]
push 0x10013c4
push esi
call fcn.01005bb8
push ebp
push 0x4000080
push 1
push ebp
push ebp
push 0x40000000
push esi
call dword [sym.imp.kernel32.dll_CreateFileA]
push esi
mov edi, eax
call dword [sym.imp.kernel32.dll_LocalFree]
cmp edi, 0xffffffff
je 0x1003f26
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
push ebx
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1003f26
test al, 0x10
je 0x1003f26
xor eax, eax
mov dword [0x100aa5c], ebp
inc eax
jmp 0x1003f32
call fcn.01003573
mov dword [0x100aa5c], eax
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x1004835
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
xor ebx, ebx
inc ebx
push esi
mov edi, ebx
call fcn.01005c50
test eax, eax
jne 0x100484f
mov eax, ebx
jmp 0x10048aa
cmp dword [0x100ac3c], 0
jne 0x100489c
test byte [0x100b898], bl
jne 0x100489c
push 6
push 0
push 0x1003869
push dword [0x100aa4c]
mov dword [0x100ae64], esi
push 0x7d3
push dword [0x100b4a4]
call fcn.01006f1a
sub eax, 6
je 0x100489a
dec eax
je 0x10048b0
sub eax, 0x832
jne 0x100489c
mov dword [0x100ac3c], ebx
mov edi, ebx
push 0x80
push esi
call dword [sym.imp.kernel32.dll_SetFileAttributesA]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4
xor edi, edi
jmp 0x10048a8

Function at 0x1005ae4
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov esi, eax
mov al, byte [esi]
cmp al, 0x22
jne 0x1005b0b
inc esi
mov al, byte [esi]
test al, al
je 0x1005b04
cmp al, 0x22
jne 0x1005af9
cmp byte [esi], 0x22
jne 0x1005b1c
jmp 0x1005b1b
cmp al, 0x20
jle 0x1005b1c
inc esi
cmp byte [esi], 0x20
jg 0x1005b0f
jmp 0x1005b1c
cmp al, 0x20
jg 0x1005b22
inc esi
mov al, byte [esi]
test al, al
jne 0x1005b17
and dword [ebp - 0x18], 0
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
test byte [ebp - 0x18], 1
je 0x1005b3c
movzx eax, word [ebp - 0x14]
jmp 0x1005b3f
push 0xa
pop eax
push eax
push esi
push 0
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
push eax
call main
push eax
call dword [sym.imp.kernel32.dll_ExitProcess]

Function at 0x1005c50
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1005c63
xor eax, eax
jmp 0x1005c6b
shr eax, 4
not eax
and eax, 1
ret 4
Function at 0x402240
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
dec edi
rol edi, 0xd5
add eax, 0xc4
dec ebx
inc eax
rcl edi, 0x53
and edx, 0x18
sbb edx, 0xdb
sbb ebx, 0x64
rcl edx, 0xd8
sbb edi, 0xd9
not edi
sbb esi, 0x44
and eax, 0xc1
inc esi
or edi, 0x27
add edi, 0x6f
neg ebx
rol esi, 0x51
rcr edi, 3
ror edi, 0x67
dec edx
not edx
and esi, 0x23
neg ebx
mov edi, 0xce
and esi, 0xa3
sub ebx, 0x67
dec eax
and edi, 0x11
bswap esi
mov edi, 0xa7
rcl eax, 0xcf
dec edi
bswap esi
inc edi
neg edi
sub esi, 0xe9
not ebx
rcl eax, 0x6f
imul eax
bswap esi
not esi
neg ebx
dec edx
not eax
dec esi
and edi, 0xe3
neg eax
neg edi
xor ecx, ecx
xor edi, edi
inc esi
rcr ebx, 0x16
dec eax
rcr ebx, 0xbb
not ebx
and eax, 0x55
imul edx
sbb edx, 0xeb
rol eax, 0x10
dec edi
bswap ebx
dec ebx
mov ebx, 0x1f
or edi, 0x9a
and edi, 0x89
rcr esi, 0x9a
dec edx
imul edi
neg ebx
neg edi
sbb eax, 0x3e
dec edi
mov ebx, 0xda
imul edx
bswap esi
bswap eax
rcr eax, 0xf2
rol edi, 0x56
dec ebx
not ebx
or eax, 0x9a
bswap eax
add ebx, 0x9e
sub edx, 0x14
imul ebx
mov ebx, 0xb8
bswap eax
add esi, 0x76
not eax
rcl edi, 0x62
inc eax
ror ebx, 0xa4
mov esi, 0x5d
bswap edx
add ebx, 0xba
dec edx
dec edx
inc eax
imul edx
inc esi
mov ecx, dword [ebp + 0xc]
rcl eax, 0x2b
add edi, 0x86
dec eax
mov ebx, 0x86
dec eax
rol esi, 0x2d
neg eax
ror esi, 0xa3
neg ebx
dec ebx
or edx, 0xc0
and ebx, 0xd9
bswap ebx
bswap edi
neg edx
and ebx, 0x21
bswap eax
bswap esi
neg edi
rcr eax, 0xcb
add ebx, 0x12
imul esi
ror edx, 0xf4
imul edx
bswap edx
sbb edi, 0x8d
or ebx, 0x32
not edi
add edx, 0x22
not eax
not eax
rcl ebx, 0xc4
or eax, 0xc7
not edi
rcr edi, 0xac
sub ebx, 0x27
dec esi
dec ebx
imul eax
or ebx, 0x1c
inc edi
dec ebx
rol ebx, 0x75
inc ebx
rcl ebx, 0
ror edx, 0xf9
rcr edi, 0xcf
sub edi, 0x1f
dec ebx
mov esi, 0x45
mov edi, dword [ebp + 8]
mov esi, ebx
xor ebx, ebx
mov eax, ebx
not byte [edi]
xor eax, ebx
mov ebx, esi
xor esi, eax
mov ebx, esi
mov eax, ebx
xor esi, esi
mov ebx, esi
mov eax, ebx
xor esi, eax
add byte [edi], 0x36
mov ebx, eax
xor ebx, esi
mov ebx, ebx
mov ebx, eax
mov ebx, eax
xor ebx, eax
mov eax, esi
xor eax, eax
mov esi, eax
sub byte [edi], 0x75
mov ebx, eax
mov eax, esi
mov eax, ebx
mov ebx, esi
mov ebx, eax
xor ebx, esi
xor ebx, ebx
xor ebx, ebx
mov eax, eax
imul byte [edi]
inc edi
loop 0x4023ed
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x40aa5a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x451090]
jne 0x40aa64
repz ret
jmp fcn.0041286e
Function at 0x41708c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00411112
and dword [ebp - 4], 0
cmp dword [0x452bd0], 0
mov ebx, eax
jne 0x41713d
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4171ee
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x4171ee
push eax
call fcn.004110a0
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x452bd0], eax
call esi
push eax
call fcn.004110a0
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x452bd4], eax
call esi
push eax
call fcn.004110a0
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x452bd8], eax
call esi
push eax
call fcn.004110a0
pop ecx
mov dword [0x452be0], eax
test eax, eax
je 0x41713d
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004110a0
pop ecx
mov dword [0x452bdc], eax
mov eax, dword [0x452bdc]
cmp eax, ebx
je 0x417195
cmp dword [0x452be0], ebx
je 0x417195
push eax
call fcn.0041111b
push dword [0x452be0]
mov esi, eax
call fcn.0041111b
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x417195
test edi, edi
je 0x417195
call esi
test eax, eax
je 0x41718c
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x41718c
test byte [ebp - 0xc], 1
jne 0x417195
or dword [ebp + 0x10], 0x200000
jmp 0x4171ce
mov eax, dword [0x452bd4]
cmp eax, ebx
je 0x4171ce
push eax
call fcn.0041111b
pop ecx
test eax, eax
je 0x4171ce
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4171ce
mov eax, dword [0x452bd8]
cmp eax, ebx
je 0x4171ce
push eax
call fcn.0041111b
pop ecx
test eax, eax
je 0x4171ce
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x452bd0]
call fcn.0041111b
pop ecx
test eax, eax
je 0x4171ee
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4171f0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41e8b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0
push 0
push 0
push 0
call fcn.004086f3
add esp, 0x10
mov dword [ebp - 4], 0x41dbb0
mov eax, dword [ebp - 4]
push eax
ret
Function at 0x408150
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
pop ecx
pop ebp
or byte [edi - 0x75], dl
jge 0x408179
test eax, eax
ja 0x40817e
xchg byte [0x77ff4683], al
add al, 0x85
out dx, al
jne 0x4081a6
test eax, eax
jg 0x408183
pop ebx
or byte [ecx - 0xd305], al
jg 0x4081f4
invalid
sub al, byte [ebx + 0x257c19f8]
cmp eax, 0x19
jl 0x4081a8
jg 0x40818d
cmp ebx, 0x89040084
jb 0x4081a8
test ecx, ecx
jne 0x4081ac
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x6f]
push eax
push edi
push edx
out 2, al
call fcn.004080f0
add esp, 0x14
pop edi
pop ebx
pop ebp
sbb al, 0x85
std
test ebp, edi
je 0x4081b7
mov ecx, dword [ebp + 0x21]
mov dword [ecx], 0
jmp 0x4081da
test eax, eax
jg 0x4081c8
jl 0x4081c1
inc eax
invalid
mov ecx, 1
jmp 0x4081ca
xor ecx, ecx
mov ebp, dword [esi + 0x54c98514]
or dl, ch
pop es
neg ebx
adc eax, 0
neg eax
push esi
push 0
ror byte [edx], cl
pushfd
cmpsd dword [esi], dword es:[edi]
call fcn.0040b808
mov ecx, eax
mov esi, edx
mov al, cl
mov dl, 0xa
imul dl
neg eax
dec edi
xor dh, 0x30
div byte [eax]
cld
invalid
Function at 0x403600
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418c3d
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x42200c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov esi, ecx
lea eax, [ebp + 8]
mov dword [ebp - 4], 0
push eax
call fcn.0040ba50
mov dword [eax], 0x30
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
mov dword [eax + 4], 0
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
mov dword [eax + 8], esi
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
mov dword [eax + 0xc], 0
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
mov dword [eax + 0x10], 0
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
mov dword [eax + 0x14], edi
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
mov edi, dword [ebp + 0x20]
push 0x7f00
push 0
mov dword [eax + 0x18], edi
call dword [sym.imp.USER32.dll_LoadCursorW]
mov esi, eax
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
mov dword [eax + 0x1c], esi
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
mov dword [eax + 0x20], 5
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
sub esp, 0x18
mov ecx, esp
mov dword [eax + 0x24], 0
lea eax, [ebp + 8]
push eax
call fcn.0040bdc0
call fcn.00403500
add esp, 0x18
mov esi, eax
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
mov dword [eax + 0x28], esi
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
mov dword [eax + 0x2c], edi
lea eax, [ebp + 8]
push eax
call fcn.0040ba50
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
test ax, ax
je 0x403756
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x403745
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40373b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40375d
push edx
push ecx
call fcn.0040caba
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 1
call fcn.00410194
call fcn.0041049a
int3
Function at 0x431005
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
mov eax, section..rsrc
nop
nop
mov ebx, 0x40915c
mov ecx, 0x8726f69
nop
test eax, eax
nop
nop
nop
nop
je 0x43104e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x431024
nop
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x42f3f8
nop
mov ecx, 0x6a4f1f18
nop
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x431084
nop
nop
nop
xor dword [eax], ecx
nop
nop
add eax, 4
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x43106c
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x401219
Function at 0x408ff0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub al, 0x1f
cmp eax, 0xebf87d03
or byte [ebx + 4], ah
dec edi
xchg esp, eax
and al, 0x42
fnstsw word [ebx]
jge 0x409027
cmpsb byte [esi], byte es:[edi]
and byte [ebp + 0x1c5c613], bh
rcl dword [eax + 0xde9], cl
add al, al
mov esp, 0x8320c71
sbb dword [edi], edi
std
sbb dword [eax - 0x74998220], esp
or al, 0x4b

Function at 0x4092be
Capabilities:
Encode data using xor

Disassembly:
inc eax
pop esi
xor dword [esi + 0xe], 0x7ce54c15
sub esi, 0xfffffffc
loop 0x4092c1
invalid
Function at 0x405a03
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
pushal
call 0x405a12
pop dword [ebp - 8]
mov eax, 0xfef45126
sub eax, 0xfeb3f714
sub dword [ebp - 8], eax
mov dword [ebp - 0x18], 0x5f0946cb
add dword [ebp - 0x18], 0xef48fe80
mov dword [ebp - 0x14], 0xbeeac11a
add dword [ebp - 0x14], 0x73488b2b
mov dword [ebp - 0x10], 0x153a61c0
sub dword [ebp - 0x10], 0xc8ee1d92
mov dword [ebp - 0xc], 0x12b26d51
sub dword [ebp - 0xc], 0x12b26d51
lea eax, [ebp - 0x18]
push eax
mov eax, sym.imp.kernel32.dll_GetModuleHandleA
add eax, dword [ebp - 8]
call dword [eax]
mov dword [ebp - 0x18], 0x8b60c655
sub dword [ebp - 0x18], 0x16ee5cff
mov dword [ebp - 0x14], 0x1a906252
sub dword [ebp - 0x14], 0xd92400dd
mov dword [ebp - 0x10], 0x2820e9b7
sub dword [ebp - 0x10], 0xc4b17d4b
mov dword [ebp - 0xc], 0x3ac9fbfc
add dword [ebp - 0xc], 0xc5360404
lea ebx, [ebp - 0x18]
push ebx
push eax
mov eax, 0x9de1cfd7
sub eax, 0x9da14ed7
add eax, dword [ebp - 8]
call dword [eax]
push 0x40
push 0x1000
push 0x385d0
push 0
call eax
mov ecx, 0x4d88
mov esi, eax
mov edx, 0x8a060b33
sub edx, 0x89bf2733
add edx, dword [ebp - 8]
mov edi, 0x130948e1
sub edi, 0xaa0dcebf
xor dword [ebp - 4], ebx
mov ebx, dword [edx]
add dword [ebp - 4], edi
xor ebx, edi
xor dword [ebp - 4], ecx
mov dword [esi], ebx
xor dword [ebp - 4], 0xdfa36e13
add esi, 4
add edx, 0xdcfcf7ff
add edx, 0x23030805
loop 0x405b29
add eax, 0x4ba0f28e
add eax, 0xb4603665
xor ebx, ebx
add ebx, eax
add eax, 0x811fbff1
sub eax, 0x811fbfec
mov ecx, 0x8481edb7
sub ecx, 0x8441edb7
add ecx, dword [ebp - 8]
call ebx
leave
ret

Function at 0x405cce
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x425f30
push esi
call fcn.00406212
push esi
call fcn.00405c71
mov edi, eax
test edi, edi
jne 0x405cef
xor eax, eax
jmp 0x405d47
push edi
call fcn.004064a6
test byte [0x42a258], 0x80
je 0x405d0c
mov ax, word [edi]
test ax, ax
je 0x405ceb
cmp ax, 0x5c
je 0x405ceb
sub edi, esi
sar edi, 1
jmp 0x405d26
call fcn.00406555
test eax, eax
je 0x405d20
test byte [eax], 0x10
je 0x405ceb
push esi
call fcn.00405c12
push esi
call sub.kernel32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x405d12
call fcn.00405bc6
push esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x405dc2
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405de1
and al, 0xfe
push eax
push dword [esp + 0xc]
call dword [sym.imp.kernel32.dll_SetFileAttributesW]
mov eax, esi
pop esi
ret 4

Function at 0x405de7
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.kernel32.dll_CreateFileW]
ret 0xc
Function at 0x402d40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x402d6c
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 + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], eax
test eax, eax
je 0x402d8e
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x402d90
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test edi, edi
jl 0x402e15
jg 0x402da5
test esi, esi
je 0x402e15
test ecx, ecx
jl 0x402df8
jg 0x402daf
test eax, eax
je 0x402df8
cmp edi, ecx
jg 0x402dc3
jl 0x402db9
cmp esi, eax
jae 0x402dc3
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x1c]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov eax, dword [ebx + 0x30]
sub esi, ecx
mov edx, dword [ebp + 8]
sbb edi, dword [esp + 0x10]
add edx, ecx
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
test edi, edi
jl 0x402e15
jg 0x402dfb
test esi, esi
je 0x402e15
jmp 0x402dfb
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x402e15
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 [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402e30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x402e5c
jl 0x402e50
test esi, esi
jne 0x402e5c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x402e75
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 0x402eaf
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x402eaf
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 - 4], esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0xc]
cmp dword [ebx + 0x4c], 0
mov edx, edi
je 0x402f30
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x402ed8
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 [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, edi
mov ecx, dword [ebp - 4]
cmp edi, 0xfff
jbe 0x402f1c
nop word [eax + eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push ecx
call eax
mov ecx, dword [ebp - 4]
sub edi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x402f43
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x402ef0
test edx, edx
je 0x402f30
push dword [ebx + 0x4c]
push edi
push 1
push ecx
call eax
mov edx, edi
add esp, 0x10
sub edx, eax
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
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
Function at 0x4032a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x409008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x4032d0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040493d
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x403300
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x403300
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.0040493d
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x4033d6
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x403329
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 0x403335
movsx eax, bl
jmp 0x40336d
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 0x403397
sub eax, 1
je 0x403397
sub eax, 2
jne 0x4033d6
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.0040493d
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4033b5
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 0x4033d6
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x4033d6
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040493d
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.0040493d
mov esp, ebp
pop ebp
ret 4