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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00424f41

Function at 0x4254ca
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0042cbb0
mov eax, dword [0x4684d8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0041f631
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x42550c
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x425668
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0042c9e0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x469c38]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004264c1
mov ecx, dword [esi*4 + 0x469c38]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x425661
cmp eax, dword [edi + ecx + 0x24]
jne 0x425661
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x425661
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004264c1
add esp, 0x14
test edx, edx
jl 0x425661
jg 0x4255d7
test eax, eax
jb 0x425661
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x425661
jl 0x4255f1
cmp dword [ebp - 0x1008], eax
ja 0x425661
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x42560f
test ebx, ebx
je 0x425648
cmp ecx, edi
jae 0x425648
mov al, byte [ecx]
cmp al, 0xd
jne 0x425629
lea eax, [edi - 1]
cmp ecx, eax
jae 0x425635
cmp byte [ecx + 1], 0xa
jne 0x425635
inc ecx
jmp 0x425635
movzx eax, al
movsx eax, byte [eax + 0x468c78]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x42560f
cmp edx, ebx
jne 0x42560f
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x425666
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040f206
leave
ret
Function at 0x42595f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x469c38]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x42599f
cmp byte [ebx], 0xa
jne 0x42599f
or byte [eax + edi + 0x28], 4
jmp 0x4259a4
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x425aa2
mov al, byte [edx]
cmp al, 0x1a
je 0x425a84
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4259d3
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4259f8
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x425a02
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x4259b5
jmp 0x425aa2
push 0
lea eax, [ebp - 0xc]
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 0x425a7f
cmp dword [ebp - 0xc], 0
je 0x425a7f
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x469c38]
test byte [eax + edi + 0x28], 0x48
je 0x425a59
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x425a44
mov byte [esi], dl
jmp 0x425a55
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x469c38]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x425aa2
cmp byte [ebp - 1], 0xa
jne 0x425a68
cmp esi, ebx
jne 0x425a68
mov byte [esi], 0xa
jmp 0x425aa1
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004264df
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x425aa2
mov byte [esi], 0xd
jmp 0x425aa1
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x469c38]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x425a9e
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x425aa2
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x425aab
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x469c38]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x425aee
cmp word [esi], dx
jne 0x425aee
or byte [edi + eax + 0x28], 4
jmp 0x425af3
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x425c46
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x425c26
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x425b35
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x425b6b
cmp eax, edx
jae 0x425b77
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x425b0d
jmp 0x425c46
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 0x425c22
cmp dword [ebp - 0x14], 0
je 0x425c22
mov eax, dword [ebx*4 + 0x469c38]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x425bfa
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x425bc3
mov word [esi], cx
jmp 0x425bf6
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x469c38]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x469c38]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x469c38]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x425c46
pop ebx
cmp word [ebp - 4], bx
jne 0x425c0b
cmp esi, dword [ebp + 0xc]
jne 0x425c0b
mov word [esi], bx
jmp 0x425c43
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004264df
add esp, 0x10
cmp word [ebp - 4], bx
je 0x425c46
push 0xd
jmp 0x425c3f
mov ecx, dword [ebx*4 + 0x469c38]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x425c3d
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x425c46
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x42c900
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x42c92d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x42c92d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x10006a99
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x10006ad8
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x10006ad8
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x10006ad8
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x10006ad8
cmp dword [ecx + 0x74], 0xe
jbe 0x10006ad8
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x100094d9
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 0x10009576
push ebx
push esi
call fcn.100094a2
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.10009436
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10009523
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10009575
push edi
push eax
call fcn.10007dd7
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10009543
call fcn.10007f7e
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10009574
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.10009436
add esp, 0x20
test eax, eax
jne 0x10009562
push edi
call fcn.10007f7e
jmp 0x1000956a
push ebx
call fcn.10007f7e
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 0x100097e3
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10011a30
push 0x10011a28
push str.FlsAlloc
push 0x1f
call fcn.100096ff
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10009817
push dword [ebp + 8]
mov ecx, esi
call dword [0x10010158]
call esi
jmp 0x1000981d
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10009861
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10011a40
push 0x10011a38
push str.FlsGetValue
push 0x21
call fcn.100096ff
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10009898
push dword [ebp + 8]
mov ecx, esi
call dword [0x10010158]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x100098a0
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10011a48
push 0x10011a40
push str.FlsSetValue
push 0x22
call fcn.100096ff
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100098da
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x10010158]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1000edf0
Capabilities:
Parse pe header

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

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov ebx, ecx
push 2
push 0
push dword [ebx]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push dword [ebx]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push 0
push 0
push dword [ebx]
mov esi, eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push dword [ebx]
push esi
push 1
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x2c
mov eax, 1
pop esi
pop ebx
pop ebp
ret 8

