joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401a0b
Capabilities:
Create a process with modified i/o handles and window
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x27c
mov eax, dword [0x40f9c0]
xor eax, dword [ebp + 4]
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
je 0x401a2b
cmp dword [ebp + 0xc], 0
jne 0x401a33
or eax, 0xffffffff
jmp 0x401c18
mov eax, dword [ebp + 0xc]
push eax
push 0x22
mov ecx, dword [ebp + 8]
push ecx
push 0x22
push str._c_s_c__s
lea edx, [ebp - 0x210]
push edx
call fcn.00403e64
add esp, 0x18
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
mov eax, dword [ebp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x27c], eax
cmp dword [ebp - 0x27c], 0xffffffff
jne 0x401a86
or eax, 0xffffffff
jmp 0x401c18
push 0x44
push 0
lea ecx, [ebp - 0x260]
push ecx
call fcn.004039a0
add esp, 0xc
mov dword [ebp - 0x260], 0x44
mov dword [ebp - 0x25c], 0
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 0
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x244], 0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0x101
mov word [ebp - 0x230], 0
mov word [ebp - 0x22e], 0
mov dword [ebp - 0x22c], 0
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x228], eax
mov edx, dword [ebp - 0x27c]
mov dword [ebp - 0x224], edx
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x274]
push eax
lea ecx, [ebp - 0x260]
push ecx
push 0
push 0
push 0x820
push 0
push 0
push 0
lea edx, [ebp - 0x210]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 0x278], eax
cmp dword [ebp - 0x278], 0
jne 0x401bb8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x264], eax
mov eax, dword [ebp - 0x27c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x27c], 0
or eax, 0xffffffff
jmp 0x401c18
mov ecx, dword [ebp - 0x27c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x27c], 0
cmp dword [ebp + 0x10], 0
jne 0x401bd9
xor eax, eax
jmp 0x401c18
mov dword [ebp - 0x214], 0x103
cmp dword [ebp - 0x214], 0x103
jne 0x401c05
lea edx, [ebp - 0x214]
push edx
mov eax, dword [ebp - 0x274]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
jmp 0x401be3
cmp dword [ebp + 0x14], 0
je 0x401c16
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x214]
mov dword [ecx], edx
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.00403eed
mov esp, ebp
pop ebp
ret
Function at 0x401fb0
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0
mov dword [ebp - 8], 5
cmp dword [ebp + 8], 0
je 0x401fd9
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401fdd
xor eax, eax
jmp 0x402039
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x401ff4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x402036
cmp dword [ebp + 0xc], 0
je 0x402036
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 4], 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x402026
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
call fcn.00401f7a
mov eax, dword [ebp - 8]
sub eax, 1
mov dword [ebp - 8], eax
jmp 0x401ff4
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x4033a3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x4033d2
xor eax, eax
jmp 0x403416
push 0
lea ecx, [ebp - 4]
push ecx
push 0x10
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], 0x44445a53
jne 0x403414
cmp dword [ebp - 0x14], 0x3327f088
jne 0x403414
movsx edx, byte [ebp - 0x10]
cmp edx, 0x41
jne 0x403414
mov eax, 1
jmp 0x403416
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x40341a
Capabilities:
Copy file
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x40f9c0]
xor eax, dword [ebp + 4]
mov dword [ebp - 4], eax
mov dword [ebp - 0x8c], 1
mov eax, dword [ebp + 8]
push eax
call fcn.004033a3
add esp, 4
test eax, eax
jne 0x403452
mov eax, 1
jmp 0x4035f8
push 0x88
push 0
push 0x410208
call fcn.004039a0
add esp, 0xc
push 0x88
push 0
push 0x410180
call fcn.004039a0
add esp, 0xc
mov byte [0x410208], 0x88
mov byte [0x410180], 0x88
lea ecx, [ebp - 0x88]
push ecx
call fcn.004042fb
push eax
push 0x40f99c
push 0x40f9a0
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0x1002
push 0x410208
lea edx, [ebp - 0x88]
push edx
call sub.LZ32.dll_LZOpenFileA
mov dword [ebp - 0x98], eax
push 0
push 0x410180
mov eax, dword [ebp + 8]
push eax
call sub.LZ32.dll_LZOpenFileA
mov dword [ebp - 0x94], eax
cmp dword [ebp - 0x94], 0
jl 0x4034e9
cmp dword [ebp - 0x98], 0
jge 0x403534
mov ecx, dword [ebp - 0x94]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x98]
push eax
lea ecx, [ebp - 0x88]
push ecx
push str.An_error_occured_during_file_open___s:_d___s:_d_.
push 0x4105e0
call fcn.00403e64
add esp, 0x18
push 0x30
push str.NovaLogic_Local_File_Update_Wizard_v1.0.11d
push 0x4105e0
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp - 0x8c], 0
jmp 0x40358d
mov edx, dword [ebp - 0x98]
push edx
mov eax, dword [ebp - 0x94]
push eax
call sub.LZ32.dll_LZCopy
mov dword [ebp - 0x90], eax
cmp dword [ebp - 0x90], 0
jge 0x40358d
mov ecx, dword [ebp - 0x90]
push ecx
push str.An_error_occured_during_file_copy__d_.
push 0x4105e0
call fcn.00403e64
add esp, 0xc
push 0x30
push str.NovaLogic_Local_File_Update_Wizard_v1.0.11d
push 0x4105e0
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp - 0x8c], 0
mov edx, dword [ebp - 0x94]
push edx
call sub.LZ32.dll_LZClose
mov eax, dword [ebp - 0x98]
push eax
call sub.LZ32.dll_LZClose
cmp dword [ebp - 0x8c], 0
je 0x4035f2
push 0
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x88]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
lea eax, [ebp - 0x88]
push eax
call fcn.00401fb0
add esp, 8
test eax, eax
je 0x4035f2
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00401f7a
cmp dword [0x41029c], 0
je 0x4035f0
xor eax, eax
jmp 0x4035f8
jmp 0x4035c1
mov eax, dword [ebp - 0x8c]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.00403eed
mov esp, ebp
pop ebp
ret
Function at 0x4040cd
Capabilities:
Timestomp file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x4040ee
lea eax, [ebp - 4]
push eax
call fcn.004072cf
mov eax, dword [ebp - 4]
pop ecx
mov dword [ebp - 8], eax
lea edi, [ebp - 8]
lea eax, [edi + 4]
push eax
call fcn.0040714f
test eax, eax
pop ecx
jne 0x40410e
mov dword [0x4102e0], 0x16
or eax, 0xffffffff
jmp 0x40420e
mov cx, word [eax + 0x14]
add cx, 0x76c
mov word [ebp - 0x30], cx
mov cx, word [eax + 0x10]
inc cx
mov word [ebp - 0x2e], cx
mov cx, word [eax + 0xc]
mov word [ebp - 0x2a], cx
mov cx, word [eax + 8]
mov word [ebp - 0x28], cx
mov cx, word [eax + 4]
mov word [ebp - 0x26], cx
mov ax, word [eax]
and word [ebp - 0x22], 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov word [ebp - 0x24], ax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x30]
push eax
call esi
test eax, eax
je 0x404200
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x404200
push edi
call fcn.0040714f
test eax, eax
pop ecx
je 0x404200
mov cx, word [eax + 0x14]
add cx, 0x76c
mov word [ebp - 0x30], cx
mov cx, word [eax + 0x10]
inc cx
mov word [ebp - 0x2e], cx
mov cx, word [eax + 0xc]
mov word [ebp - 0x2a], cx
mov cx, word [eax + 8]
mov word [ebp - 0x28], cx
mov cx, word [eax + 4]
mov word [ebp - 0x26], cx
mov ax, word [eax]
and word [ebp - 0x22], 0
mov word [ebp - 0x24], ax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x30]
push eax
call esi
test eax, eax
je 0x404200
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
test eax, eax
je 0x404200
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20]
push eax
push 0
push dword [ebp + 8]
call fcn.00406f7c
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
je 0x404200
xor eax, eax
jmp 0x40420d
mov dword [0x4102e0], 0x16
or eax, 0xffffffff
pop esi
pop edi
leave
ret
Function at 0x404343
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40c1c0
call fcn.00406134
mov edi, 0x94
mov eax, edi
call fcn.00404090
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x4102ec], ecx
mov eax, dword [esi + 4]
mov dword [0x4102f8], eax
mov edx, dword [esi + 8]
mov dword [0x4102fc], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4102f0], esi
cmp ecx, 2
je 0x4043a3
or esi, 0x8000
mov dword [0x4102f0], esi
shl eax, 8
add eax, edx
mov dword [0x4102f4], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4043de
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4043de
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4043f6
cmp eax, 0x20b
je 0x4043e3
mov dword [ebp - 0x1c], esi
jmp 0x40440a
cmp dword [ecx + 0x84], 0xe
jbe 0x4043de
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x404404
cmp dword [ecx + 0x74], 0xe
jbe 0x4043de
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00404536
pop ecx
test eax, eax
jne 0x404436
cmp dword [0x4102ac], 1
jne 0x404423
call fcn.00407819
push 0x1c
call fcn.004076a2
push 0xff
call fcn.00406fb8
pop ecx
pop ecx
call fcn.00407fce
mov dword [ebp - 4], esi
call fcn.00407e23
test eax, eax
jge 0x40444f
push 0x1b
call fcn.0040431e
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x412078], eax
call fcn.00407d01
mov dword [0x4102a4], eax
call fcn.00407c5f
test eax, eax
jge 0x404475
push 8
call fcn.0040431e
pop ecx
call fcn.00407a2c
test eax, eax
jge 0x404486
push 9
call fcn.0040431e
pop ecx
call fcn.00406fe8
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x404499
push eax
call fcn.0040431e
pop ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.004079c3
mov dword [ebp - 0x68], eax
test byte [ebp - 0x38], 1
je 0x4044ba
movzx eax, word [ebp - 0x34]
jmp 0x4044bd
push 0xa
pop eax
push eax
push dword [ebp - 0x68]
push esi
push esi
call edi
push eax
call fcn.00401d14
mov edi, eax
mov dword [ebp - 0x6c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4044db
push edi
call fcn.0040710f
call fcn.00407131
jmp 0x40450d
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040616f
ret
Function at 0x405ca7
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.00404090
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x405d3c
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x4102ec]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x405d3c
cmp eax, 1
je 0x405d54
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x405d3c
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x405d11
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x405d38
xor eax, eax
inc eax
jmp 0x405d70
cmp esi, ebx
jae 0x405d40
xor eax, eax
jmp 0x405d70
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x4102ec]
jmp 0x405d56
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40704d
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x41032c], esi
push edi
jne 0x40706d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x410328], esi
mov byte [0x410324], al
jne 0x4070d3
mov ecx, dword [0x412048]
test ecx, ecx
je 0x4070b4
mov eax, dword [0x412044]
sub eax, 4
cmp eax, ecx
jmp 0x4070ad
mov eax, dword [eax]
test eax, eax
je 0x40709f
call eax
mov eax, dword [0x412044]
sub eax, 4
cmp eax, dword [0x412048]
mov dword [0x412044], eax
jae 0x407097
mov eax, 0x40e020
mov esi, 0x40e028
cmp eax, esi
mov edi, eax
jae 0x4070d3
mov eax, dword [edi]
test eax, eax
je 0x4070cc
call eax
add edi, 4
cmp edi, esi
jb 0x4070c4
mov eax, 0x40e02c
mov esi, 0x40e030
cmp eax, esi
mov edi, eax
jae 0x4070f2
mov eax, dword [edi]
test eax, eax
je 0x4070eb
call eax
add edi, 4
cmp edi, esi
jb 0x4070e3
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40710d
push dword [ebp + 8]
mov dword [0x41032c], 1
call fcn.00406fb8
pop ecx
pop ebp
ret
Function at 0x4076a2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x40f9c0]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x40fa00]
je 0x4076cf
inc eax
cmp eax, 0x12
jb 0x4076c0
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40fa00]
jne 0x407803
mov eax, dword [0x4102ac]
cmp eax, 1
je 0x4077de
cmp eax, edx
jne 0x4076ff
cmp dword [0x40f9d8], 1
je 0x4077de
cmp ecx, 0xfc
je 0x407803
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x407738
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.00403f90
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.00403a90
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40777a
lea eax, [ebp - 0x10c]
push eax
call fcn.00403a90
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x40c2b4
push edi
call fcn.00403b20
add esp, 0x10
push edi
call fcn.00403a90
push dword [esi + 0x40fa04]
mov ebx, eax
call fcn.00403a90
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00404090
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00403f90
push edi
push ebx
call fcn.00403fa0
push 0x40c2b0
push ebx
call fcn.00403fa0
push dword [esi + 0x40fa04]
push ebx
call fcn.00403fa0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00409365
add esp, 0x2c
jmp 0x407803
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x40fa04]
push dword [esi]
call fcn.00403a90
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.00403eed
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408f8a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x40f9c0]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x411f20]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
jae 0x40911a
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x411f40]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x18], ebx
je 0x40911a
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
jne 0x408fe9
xor eax, eax
jmp 0x40912e
test al, 0x20
je 0x408ffa
push 2
push edi
push edi
push ecx
call fcn.0040a4c2
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4090b6
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov dword [ebp + 8], edi
jbe 0x4090ee
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
cmp ecx, dword [ebp + 0x10]
jae 0x409050
mov edx, dword [ebp - 8]
inc dword [ebp - 8]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x409041
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x18]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x409026
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x10]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409090
mov eax, dword [ebp - 0x10]
add dword [ebp - 0xc], eax
cmp eax, edi
jl 0x409099
mov eax, dword [ebp - 8]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x40901a
jmp 0x40909b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
xor edi, edi
mov eax, dword [ebp - 0xc]
cmp eax, edi
jne 0x409115
cmp dword [ebp + 8], edi
je 0x4090ee
push 5
pop eax
cmp dword [ebp + 8], eax
jne 0x4090e3
mov dword [0x4102e4], eax
jmp 0x409121
push edi
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4090d8
mov eax, dword [ebp - 0x10]
mov dword [ebp + 8], edi
mov dword [ebp - 0xc], eax
jmp 0x40909b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x40909b
push dword [ebp + 8]
call fcn.0040945e
pop ecx
jmp 0x40912b
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x409103
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
je 0x408fe2
mov dword [0x4102e0], 0x1c
mov dword [0x4102e4], edi
jmp 0x40912b
sub eax, dword [ebp - 0x14]
jmp 0x40912e
and dword [0x4102e4], 0
mov dword [0x4102e0], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
pop ebx
call fcn.00403eed
leave
ret
Function at 0x409365
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x410450], ebx
push esi
push edi
jne 0x4093e5
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x409420
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40cc54
push edi
call esi
test eax, eax
mov dword [0x410450], eax
je 0x409420
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x410454], eax
call esi
cmp dword [0x4102ec], 2
mov dword [0x410458], eax
jne 0x4093e5
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x410460], eax
je 0x4093e5
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x41045c], eax
mov eax, dword [0x41045c]
test eax, eax
je 0x40942a
call eax
test eax, eax
je 0x409411
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x410460]
test eax, eax
je 0x409411
test byte [ebp - 8], 1
jne 0x40942a
cmp dword [0x4102f8], 4
jb 0x409424
or byte [ebp + 0x12], 0x20
jmp 0x409449
xor eax, eax
jmp 0x409459
or byte [ebp + 0x12], 4
jmp 0x409449
mov eax, dword [0x410454]
test eax, eax
je 0x409449
call eax
mov ebx, eax
test ebx, ebx
je 0x409449
mov eax, dword [0x410458]
test eax, eax
je 0x409449
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x410450]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x409c88
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00404090
mov eax, dword [0x40f9c0]
xor eax, dword [ebp + 4]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x411f20]
mov dword [ebp - 4], eax
jae 0x409dc8
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x411f40]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x409dc8
push 1
push esi
push ebx
call fcn.00408efe
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x409dd2
push 2
push esi
push ebx
call fcn.00408efe
add esp, 0xc
cmp eax, 0xffffffff
je 0x409dd2
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x409d75
push 0x1000
lea eax, [ebp - 0x1008]
push esi
push eax
call fcn.004039a0
push 0x8000
push ebx
call fcn.0040a8e2
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x409d34
mov eax, edi
push eax
lea eax, [ebp - 0x1008]
push eax
push ebx
call fcn.00408f8a
add esp, 0xc
cmp eax, 0xffffffff
je 0x409d52
sub edi, eax
test edi, edi
jg 0x409d29
jmp 0x409d68
cmp dword [0x4102e4], 5
jne 0x409d65
mov dword [0x4102e0], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0040a8e2
pop ecx
pop ecx
jmp 0x409db5
jge 0x409db5
push 0
push dword [ebp + 0xc]
push ebx
call fcn.00408efe
push ebx
call fcn.00406f7c
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x409db5
mov dword [0x4102e0], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4102e4], eax
push 0
push dword [ebp - 8]
push ebx
call fcn.00408efe
add esp, 0xc
mov eax, esi
pop edi
jmp 0x409dd5
mov dword [0x4102e0], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.00403eed
leave
ret