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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x687160]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x5b5576
cmp word [ebx], dx
jne 0x5b5576
or byte [eax + edi + 0x28], 4
jmp 0x5b557b
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x5b56de
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x5b56be
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x5b55bc
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x5b55f2
cmp eax, edx
jae 0x5b5600
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x5b5597
jmp 0x5b56de
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5b56b9
cmp dword [ebp - 0x18], 0
je 0x5b56b9
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x687160]
test byte [eax + edi + 0x28], 0x48
je 0x5b568f
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x5b5653
mov word [esi], cx
jmp 0x5b568a
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x687160]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x687160]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x687160]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x5b56de
pop eax
cmp word [ebp - 4], ax
jne 0x5b569f
cmp esi, ebx
jne 0x5b569f
mov word [esi], ax
jmp 0x5b56db
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.005b6103
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x5b56de
push 0xd
pop eax
jmp 0x5b569a
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x687160]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x5b56d8
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x5b56de
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x5b8e03
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x67c3c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x5b8e4e
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.005b8f9e
test al, al
jne 0x5b8e48
sub edx, 2
cmp edx, edi
jne 0x5b8e2e
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x5b8e70
lea eax, [edi + 2]
cmp edx, eax
je 0x5b8e70
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.005b8d4f
add esp, 0x10
jmp 0x5b8f6a
push esi
lea ecx, [ebp - 0x255]
call fcn.005b8f9e
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x5b8eb3
push dword [ebp - 0x25c]
jmp 0x5b8e60
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x5b8ef0
cmp word [ebp - 0x226], 0
je 0x5b8f11
cmp word [ebp - 0x226], ax
jne 0x5b8ef0
cmp word [ebp - 0x224], 0
je 0x5b8f11
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.005b8d4f
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x5b8f5d
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x5b8eca
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x5b8f45
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x5b8f6a
push 0x5b8b7f
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.005aaed0
add esp, 0x10
jmp 0x5b8f3a
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0059a5ad
leave
ret