Function at 0x401830
Capabilities:
Hash data using sha256

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x90
mov eax, dword [0x43f0f0]
xor eax, esp
mov dword [esp + 0x8c], eax
mov edx, dword [ebp + 8]
mov ecx, edx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 8], 0
lea esi, [ecx + 1]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0x6a09e667
mov dword [esp + 0x14], 0xbb67ae85
mov dword [esp + 0x18], 0x3c6ef372
mov dword [esp + 0x1c], 0xa54ff53a
mov dword [esp + 0x20], 0x510e527f
mov dword [esp + 0x24], 0x9b05688c
mov dword [esp + 0x28], 0x1f83d9ab
mov dword [esp + 0x2c], 0x5be0cd19
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4018a7
sub ecx, esi
push ecx
lea ecx, [esp + 0xc]
call fcn.00404b30
add esp, 4
lea edx, [esp + 0x74]
lea ecx, [esp + 8]
call fcn.00404be0
mov byte [edi], 0
xor esi, esi
nop
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4018d5
movzx ecx, byte [esp + esi + 0x74]
sub eax, edx
push ecx
add eax, edi
push str._02x
push eax
call fcn.00401650
inc esi
add esp, 0xc
cmp esi, 0x20
jl 0x4018d0
mov ecx, dword [esp + 0x94]
pop edi
pop esi
xor ecx, esp
call fcn.0042e417
mov esp, ebp
pop ebp
ret

Function at 0x401d80
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov edi, edx
xor eax, eax
xor esi, esi
mov ebx, ecx
test edi, edi
jle 0x401da8
nop
movzx edx, byte [esi + ebx]
inc esi
add edx, eax
imul eax, edx, 0x401
mov ecx, eax
shr ecx, 6
xor eax, ecx
cmp esi, edi
jl 0x401d90
lea ecx, [eax + eax*8]
mov eax, ecx
shr eax, 0xb
pop edi
xor eax, ecx
pop esi
imul eax, eax, 0x8001
pop ebx
ret
Function at 0x405b30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 4], edi
test ebx, ebx
je 0x405c64
cmp dword [ebx], 0
je 0x405c64
cmp byte [edi + 0x251], 0
je 0x405b83
push dword [edi + 0x208]
mov byte [edi + 0x251], 0
call fcn.0042f253
push dword [edi + 0x214]
call fcn.0042f253
push dword [edi + 0x220]
call fcn.0042f253
add esp, 0xc
push esi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push 2
push 0
push dword [ebx]
call esi
push dword [ebx]
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
call ebx
add esp, 0x10
add eax, 0xfa00
mov ecx, edi
push eax
call fcn.004056d0
push dword [edi + 0x204]
push 0
push dword [edi + 0x208]
call sub.VCRUNTIME140.dll_memset
push dword [edi + 0x204]
push 0
push dword [edi + 0x214]
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp + 8]
mov edi, dword [edi + 0x208]
push 2
push 0
push dword [eax]
call esi
mov eax, dword [ebp + 8]
push dword [eax]
call ebx
mov esi, eax
mov eax, dword [ebp + 8]
push 0
push 0
push dword [eax]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov eax, dword [ebp + 8]
push dword [eax]
push esi
push 1
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edi, dword [ebp + 8]
add esp, 0x44
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push 2
push 0
push dword [edi]
call esi
push dword [edi]
call ebx
mov edi, dword [ebp - 4]
push 2
push 0
mov ecx, dword [edi + 0x208]
mov byte [eax + ecx], 0
mov eax, dword [ebp + 8]
push dword [eax]
call esi
mov eax, dword [ebp + 8]
push dword [eax]
call ebx
add esp, 0x20
mov ecx, edi
push eax
push dword [ebp + 0xc]
call fcn.00405340
mov ecx, edi
call fcn.004067b0
pop esi
pop edi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x407cd0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x43f0f0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x407d00
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e417
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x407d30
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x407d30
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.0042e417
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x407e2a
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x407d59
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 0x407d8d
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.0042e417
mov esp, ebp
pop ebp
ret 4
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 0x407de9
sub eax, 1
je 0x407de9
sub eax, 2
jne 0x407e2a
mov edx, dword [esi + 0x4c]
mov cl, byte [ebp - 0x25]
call fcn.00405220
or ecx, 0xffffffff
test al, al
pop edi
cmovne ecx, ebx
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e417
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x407e07
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 0x407e2a
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.0042e417
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.0042e417
mov esp, ebp
pop ebp
ret 4
Function at 0x408470
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x43f0f0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40852c
cmp byte [esi + 0x3d], 0
je 0x40852c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40851a
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 0x4084e1
sub eax, 1
je 0x4084e5
sub eax, 2
jne 0x40851a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e417
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x408503
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 0x40851a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e417
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e417
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0042e417
mov esp, ebp
pop ebp
ret
Function at 0x409640
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [0x4766e8], 0
push ebx
push esi
push edi
mov esi, ecx
jne 0x4096b1
push str.ADVAPI32.DLL
mov dword [0x476704], 0xc
mov dword [0x47670c], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4096a7
push str.ConvertStringSecurityDescriptorToSecurityDescriptorW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
je 0x4096a7
push 0
push 0x476708
push 1
push 0x437048
call ebx
mov dword [0x4766e8], eax
jmp 0x4096b1
mov dword [0x476708], 0
mov ecx, dword [esi + 8]
imul ecx, dword [esi + 0xc]
push dword [esi + 4]
mov eax, dword [esi + 0x10]
lea eax, [ecx + eax*4]
push eax
push 0
push 4
push 0x476704
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esi + 0x18], eax
test eax, eax
je 0x409793
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x409793
mov ecx, dword [esi + 8]
imul ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
lea eax, [ecx + eax*4]
push eax
push 0
push 0
push 6
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x1c], eax
test eax, eax
je 0x409793
mov ecx, dword [esi + 0xc]
xor edi, edi
test ecx, ecx
jle 0x40975b
mov edx, dword [esi + 8]
lea ebx, [edi + 1]
mov eax, dword [esi + 0x1c]
imul edx, ebx
add eax, edx
mov dword [ebp - 4], eax
lea eax, [ecx - 1]
xor ecx, ecx
cmp edi, eax
cmovne ecx, edx
mov edx, dword [ebp - 4]
mov dword [edx - 4], ecx
test edi, edi
jne 0x409748
mov edi, dword [esi + 0xc]
lea eax, [edi - 1]
mov edi, ebx
imul eax, dword [esi + 8]
mov dword [edx - 8], eax
mov ecx, dword [esi + 0xc]
cmp edi, ecx
jl 0x409720
mov eax, dword [esi + 8]
imul eax, ecx
xor ecx, ecx
add eax, dword [esi + 0x1c]
mov dword [esi + 0x14], eax
cmp dword [esi + 0x10], ecx
jle 0x409780
nop
mov eax, dword [esi + 0x14]
mov dword [eax + ecx*4], 0xffffffff
inc ecx
cmp ecx, dword [esi + 0x10]
jl 0x409770
mov eax, dword [esi + 0x14]
pop edi
mov dword [eax], 0
mov eax, dword [esi + 0x1c]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4097a0
Capabilities:
Read file via mapping

Disassembly:
push esi
mov esi, ecx
push dword [esi + 4]
push 1
push 6
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov edx, eax
mov dword [esi + 0x18], edx
test edx, edx
je 0x4097e9
mov ecx, dword [esi + 0xc]
imul ecx, dword [esi + 8]
mov eax, dword [esi + 0x10]
lea eax, [ecx + eax*4]
push eax
push 0
push 0
push 6
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x1c], eax
test eax, eax
je 0x4097e9
mov ecx, dword [esi + 8]
imul ecx, dword [esi + 0xc]
add ecx, eax
mov dword [esi + 0x14], ecx
pop esi
ret
xor eax, eax
pop esi
ret