joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1004734f
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 + 0x101c18f8]
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 0x10047395
cmp word [ebx], dx
jne 0x10047395
or byte [eax + edi + 0x28], 4
jmp 0x1004739a
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 0x100474fd
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 0x100474dd
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x100473db
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x10047411
cmp eax, edx
jae 0x1004741f
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 0x100473b6
jmp 0x100474fd
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 0x100474d8
cmp dword [ebp - 0x18], 0
je 0x100474d8
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x101c18f8]
test byte [eax + edi + 0x28], 0x48
je 0x100474ae
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 0x10047472
mov word [esi], cx
jmp 0x100474a9
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x101c18f8]
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 + 0x101c18f8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x101c18f8]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x100474fd
pop eax
cmp word [ebp - 4], ax
jne 0x100474be
cmp esi, ebx
jne 0x100474be
mov word [esi], ax
jmp 0x100474fa
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10047c51
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x100474fd
push 0xd
pop eax
jmp 0x100474b9
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x101c18f8]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x100474f7
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x100474fd
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 0x10049eab
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 0x10049f48
push ebx
push esi
call fcn.10049e74
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.10048c70
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10049ef5
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10049f47
push edi
push eax
call fcn.10045801
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10049f15
call fcn.1004403b
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10049f46
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.10048c70
add esp, 0x20
test eax, eax
jne 0x10049f34
push edi
call fcn.1004403b
jmp 0x10049f3c
push ebx
call fcn.1004403b
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 0x1004d241
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.10042007
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 0x1004d2b0
cmp esi, dword [ebp - 4]
je 0x1004d2ab
cmp dword [ebp + 0xc], 0
je 0x1004d2ab
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1004d288
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.1004cd93
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x1004d2b2
xor eax, eax
inc eax
jmp 0x1004d2b2
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x1004d317
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x10065040]
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.10042007
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.10042007
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 0x1004d38e
cmp word [ecx], dx
je 0x1004d38e
mov eax, dword [0x100589cc]
push edi
dec eax
push eax
push 0x100588b8
call fcn.1004d2b6
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x1004d401
cmp word [eax], dx
je 0x1004d401
mov eax, dword [edi]
test eax, eax
je 0x1004d3b2
cmp word [eax], dx
je 0x1004d3b2
lea eax, [ebp - 0x10]
push eax
call fcn.1004cc99
jmp 0x1004d3bb
lea eax, [ebp - 0x10]
push eax
call fcn.1004cd34
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x1004d42b
mov eax, dword [0x100588b4]
push dword [ebp - 0x14]
dec eax
push eax
push 0x100585a8
call fcn.1004d2b6
add esp, 0xc
test al, al
je 0x1004d42b
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x1004d3f6
cmp word [eax], di
je 0x1004d3f6
lea eax, [ebp - 0x10]
push eax
call fcn.1004cc99
pop ecx
jmp 0x1004d42d
lea eax, [ebp - 0x10]
push eax
call fcn.1004cd34
jmp 0x1004d3f3
mov eax, dword [edi]
test eax, eax
je 0x1004d418
cmp word [eax], dx
je 0x1004d418
lea eax, [ebp - 0x10]
push eax
call fcn.1004cc4e
pop ecx
jmp 0x1004d42b
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 0x1004d4f6
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.1004d13b
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x1004d4f6
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x1004d4f6
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x1004d4f6
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1004d483
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.1004468f
test ebx, ebx
je 0x1004d4f1
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.1004468f
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1004d4f6
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 0x1004d4f6
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.1005038c
add esp, 0x10
xor eax, eax
inc eax
jmp 0x1004d4f8
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1002eb4c
leave
ret
Function at 0x100500c1
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.1005003d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10050230
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10050230
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x100501e5
jg 0x1005011d
test eax, eax
je 0x100501db
push 1
push 0x1000
call fcn.10043ba9
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10050140
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x100501d2
push 0x8000
push ebx
call fcn.1004ff6e
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x10050169
jg 0x10050164
cmp ecx, 0x1000
jb 0x10050169
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.10045345
add esp, 0x10
cmp eax, 0xffffffff
je 0x100501ae
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 0x10050164
jl 0x10050195
test ecx, ecx
jne 0x10050156
push dword [ebp - 0xc]
push ebx
call fcn.1004ff6e
push esi
call fcn.1004403b
add esp, 0xc
xor ebx, ebx
jmp 0x1005023e
cmp byte [edi + 0x24], 0
je 0x100501c5
cmp dword [edi + 0x20], 5
jne 0x100501c5
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x100501d0
mov ebx, dword [edi + 0x18]
jmp 0x100501d2
xor ebx, ebx
push esi
call fcn.1004403b
pop ecx
jmp 0x1005023e
test ecx, ecx
jg 0x100501a7
jl 0x100501e5
test eax, eax
jae 0x100501a7
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10047c51
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10050205
cmp byte [edi + 0x1c], 0
je 0x100501a7
jmp 0x10050236
push ebx
call fcn.1004b0e0
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x100501a7
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 0x1005023e
cmp byte [edi + 0x1c], 0
je 0x1005023b
mov ebx, dword [edi + 0x18]
jmp 0x1005023e
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10047c51
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x10051fe0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1005200d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1005200d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x40a561
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
cld
mov dl, 0x80
movsb byte es:[edi], byte [esi]
call fcn.0040a5e0
jae 0x40a56d
xor ecx, ecx
call fcn.0040a5e0
jae 0x40a597
xor eax, eax
call fcn.0040a5e0
jae 0x40a5a8
mov al, 0x10
call fcn.0040a5e0
adc al, al
jae 0x40a589
jne 0x40a5d5
stosb byte es:[edi], al
jmp 0x40a56e
call fcn.0040a5ec
dec ecx
loop 0x40a5b4
mov eax, ebp
call fcn.0040a5ea
jmp 0x40a5d6
lodsb al, byte [esi]
shr eax, 1
je 0x40a5fc
adc ecx, 2
mov ebp, eax
jmp 0x40a5d6
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
mov ebp, eax
call fcn.0040a5ea
cmp eax, 0x7d00
jae 0x40a5d4
cmp eax, 0x500
jae 0x40a5d5
cmp eax, 0x7f
ja 0x40a5d6
inc ecx
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x40a56e
pop ebp
ret 8

Function at 0x43b652
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
mov eax, 0x43b3c1
mov esi, 0xe56c6a84
call fcn.0043b691
dec esi
xor dword [edx], eax
inc esi
mov ebx, ebx
and ebx, esi
inc edx
mov ebx, ebx
add ebx, 0xec3bc038
sub ebx, 1
cmp edx, edi
jne fcn.0043b652
sub esi, 0xa5e2ebdb
add esi, esi
mov ebx, ebx
ret
Function at 0x402f99
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
je 0x402fee
push dword [esp + 0x10]
push 0x402f18
call dword [sym.imp.USER32.DLL_EnumWindows]
mov esi, dword [0x40f928]
test esi, esi
je 0x403047
xor edi, edi
mov ebx, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x402fe6
cmp byte [esi + 0x10], 0
je 0x402fe6
push 3
push edi
push edi
push edi
push edi
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
mov esi, ebx
test ebx, ebx
jne 0x402fc2
jmp 0x403047
mov esi, dword [0x40f928]
test esi, esi
je 0x403047
xor edi, edi
push ebp
mov ebx, dword [esi]
lea ebp, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp], eax
jne 0x403040
cmp byte [esi + 0x11], 0
je 0x40301c
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_EnableWindow]
cmp byte [esi + 0x10], 0
je 0x403033
push 3
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
push ebp
push 0x40f928
call fcn.0040bc3e
pop ecx
pop ecx
mov esi, ebx
test ebx, ebx
jne 0x402ffb
pop ebp
pop edi
pop esi
pop ebx
ret 4
Function at 0x40400c
Capabilities:
Get graphical window text

Disassembly:
push ebx
push dword [esp + 8]
push dword [0x40fb64]
call fcn.0040b4d4
mov ebx, eax
test ebx, ebx
je 0x404070
mov ecx, dword [ebx + 4]
mov eax, dword [ecx + 0x18]
test eax, eax
je 0x404035
push dword [esp + 0xc]
push ebx
call eax
jmp 0x404070
push esi
push edi
push dword [ebx]
call dword [sym.imp.USER32.DLL_GetWindowTextLengthW]
push dword [esp + 0x14]
mov edi, eax
push edi
call fcn.0040bee0
mov esi, eax
lea ecx, [edi + 1]
push ecx
xor eax, eax
push esi
mov word [esi], ax
push dword [ebx]
call dword [sym.imp.USER32.DLL_GetWindowTextW]
push esi
call sub.MSVCRT.dll_wcslen
pop ecx
sub edi, eax
push edi
call fcn.0040bf60
pop edi
pop esi
pop ebx
ret 8

Function at 0x4052ba
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
call dword [sym.imp.USER32.DLL_GetFocus]
mov esi, dword [sym.imp.USER32.DLL_GetKeyState]
mov ebx, eax
test ebx, ebx
je 0x405334
push 9
call esi
test al, al
jns 0x405334
push 0x11
call esi
test al, al
js 0x405334
push 0x10
call esi
test al, al
js 0x405334
push 0x12
call esi
test al, al
js 0x405334
push 5
lea eax, [ebp - 0x10]
push eax
push ebx
call dword [sym.imp.USER32.DLL_GetClassNameW]
push 4
lea eax, [ebp - 0x10]
push str.Rich
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x405334
push eax
push eax
push 0x44e
push ebx
call dword [sym.imp.USER32.DLL_SendMessageW]
test eax, 0x800
jne 0x405334
xor eax, eax
jmp 0x4053b5
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x40535c
push 0x11
call esi
test al, al
js 0x405354
push 0x10
call esi
test al, al
js 0x405354
push 0x12
call esi
test al, al
jns 0x40535c
push 1
push edi
call fcn.004053bd
mov esi, dword [sym.imp.USER32.DLL_GetPropW]
test ebx, ebx
je 0x405372
push str.PB_Hotkey
push ebx
call esi
test eax, eax
jne 0x4053b2
push str.PB_WindowID
push edi
call esi
mov esi, eax
test esi, esi
je 0x4053b2
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.USER32.DLL_GetWindowThreadProcessId]
test eax, eax
je 0x4053b2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 4], eax
jne 0x4053b2
lea eax, [esi - 1]
push eax
push dword [0x40fb70]
call fcn.0040b4d4
test eax, eax
je 0x4053b2
mov eax, dword [eax + 8]
jmp 0x4053b4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x405de1
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push str.msimg32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x40fa24], eax
test eax, eax
je 0x405e0f
push str.AlphaBlend
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x40fa20], eax
lea eax, [ebp - 0x114]
mov dword [0x40fa28], 1
push eax
mov dword [ebp - 0x114], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x405e71
cmp dword [ebp - 0x104], 1
jne 0x405e46
and dword [0x40fa28], 0
jmp 0x405e89
cmp dword [ebp - 0x104], 2
jne 0x405e71
cmp dword [ebp - 0x110], 5
jb 0x405e3d
jne 0x405e71
mov eax, dword [ebp - 0x10c]
neg eax
sbb eax, eax
and eax, dword [0x40fa28]
mov dword [0x40fa28], eax
jmp 0x405e76
mov eax, dword [0x40fa28]
test eax, eax
je 0x405e89
call fcn.00405b7b
neg eax
sbb eax, eax
and dword [0x40fa28], eax
mov esp, ebp
pop ebp
ret

Function at 0x407370
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x4073a2
push 0
lea ecx, [esp + 0x10]
push ecx
push esi
push dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40739d
cmp dword [esp + 0xc], esi
je 0x4073b9
pop edi
xor eax, eax
pop esi
ret
mov eax, dword [edi + 4]
add eax, dword [edi + 8]
push esi
push dword [esp + 0x14]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add dword [edi + 8], esi
pop edi
mov eax, 1
pop esi
ret

Function at 0x409910
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x40994c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4

Function at 0x409d70
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x40fc98]
call fcn.0040b4d4
mov esi, eax
test esi, esi
je 0x409def
cmp dword [esi + 4], 0
je 0x409dc0
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.0040a050
test eax, eax
je 0x409db4
inc dword [esi + 0xc]
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409dfa
cmp dword [esp + 8], 0
je 0x409dfa
push 1
push 0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4
Function at 0x409f20
Capabilities:
Write file on windows

Disassembly:
push ecx
mov edx, dword [esp + 0xc]
mov dword [esp], 0
test edx, edx
je 0x40a014
cmp word [edx], 0
je 0x40a014
mov ecx, dword [esp + 0x10]
push esi
cmp ecx, 0x19
jne 0x409fad
mov esi, dword [esp + 0xc]
mov ecx, edx
push edi
cmp dword [esi + 4], 0
lea edi, [ecx + 2]
je 0x409f80
jmp 0x409f60
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409f60
sub ecx, edi
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push edx
push esi
call fcn.0040a620
pop edi
pop esi
pop ecx
ret 0xc
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409f80
sub ecx, edi
lea eax, [esp + 8]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
cmp ecx, 2
lea ecx, [esp + 0x10]
setne al
push ecx
dec eax
and eax, 0xfde9
push edx
push eax
call fcn.0040a730
mov esi, eax
test esi, esi
je 0x40a00b
mov eax, dword [esp + 0xc]
cmp dword [eax + 4], 0
je 0x409fe8
push dword [esp + 0x10]
push esi
push eax
call fcn.0040a620
mov dword [esp + 4], eax
jmp 0x409ffc
push 0
lea ecx, [esp + 8]
push ecx
push dword [esp + 0x18]
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
push 0
push dword [0x40f65c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 0xc
xor eax, eax
pop ecx
ret 0xc
Function at 0x40a050
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0
jne 0x40a071
push esi
call fcn.00409910
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
cmp ebx, edi
jl 0x40a0e5
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x40a0d2
dec ecx
je 0x40a0bd
sub ecx, 2
je 0x40a0aa
push edi
push eax
push dword [esp + 0x1c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x14]
mov word [eax], cx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
mov eax, edi
mov byte [ecx], dl
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebx
add eax, dword [esi + 4]
push ebx
push eax
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x40a12a
lea eax, [esp + 0x18]
push eax
push edi
push ebp
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
add eax, ebx
pop esi
pop ebx
ret 0xc
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x40a14b
mov edi, eax
push edi
push dword [esi + 4]
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
lea eax, [ebx + edi]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x40a170
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x40f65c]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x40a2f4
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x40a1be
test ebp, ebp
je 0x40a260
dec ebp
cmp dword [ebx + 4], 0
je 0x40a1d7
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.0040a050
mov dword [esp + 0x14], eax
jmp 0x40a1f1
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x40a260
test cl, cl
je 0x40a205
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x40a240
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x40f65c]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x40a260
cmp dword [esp + 0x2c], 0
jne 0x40a1b0
cmp cl, 0xd
je 0x40a267
cmp cl, 0xa
jne 0x40a1b0
dec esi
jmp 0x40a2d7
cmp dword [esp + 0x2c], 0
jne 0x40a2d7
cmp cl, 0xa
jne 0x40a26f
dec esi
jmp 0x40a2d7
cmp cl, 0xd
jne 0x40a2d7
dec esi
cmp dword [ebx + 4], 0
je 0x40a28e
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.0040a050
mov dword [esp + 0x14], eax
jmp 0x40a2a4
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x40a2d7
cmp dword [ebx + 4], 0
je 0x40a2b6
inc dword [ebx + 0xc]
jmp 0x40a2d7
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10