Function at 0x5bc4af
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.005b44d3
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 0x5bc51e
cmp esi, dword [ebp - 4]
je 0x5bc519
cmp dword [ebp + 0xc], 0
je 0x5bc519
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x5bc4f6
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.005bc001
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x5bc520
xor eax, eax
inc eax
jmp 0x5bc520
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x5bc585
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x67c3c0]
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.005b44d3
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.005b44d3
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 0x5bc5fc
cmp word [ecx], dx
je 0x5bc5fc
mov eax, dword [0x651a14]
push edi
dec eax
push eax
push 0x651900
call fcn.005bc524
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x5bc66f
cmp word [eax], dx
je 0x5bc66f
mov eax, dword [edi]
test eax, eax
je 0x5bc620
cmp word [eax], dx
je 0x5bc620
lea eax, [ebp - 0x10]
push eax
call fcn.005bbf07
jmp 0x5bc629
lea eax, [ebp - 0x10]
push eax
call fcn.005bbfa2
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x5bc699
mov eax, dword [0x6518fc]
push dword [ebp - 0x14]
dec eax
push eax
push 0x6515f0
call fcn.005bc524
add esp, 0xc
test al, al
je 0x5bc699
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x5bc664
cmp word [eax], di
je 0x5bc664
lea eax, [ebp - 0x10]
push eax
call fcn.005bbf07
pop ecx
jmp 0x5bc69b
lea eax, [ebp - 0x10]
push eax
call fcn.005bbfa2
jmp 0x5bc661
mov eax, dword [edi]
test eax, eax
je 0x5bc686
cmp word [eax], dx
je 0x5bc686
lea eax, [ebp - 0x10]
push eax
call fcn.005bbebc
pop ecx
jmp 0x5bc699
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 0x5bc764
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.005bc3a9
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x5bc764
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x5bc764
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x5bc764
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x5bc6f1
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.005b3309
test ebx, ebx
je 0x5bc75f
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.005b3309
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x5bc764
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 0x5bc764
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.005c2500
add esp, 0x10
xor eax, eax
inc eax
jmp 0x5bc766
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0059a5ad
leave
ret
Function at 0x5c2735
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.005c26b1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x5c28a4
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x5c28a4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x5c2859
jg 0x5c2791
test eax, eax
je 0x5c284f
push 1
push 0x1000
call fcn.005b2c98
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x5c27b4
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x5c2846
push 0x8000
push ebx
call fcn.005b0699
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x5c27dd
jg 0x5c27d8
cmp ecx, 0x1000
jb 0x5c27dd
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.005b51c7
add esp, 0x10
cmp eax, 0xffffffff
je 0x5c2822
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 0x5c27d8
jl 0x5c2809
test ecx, ecx
jne 0x5c27ca
push dword [ebp - 0xc]
push ebx
call fcn.005b0699
push esi
call fcn.005b2cf5
add esp, 0xc
xor ebx, ebx
jmp 0x5c28b2
cmp byte [edi + 0x24], 0
je 0x5c2839
cmp dword [edi + 0x20], 5
jne 0x5c2839
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x5c2844
mov ebx, dword [edi + 0x18]
jmp 0x5c2846
xor ebx, ebx
push esi
call fcn.005b2cf5
pop ecx
jmp 0x5c28b2
test ecx, ecx
jg 0x5c281b
jl 0x5c2859
test eax, eax
jae 0x5c281b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.005b6103
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x5c2879
cmp byte [edi + 0x1c], 0
je 0x5c281b
jmp 0x5c28aa
push ebx
call fcn.005ba37f
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x5c281b
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 0x5c28b2
cmp byte [edi + 0x1c], 0
je 0x5c28af
mov ebx, dword [edi + 0x18]
jmp 0x5c28b2
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.005b6103
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x5c3320
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x5c334d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x5c334d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x2aa01671
Capabilities:
Check os version
Create process on windows
Delete file
Encode data using xor
Get common file path
Get file size
Read file on windows
Shutdown system
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
mov eax, dword [0x2aa01110]
push ebx
push esi
mov dword [esp + 0x220], eax
push edi
xor eax, eax
lea ecx, [ecx]
xor byte [eax + 0x2aa02608], 0x71
inc eax
cmp eax, 0x730
jl 0x2aa01691
push 0x104
lea eax, [esp + 0x14]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 3
push 0x10000000
push 0x2aa01134
call ebx
cmp eax, 0xffffffff
jne 0x2aa01734
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 5
jbe 0x2aa01746
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFindAtomA]
push 0x2aa01168
call ebx
test ax, ax
jne 0x2aa0172c
mov esi, dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push 0
push 0
lea ecx, [esp + 0x1c]
push ecx
push 0x2aa01160
push 0
call esi
push 0x3e8
call edi
push 0x2aa01168
call ebx
test ax, ax
je 0x2aa01705
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x2aa01168
call dword [sym.imp.KERNEL32.dll_GlobalAddAtomA]
push 0x2710
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push esi
mov edi, eax
push 0x2aa02608
push edi
call sub.CRTDLL.dll_sprintf
mov edx, 0x2aa02608
add esp, 0x30
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x2aa01776
lea edx, [esp + 0x118]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [esp + 0x118]
dec edi
jmp 0x2aa017a0
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x2aa017a0
mov eax, dword [0x2aa01154]
mov ecx, dword [0x2aa01158]
mov dx, word [0x2aa0115c]
push 0
push 0
push 3
mov dword [edi], eax
mov al, byte [0x2aa0115e]
push 0
mov dword [edi + 4], ecx
push 3
push 0x80000000
lea ecx, [esp + 0x130]
mov word [edi + 8], dx
push ecx
mov byte [edi + 0xa], al
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x2aa0184c
xor eax, eax
push eax
mov ecx, 0x41
lea edi, [esp + 0x14]
push esi
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0
push 0
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [esp + 0x10]
push edx
push edi
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call fcn.2aa01180
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call fcn.2aa01220
call fcn.2aa01470
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x4013ca
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [0x42d124], 1
mov dword [0x42d128], 1
mov dword [0x42d12c], 1
mov dword [0x42d118], 1
mov dword [ebp - 4], 0x400000
mov eax, dword [ebp - 4]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x401415
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 4]
add eax, edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x401438
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 8]
add eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
movzx eax, ax
cmp eax, 0x10b
je 0x40145a
cmp eax, 0x20b
je 0x40147f
jmp 0x4014aa
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x5c]
cmp eax, 0xe
ja 0x40146c
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x4014af
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x6c]
cmp eax, 0xe
ja 0x401497
mov eax, 0
jmp 0x4014af
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x4014af
mov eax, 0
leave
ret

Function at 0x4037f0
Capabilities:
Read file on windows

Disassembly:
push edi
push esi
mov esi, ecx
push ebx
sub esp, 0x10
mov edi, dword [esp + 0x20]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 1
mov dword [esp + 8], edi
mov dword [esp], edx
call sym._fread
mov ebx, eax
cmp edi, eax
je 0x403826
mov dword [esp], esi
call sym._ferror
test eax, eax
jne 0x403838
add esp, 0x10
mov eax, ebx
pop ebx
pop esi
pop edi
ret 4
mov ecx, esi
call sym._checkErr__stdZsyncio_u165_4.part.0
add esp, 0x10
mov eax, ebx
pop ebx
pop esi
pop edi
ret 4

Function at 0x403e90
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
mov ebx, ecx
sub esp, 0x14
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], edx
call sym._fwrite
mov dword [esp], ebx
mov esi, eax
call sym._ferror
test eax, eax
je 0x403ec8
mov ecx, ebx
call sym._checkErr__stdZsyncio_u165_4.part.0
add esp, 0x14
mov eax, esi
pop ebx
pop esi
ret 4
Function at 0x404210
Capabilities:
Read file on windows

Disassembly:
push edi
push esi
mov esi, ecx
mov ecx, 0xfa0
push ebx
sub esp, 0x20
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0x423268
call sym._mnewString_4
mov dword [esp], 0x4220d0
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
call sym.___emutls_get_address
mov edi, eax
mov eax, dword [esp + 0x1c]
add eax, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0xfa0
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._fread
mov ebx, eax
cmp eax, 0xfa0
je 0x4042c0
mov dword [esp], esi
call sym._ferror
test eax, eax
je 0x404297
mov ecx, esi
call sym._checkErr__stdZsyncio_u165_4.part.0
cmp byte [edi], 0
je 0x404330
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4042b0
test dword [eax], 0x40000000
je 0x404310
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
add esp, 0x20
pop ebx
pop esi
pop edi
ret
cmp byte [edi], 0
jne 0x4042a0
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x10]
call sym._prepareAdd_8
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test ebx, ebx
jle 0x40425c
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
add eax, 4
mov dword [esp + 4], eax
lea edx, [ecx + edx + 4]
lea ecx, [ebx + 1]
mov dword [esp + 8], ecx
mov dword [esp], edx
call sym._memcpy
add dword [esp + 0x10], ebx
jmp 0x404258
mov dword [esp], eax
call sym._deallocShared
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
add esp, 0x20
pop ebx
pop esi
pop edi
ret
mov edx, ebx
lea ecx, [esp + 0x18]
call sym._setLengthStrV2_8
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x10]
call sym._prepareAdd_8
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
test ebx, ebx
jle 0x4042a4
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
add eax, 4
mov dword [esp + 4], eax
lea edx, [ecx + edx + 4]
lea ecx, [ebx + 1]
mov dword [esp + 8], ecx
mov dword [esp], edx
call sym._memcpy
add dword [esp + 0x10], ebx
mov eax, dword [esp + 0x1c]
jmp 0x4042a4
Function at 0x404390
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x3c
mov ebp, dword [esp + 0x50]
mov eax, dword [esp + 0x54]
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov ecx, ebp
mov dword [esp + 0x1c], eax
call sym._mnewString_4
mov dword [esp + 0xc], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], ebp
add eax, 4
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._fread
mov edi, eax
cmp ebp, eax
je 0x4043f9
mov dword [esp], ebx
call sym._ferror
test eax, eax
jne 0x4044c0
mov dword [esp], 0x4220d0
call sym.___emutls_get_address
cmp byte [eax], 0
mov esi, eax
jne 0x404449
mov dword [esp], ebx
call sym._fgetc
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [esp + 0x18], eax
call sym._ungetc
cmp byte [esi], 0
jne 0x404449
mov edx, dword [esp + 0x18]
test edx, edx
jns 0x404460
mov eax, edi
cdq
cmp edi, ebp
mov eax, edx
sbb eax, dword [esp + 0x1c]
jge 0x404449
mov edx, edi
lea ecx, [esp + 0x28]
call sym._setLengthStrV2_8
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov ecx, ebx
call sym._readAllBuffer__stdZsyncio_u519_4
cmp byte [esi], 0
mov ebx, eax
mov edi, edx
jne 0x4044a5
mov edx, eax
lea ecx, [esp + 0x28]
call sym._prepareAdd_8
test ebx, ebx
jle 0x4044a5
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
lea ecx, [ebx + 1]
mov dword [esp + 8], ecx
lea eax, [edx + eax + 4]
lea edx, [edi + 4]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._memcpy
add dword [esp + 0x28], ebx
test edi, edi
je 0x404449
test dword [edi], 0x40000000
jne 0x404449
mov dword [esp], edi
call sym._deallocShared
jmp 0x404449
mov ecx, ebx
call sym._checkErr__stdZsyncio_u165_4.part.0
jmp 0x4043f9

Function at 0x4048d0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, eax
xor eax, eax
push ebx
mov ebx, edx
sub esp, 0x14
test edx, edx
je 0x4048e7
mov dword [esp], edx
call sym._strlen
mov dword [esp + 0xc], esi
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
call sym._fwrite
mov dword [esp], esi
call sym._fflush
add esp, 0x14
pop ebx
pop esi
ret
Function at 0x409180
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x24
mov eax, dword [0x42d0a8]
test eax, eax
je 0x4091d0
call sym._cstrToNimstr_4
mov dword [esp], eax
mov ebx, edx
mov dword [esp + 4], edx
call dword [0x42d0a8]
sub esp, 8
test ebx, ebx
je 0x4091b1
test dword [ebx], 0x40000000
je 0x409210
mov dword [esp], 0x4220d0
call sym.___emutls_get_address
cmp byte [eax], 0
jne 0x409230
add esp, 0x24
pop ebx
pop esi
ret
mov ebx, edx
mov dword [esp + 0x1c], ecx
mov dword [esp], 2
call dword [0x422260]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov esi, eax
mov dword [esp], ecx
mov dword [esp + 4], 1
call sym._fwrite
mov dword [esp], esi
call sym._fflush
add esp, 0x24
pop ebx
pop esi
ret
mov dword [esp], 0x4220e0
call sym.___emutls_get_address
mov edx, ebx
mov ecx, eax
call sym._rawDealloc__system_u6949_8
jmp 0x4091b1
mov byte [eax], 0
mov dword [esp], 0x422050
call sym.___emutls_get_address
mov ebx, dword [eax]
mov edx, dword [ebx + 0x1c]
test edx, edx
je 0x40924c
add dword [edx - 8], 0x10
mov dword [eax], edx
mov eax, dword [ebx - 8]
lea edx, [ebx - 8]
test eax, 0xfffffff0
je 0x409280
sub eax, 0x10
mov dword [ebx - 8], eax
mov eax, dword [ebx]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp], 0
call sym._rememberCycle__system_u3375
jmp 0x4091c2
mov eax, dword [ebx]
mov dword [esp + 4], edx
mov dword [esp], 1
mov dword [esp + 8], eax
call sym._rememberCycle__system_u3375
add esp, 0x24
mov ecx, ebx
pop ebx
pop esi
jmp sym._nimDestroyAndDispose_4

Function at 0x40ae50
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
mov edi, edx
push esi
push ebx
mov ebx, ecx
sub esp, 0x2c
mov dword [esp + 0x1c], edx
mov dword [esp], 0x42d08c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
test edi, edi
jle 0x40aed0
mov dword [esp], 0x4220d0
xor esi, esi
call sym.___emutls_get_address
mov ebp, dword [sym.___acrt_iob_func]
mov edi, eax
jmp 0x40ae9c
add esi, 1
add ebx, 8
cmp dword [esp + 0x1c], esi
je 0x40aed6
mov dword [esp], 1
call ebp
mov dword [esp + 8], 0
mov edx, dword [ebx + 4]
mov ecx, eax
mov eax, dword [ebx]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._writeWindows__system_u8919_16
sub esp, 0xc
cmp byte [edi], 0
je 0x40ae90
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [sym.___acrt_iob_func]
mov dword [esp], 1
call ebp
mov dword [esp + 8], 1
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x42337d
call sym._fwrite
mov dword [esp], 1
call ebp
mov dword [esp], eax
call sym._fflush
mov dword [esp], 0x42d08c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret