joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47fc29
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 8]
mov ecx, edx
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, edx
sar ecx, 6
and eax, 0x3f
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x4af188]
mov dword [ebp - 0x18], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x47fc6b
cmp byte [ebx], 0xa
jne 0x47fc6b
or byte [edi + eax + 0x28], 4
jmp 0x47fc70
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x47fd73
mov cl, byte [eax]
cmp cl, 0x1a
je 0x47fd4e
lea ebx, [eax + 1]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp + 0xc]
cmp cl, 0xd
je 0x47fc9f
mov eax, dword [ebp - 8]
jmp 0x47fcbf
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 8], edx
mov edx, dword [ebp + 8]
jae 0x47fcdb
mov ebx, dword [ebp - 8]
cmp byte [ebx], 0xa
jne 0x47fcb9
add eax, 2
mov cl, 0xa
jmp 0x47fcbc
mov eax, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov byte [esi], cl
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0xc]
add esi, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jb 0x47fc81
jmp 0x47fd73
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x47fd49
cmp dword [ebp - 0x10], 0
je 0x47fd49
mov edx, dword [ebp - 0x18]
mov eax, dword [edx*4 + 0x4af188]
test byte [eax + edi + 0x28], 0x48
je 0x47fd28
mov cl, byte [ebp - 1]
cmp cl, 0xa
jne 0x47fd18
mov byte [esi], 0xa
jmp 0x47fd72
mov byte [esi], 0xd
mov eax, dword [edx*4 + 0x4af188]
mov byte [eax + edi + 0x2a], cl
jmp 0x47fd72
cmp byte [ebp - 1], 0xa
jne 0x47fd32
cmp esi, ebx
je 0x47fd13
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0047a353
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x47fd73
mov byte [esi], 0xd
jmp 0x47fd72
mov eax, edx
and edx, 0x3f
sar eax, 6
imul edx, edx, 0x38
mov edi, dword [eax*4 + 0x4af188]
mov al, byte [edi + edx + 0x28]
test al, 0x40
jne 0x47fd70
or al, 2
mov byte [edi + edx + 0x28], al
jmp 0x47fd73
mov byte [esi], cl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x47fd7c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
and eax, 0x3f
push ebx
mov ebx, dword [ebp + 0xc]
sar edx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [edx*4 + 0x4af188]
mov dword [ebp - 8], edx
mov edx, dword [eax + edi + 0x18]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x47fdc0
push 0xa
pop esi
cmp word [ebx], si
jne 0x47fdc0
or byte [eax + edi + 0x28], 4
jmp 0x47fdc5
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + edx*2]
mov eax, ebx
mov dword [ebp - 0x10], edx
mov esi, ebx
cmp ebx, edx
jae 0x47ff30
movzx edx, word [eax]
mov ecx, edx
mov dword [ebp - 0xc], ecx
movzx ecx, cx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
cmp edx, 0x1a
je 0x47ff08
lea ebx, [eax + 2]
mov dword [ebp - 4], ebx
push 0xd
pop ebx
cmp dx, bx
mov ebx, dword [ebp + 0xc]
je 0x47fe12
mov ebx, dword [ebp - 0x14]
mov edx, esi
mov eax, dword [ebp - 4]
movzx ebx, bx
mov dword [ebp - 4], ebx
jmp 0x47fe3c
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x10]
jae 0x47fe5b
push 0xa
pop ebx
cmp word [edx], bx
jne 0x47fe29
push ebx
add eax, 4
pop edx
jmp 0x47fe31
mov eax, edx
mov edx, dword [ebp - 0xc]
movzx edx, dx
movzx edx, dx
mov dword [ebp - 4], edx
mov edx, esi
mov dword [ebp - 0x14], esi
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], 2
mov word [esi], cx
mov esi, dword [ebp - 0xc]
add esi, edx
cmp eax, dword [ebp - 0x10]
jb 0x47fdd7
jmp 0x47ff30
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x47ff03
cmp dword [ebp - 0x14], 0
je 0x47ff03
mov eax, dword [ebp - 8]
push 0xa
mov eax, dword [eax*4 + 0x4af188]
test byte [eax + edi + 0x28], 0x48
pop eax
je 0x47fedf
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x47fea7
mov word [esi], ax
jmp 0x47ff2d
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebp - 8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov eax, dword [eax*4 + 0x4af188]
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x4af188]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4af188]
pop ecx
mov byte [eax + edi + 0x2c], cl
jmp 0x47ff2d
cmp word [ebp - 4], ax
jne 0x47fee9
cmp esi, ebx
je 0x47fe9f
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0047a353
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x47ff30
push 0xd
pop eax
jmp 0x47fe9f
mov eax, ecx
and ecx, 0x3f
sar eax, 6
imul ecx, ecx, 0x38
mov edi, dword [eax*4 + 0x4af188]
mov al, byte [edi + ecx + 0x28]
test al, 0x40
jne 0x47ff2a
or al, 2
mov byte [edi + ecx + 0x28], al
jmp 0x47ff30
mov word [esi], dx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4819d8
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x18
mov eax, dword [eax + 0xc]
nop
shr eax, 3
test al, 1
je 0x4819f2
mov al, 1
leave
ret
mov eax, dword [ebp + 8]
push ebx
push esi
mov eax, dword [eax + 0xc]
nop
test al, 0xc0
mov eax, dword [ebp + 8]
je 0x481a09
mov ecx, dword [eax]
cmp ecx, dword [eax + 4]
je 0x481a61
mov eax, dword [eax + 0x10]
nop
push eax
call fcn.00485237
mov esi, eax
pop ecx
cmp esi, 0xffffffff
je 0x481a61
xor ebx, ebx
lea eax, [ebp - 0x10]
inc ebx
xorps xmm0, xmm0
push ebx
push eax
movlpd qword [ebp - 8], xmm0
push dword [ebp - 4]
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x481a61
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x481a61
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jne 0x481a5b
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
je 0x481a5d
xor bl, bl
mov al, bl
jmp 0x481a63
xor al, al
pop esi
pop ebx
leave
ret
Function at 0x485325
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.004852a1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x485494
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x485494
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x485449
jg 0x485381
test eax, eax
je 0x48543f
push 1
push 0x1000
call fcn.004821e0
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4853a4
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x485436
push 0x8000
push ebx
call fcn.0047d450
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4853cd
jg 0x4853c8
cmp ecx, 0x1000
jb 0x4853cd
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00480ea3
add esp, 0x10
cmp eax, 0xffffffff
je 0x485412
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x4853c8
jl 0x4853f9
test ecx, ecx
jne 0x4853ba
push dword [ebp - 0xc]
push ebx
call fcn.0047d450
push esi
call fcn.00482660
add esp, 0xc
xor ebx, ebx
jmp 0x4854a2
cmp byte [edi + 0x24], 0
je 0x485429
cmp dword [edi + 0x20], 5
jne 0x485429
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x485434
mov ebx, dword [edi + 0x18]
jmp 0x485436
xor ebx, ebx
push esi
call fcn.00482660
pop ecx
jmp 0x4854a2
test ecx, ecx
jg 0x48540b
jl 0x485449
test eax, eax
jae 0x48540b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0047a353
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x485469
cmp byte [edi + 0x1c], 0
je 0x48540b
jmp 0x48549a
push ebx
call fcn.00485237
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x48540b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4854a2
cmp byte [edi + 0x1c], 0
je 0x48549f
mov ebx, dword [edi + 0x18]
jmp 0x4854a2
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0047a353
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x48822f
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x4882cc
push ebx
push esi
call fcn.004881f8
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00484a69
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x488279
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4882cb
push edi
push eax
call fcn.00482850
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x488299
call fcn.00482660
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4882ca
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00484a69
add esp, 0x20
test eax, eax
jne 0x4882b8
push edi
call fcn.00482660
jmp 0x4882c0
push ebx
call fcn.00482660
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x4882cf
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4882e0
pop esi
ret
push ebx
push edi
push esi
call fcn.004881f8
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00482850
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x488308
push ebx
push esi
push edi
call fcn.00467e10
add esp, 0xc
push 0
call fcn.00482660
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x488a5f
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0048857b

Function at 0x48aa3b
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.00481e61
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x48aaaa
cmp esi, dword [ebp - 4]
je 0x48aaa5
cmp dword [ebp + 0xc], 0
je 0x48aaa5
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x48aa82
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0048a578
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x48aaac
xor eax, eax
inc eax
jmp 0x48aaac
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x48ab17
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4ad440]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.00481e61
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.00481e61
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x48ab8e
cmp word [ecx], dx
je 0x48ab8e
mov eax, dword [0x4a491c]
push edi
dec eax
push eax
push 0x4a4808
call fcn.0048aab0
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x48ac01
cmp word [eax], dx
je 0x48ac01
mov eax, dword [edi]
test eax, eax
je 0x48abb2
cmp word [eax], dx
je 0x48abb2
lea eax, [ebp - 0x10]
push eax
call fcn.0048a47e
jmp 0x48abbb
lea eax, [ebp - 0x10]
push eax
call fcn.0048a519
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x48ac2b
mov eax, dword [0x4a4804]
push dword [ebp - 0x14]
dec eax
push eax
push 0x4a44f8
call fcn.0048aab0
add esp, 0xc
test al, al
je 0x48ac2b
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x48abf6
cmp word [eax], di
je 0x48abf6
lea eax, [ebp - 0x10]
push eax
call fcn.0048a47e
pop ecx
jmp 0x48ac2d
lea eax, [ebp - 0x10]
push eax
call fcn.0048a519
jmp 0x48abf3
mov eax, dword [edi]
test eax, eax
je 0x48ac18
cmp word [eax], dx
je 0x48ac18
lea eax, [ebp - 0x10]
push eax
call fcn.0048a433
pop ecx
jmp 0x48ac2b
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x48acf6
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0048a935
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x48acf6
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x48acf6
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x48acf6
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x48ac83
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.00484445
test ebx, ebx
je 0x48acf1
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.00484445
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x48acf6
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x48acf6
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.0048e003
add esp, 0x10
xor eax, eax
inc eax
jmp 0x48acf8
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00466003
leave
ret
Function at 0x48d78d
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x4ad440]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x48d7d0
call fcn.00471980
mov dword [eax], 0xf
call fcn.00471995
mov dword [eax], 0xd
call fcn.004717d5
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00466003
leave
ret
test eax, eax
jne 0x48d7d7
inc eax
jmp 0x48d7c4
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x48d7c2
xor eax, eax
cmp ecx, 1
setne al
jmp 0x48d7c4

Function at 0x48fc00
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x48fc2d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x48fc2d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401e20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x401edc
cmp byte [esi + 0x3d], 0
je 0x401edc
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x401eca
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 0x401e91
sub eax, 1
je 0x401e95
sub eax, 2
jne 0x401eca
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c70
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x401eb3
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 0x401eca
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c70
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403c70
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00403c70
mov esp, ebp
pop ebp
ret
Function at 0x4036e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x403701
jl 0x4036f7
test esi, esi
jne 0x403701
pop esi
xor eax, eax
xor edx, edx
pop ebx
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x403718
push eax
push esi
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__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
pop ebp
ret 0xc
push edi
mov edi, esi
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Gnavail_void_const]
test eax, eax
je 0x40374e
cmp eax, dword [ebp + 0xc]
mov ecx, ebx
cmovb esi, eax
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gptr_void_const]
push esi
push eax
push dword [ebp + 8]
call sub.VCRUNTIME140.dll_memcpy
add dword [ebp + 8], esi
add esp, 0xc
mov ecx, ebx
sub edi, esi
push esi
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::gbump_int_]
cmp dword [ebx + 0x4c], 0
mov esi, dword [ebp + 8]
je 0x4037bd
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const]
lea ecx, [ebx + 0x3c]
cmp eax, ecx
jne 0x403776
push dword [ebx + 0x54]
mov eax, dword [ebx + 0x50]
mov ecx, ebx
push eax
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, edi
cmp edi, 0xfff
jbe 0x4037ab
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
sub edi, eax
add esp, 0x10
add esi, eax
mov ecx, edi
cmp eax, 0xfff
jne 0x4037bd
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x403785
test ecx, ecx
je 0x4037bd
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
pop ebp
ret 0xc
Function at 0x4037d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x4037f5
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
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], edi
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const]
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x403860
jg 0x40381b
test esi, esi
je 0x403860
test ecx, ecx
jl 0x40389a
jg 0x403825
test eax, eax
je 0x40389a
cmp edi, ecx
jg 0x403835
jl 0x40382f
cmp esi, eax
jae 0x403835
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
push dword [ebp + 0x10]
push dword [ebp + 8]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp + 0x10]
add esp, 0xc
add dword [ebp + 8], eax
mov ecx, ebx
sub esi, eax
sbb edi, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int_]
mov eax, dword [ebp + 8]
test edi, edi
jl 0x403887
jg 0x40386d
test esi, esi
je 0x403887
mov ecx, dword [ebx + 0x4c]
test ecx, ecx
je 0x403887
push ecx
push esi
push 1
push eax
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 - 8]
mov edx, dword [ebp - 0xc]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 8]
jmp 0x40386d
Function at 0x4044f9
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x404538
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x404538
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404538
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x404538
cmp dword [ecx + 0x74], 0xe
jbe 0x404538
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret