joyce8/EMBER2024-capa huggingface dataset:
Function at 0x44e509
Capabilities:
Create directory
Delete directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa2c
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0xa2c]
push eax
push 0x104
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x44e662
push ebx
lea eax, [ebp - 0xa2c]
push eax
lea eax, [ebp - 0x20c]
push 0x4b4d38
push eax
call fcn.00422e3b
lea eax, [ebp - 0x20c]
push eax
call fcn.004223eb
mov ebx, eax
add esp, 0x10
cmp word [ebp + ebx*2 - 0x20e], 0x5c
jne 0x44e57d
cmp word [ebp + ebx*2 - 0x210], 0x3a
je 0x44e57d
xor eax, eax
mov word [ebp + ebx*2 - 0x20e], ax
push edi
xor edi, edi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x44e597
cmp byte [ebp + 0x10], al
je 0x44e653
push edi
push 0x2200000
push 3
push edi
push edi
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x44e64a
push 0x618
lea eax, [ebp - 0x824]
push 0
push eax
call fcn.00422460
lea eax, [ebx + ebx]
mov word [ebp - 0x81a], ax
mov eax, dword [ebp - 0x81a]
add eax, 2
mov word [ebp - 0x818], ax
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x814]
push eax
mov dword [ebp - 0x824], 0xa0000003
call fcn.0042370d
mov eax, dword [ebp - 0x81a]
add esp, 0x18
add eax, 0xc
xor edx, edx
push edx
mov word [ebp - 0x820], ax
lea ecx, [ebp + 8]
push ecx
push edx
movzx eax, ax
push edx
add eax, 8
push eax
lea eax, [ebp - 0x824]
push eax
push 0x900a4
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
test eax, eax
jne 0x44e657
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor eax, eax
jmp 0x44e660
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
pop edi
pop ebx
leave
ret 0xc
Function at 0x10003b80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, 1
mov word [ebp - 0x48], ax
mov ecx, 1
mov word [ebp - 0x46], cx
push 0x40
push 0
lea edx, [ebp - 0x44]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
lea eax, [ebp - 4]
push eax
push 0x44
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esp, ebp
pop ebp
ret

Function at 0x10003bf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0
lea eax, [ebp - 4]
push eax
push 2
lea ecx, [ebp + 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10003c12
xor eax, eax
jmp 0x10003c3a
movzx eax, word [ebp + 0x10]
test eax, eax
jne 0x10003c21
mov eax, 1
jmp 0x10003c3a
push 0
lea ecx, [ebp - 4]
push ecx
movzx edx, word [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esp, ebp
pop ebp
ret

Function at 0x10003c40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, 0xffff
mov word [ebp - 0xc], ax
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp + 8]
mov dx, word [ecx + 0x5c]
mov word [ebp - 4], dx
movzx eax, word [ebp - 4]
test eax, eax
jne 0x10003ca3
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call 0x10000000
add esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x10003c8e
mov eax, dword [ebp - 0x10]
jmp 0x10003d4a
mov ecx, dword [ebp - 0x14]
push ecx
call 0x10000000
add esp, 4
mov edx, 1
mov word [ebp - 4], dx
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10003d19
xor eax, eax
mov word [ebp - 8], ax
jmp 0x10003cd1
mov cx, word [ebp - 8]
add cx, 1
mov word [ebp - 8], cx
movzx edx, word [ebp - 8]
movzx eax, word [ebp - 4]
cmp edx, eax
jge 0x10003d17
push 0
lea ecx, [ebp - 0x18]
push ecx
push 0x30
movzx edx, word [ebp - 8]
imul eax, edx, 0x30
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 0x60]
push eax
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10003d15
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.10004920
add esp, 4
mov dword [ebp - 0x10], eax
jmp 0x10003d17
jmp 0x10003cc5
jmp 0x10003d2b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.10004920
add esp, 4
mov dword [ebp - 0x10], eax
movzx eax, word [ebp - 0xc]
cmp eax, 0xffff
je 0x10003d47
movzx ecx, word [ebp - 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call 0x10000000
add esp, 8
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
Function at 0x10003d50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [ebp + 0xc], 0
je 0x10003d6e
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 8], eax
jmp 0x10003d75
mov dword [ebp - 8], 0
mov cx, word [ebp - 8]
mov word [ebp - 4], cx
push 0
lea edx, [ebp - 0xc]
push edx
push 2
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10003d9b
xor eax, eax
jmp 0x10003dcb
cmp dword [ebp + 0xc], 0
jne 0x10003da8
mov eax, 1
jmp 0x10003dcb
movzx edx, word [ebp - 4]
shl edx, 1
mov word [ebp - 4], dx
push 0
lea eax, [ebp - 0xc]
push eax
movzx ecx, word [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esp, ebp
pop ebp
ret
Function at 0x401a00
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x804]
sub esp, 0x804
push 0xffffffffffffffff
push 0x430660
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x43e270]
xor eax, ebp
mov dword [ebp + 0x800], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
xor esi, esi
mov dword [ebp - 4], esi
test edi, edi
je 0x401b4e
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401a50
sub eax, edx
sar eax, 1
je 0x401b4e
push 0x800
push 0
lea eax, [ebp]
push eax
call fcn.0040d9a0
push edi
push 0x400
lea ecx, [ebp]
push ecx
call fcn.0040ca8c
add esp, 0x18
mov ecx, 0x4345d0
lea edx, [ebp]
call fcn.0040a150
mov ecx, 0x4345d0
lea edx, [ebp]
call fcn.0040a300
lea edx, [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x401b45
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x14], esi
test esi, esi
jne 0x401aeb
lea eax, [ebp]
push eax
push str.Delete_File____s_
mov ecx, esi
mov edx, 0x440628
call fcn.00403a30
add esp, 8
mov dword [ebp - 0x18], esi
push 0x43b558
lea ecx, [ebp - 0x18]
push ecx
call fcn.0040eef8
sub eax, 2
je 0x401b40
sub eax, 3
je 0x401b1b
sub eax, 0x1b
je 0x401b2a
lea edx, [ebp]
push edx
push str.Delete_File____s_
mov ecx, esi
mov edx, 0x440628
call fcn.00403a30
add esp, 8
mov dword [ebp - 4], 0xffffffff
jmp 0x401b91
push 0x80
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ebp]
call fcn.00402150
mov esi, eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0xffffffff
jmp 0x401b91
xor esi, esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0xffffffff
jmp 0x401b91
mov eax, 0x57
jmp 0x401b93
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x800]
xor ecx, ebp
call fcn.0040c641
add ebp, 0x804
mov esp, ebp
pop ebp
ret
Function at 0x401f80
Capabilities:
Copy file
Delete file
Get common file path
Move file

Disassembly:
push ebp
lea ebp, [esp - 0x1004]
mov eax, 0x1004
call fcn.00416960
push 0xffffffffffffffff
push 0x4302b0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x43e270]
xor eax, ebp
mov dword [ebp + 0x1000], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov esi, edx
xor edi, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], edi
cmp ebx, edi
je 0x40210c
mov eax, ebx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x401fe0
sub eax, edx
sar eax, 1
je 0x40210c
cmp esi, edi
je 0x40210c
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x402002
sub eax, edx
sar eax, 1
je 0x40210c
push 0x5c
push esi
call fcn.0040c87b
add esp, 8
mov edi, eax
test edi, edi
jne 0x40203d
mov dword [ebp - 0x1c], 0x57
push 0x43b558
lea eax, [ebp - 0x1c]
push eax
call fcn.0040eef8
mov ecx, edi
sub ecx, esi
sar ecx, 1
push ecx
push esi
push 0x400
lea edx, [ebp]
push edx
call fcn.0040cafb
push 0x800
push 0
lea eax, [ebp + 0x800]
push eax
call fcn.0040d9a0
add esp, 0x1c
lea ecx, [ebp + 0x800]
push ecx
push 0
push edi
lea edx, [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x402095
push esi
push str._s.tmp
lea edx, [ebp + 0x800]
call fcn.004029a0
add esp, 8
push 1
lea eax, [ebp + 0x800]
push eax
push esi
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
call edi
test eax, eax
je 0x4020d4
push 0
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4020c8
push 4
push 0
lea ecx, [ebp + 0x800]
push ecx
call edi
jmp 0x4020dd
push 1
push esi
lea edx, [ebp + 0x800]
push edx
call edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1000]
xor ecx, ebp
call fcn.0040c641
add ebp, 0x1004
mov esp, ebp
pop ebp
ret
mov eax, 0x57
jmp 0x4020e7
Function at 0x402150
Capabilities:
Get common file path
Move file

Disassembly:
push ebp
lea ebp, [esp - 0x1004]
mov eax, 0x1004
call fcn.00416960
push 0xffffffffffffffff
push 0x430280
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x43e270]
xor eax, ebp
mov dword [ebp + 0x1000], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x4022f0
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4021a7
sub eax, edx
sar eax, 1
je 0x4022f0
push 0x5c
push edi
call fcn.0040c87b
add esp, 8
mov esi, eax
cmp esi, ebx
je 0x4022f0
push 0x800
push ebx
lea eax, [ebp]
push eax
call fcn.0040d9a0
add esp, 0xc
lea ecx, [ebp]
push ecx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x40220d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
push 0x43b558
lea edx, [ebp - 0x1c]
push edx
call fcn.0040eef8
push 0x800
push ebx
lea eax, [ebp + 0x800]
push eax
call fcn.0040d9a0
add esp, 0xc
lea ecx, [ebp + 0x800]
push ecx
push ebx
add esi, 2
push esi
lea edx, [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x402253
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
push 0x43b558
lea eax, [ebp - 0x24]
push eax
call fcn.0040eef8
push 3
lea ecx, [ebp + 0x800]
push ecx
push edi
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
call esi
test eax, eax
jne 0x402280
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
push 0x43b558
lea edx, [ebp - 0x20]
push edx
call fcn.0040eef8
push 4
push ebx
lea eax, [ebp + 0x800]
push eax
call esi
test eax, eax
jne 0x4022a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
push 0x43b558
lea ecx, [ebp - 0x18]
push ecx
call fcn.0040eef8
lea edx, [ebp + 0x800]
push edx
push edi
push str.__s__file_was_moved_to___s__and_it_will_be_deleted_after_reboot__
mov ecx, 0x440628
call fcn.00403b70
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1000]
xor ecx, ebp
call fcn.0040c641
add ebp, 0x1004
mov esp, ebp
pop ebp
ret
mov eax, 0x57
jmp 0x4022cb
Function at 0x402540
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0xa60
mov eax, dword [0x43e270]
xor eax, esp
mov dword [esp + 0xa58], eax
push ebx
push ebp
push edi
test esi, esi
je 0x4026ba
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402564
sub eax, edx
sar eax, 1
je 0x4026ba
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x4026ba
push 0x800
lea eax, [esp + 0x264]
push 0
push eax
call fcn.0040d9a0
mov eax, esi
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4025a4
sub eax, edx
sar eax, 1
cmp word [esi + eax*2 - 2], 0x5c
push esi
jne 0x4025d0
push 0x434c40
push 0x400
lea ecx, [esp + 0x26c]
push ecx
jmp 0x4025e2
push 0x4346fc
push 0x400
lea edx, [esp + 0x26c]
push edx
call fcn.0040c9e6
add esp, 0x10
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x264]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x4026ba
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov bl, 1
lea edx, [esp + 0x3c]
push 0x434c4c
push edx
call fcn.0040c7e8
add esp, 8
test eax, eax
je 0x402652
lea eax, [esp + 0x3c]
push 0x434c50
push eax
call fcn.0040c7e8
add esp, 8
test eax, eax
je 0x402652
lea ecx, [esp + 0x3c]
push str.Desktop.ini
push ecx
call fcn.0040c7e8
add esp, 8
test eax, eax
jne 0x40267f
lea edx, [esp + 0x10]
push edx
push ebp
call edi
test eax, eax
jne 0x402610
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, bl
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa58]
xor ecx, esp
call fcn.0040c641
add esp, 0xa60
ret
lea eax, [esp + 0x3c]
push eax
push esi
push str.DEBUG:___s__is_not_empty_:__s
mov ecx, 0x440628
xor bl, bl
call fcn.00403b70
add esp, 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, bl
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa58]
xor ecx, esp
call fcn.0040c641
add esp, 0xa60
ret
mov ecx, dword [esp + 0xa64]
pop edi
pop ebp
pop ebx
xor ecx, esp
xor al, al
call fcn.0040c641
add esp, 0xa60
ret
Function at 0x402870
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x430210
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x43e270]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
xor edi, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], edi
cmp ebx, edi
je 0x40294d
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4028b5
sub eax, edx
sar eax, 1
je 0x40294d
push edi
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
cmp esi, edi
jbe 0x402931
push esi
call fcn.0040b954
add esp, 4
mov edi, eax
test edi, edi
je 0x402931
push edi
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
cmp eax, 1
jne 0x402928
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x1c]
push ecx
push 0x434bf0
push edi
call sub.VERSION.dll_VerQueryValueW
cmp eax, 1
jne 0x402928
push 0x34
mov edx, dword [ebp - 0x1c]
push edx
push 0x34
mov eax, dword [ebp + 8]
push eax
call fcn.0040ca04
add esp, 0x10
mov dword [ebp - 0x14], 1
push edi
call fcn.0040ca81
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403880
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x1804]
mov eax, 0x1804
call fcn.00416960
push 0xffffffffffffffff
push 0x4305f0
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, dword [0x43e270]
xor eax, ebp
mov dword [ebp + 0x1800], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov edi, edx
push 0x800
xor ebx, ebx
push ebx
lea eax, [ebp + 0x800]
push eax
call fcn.0040d9a0
push 0x800
push ebx
lea ecx, [ebp + 0x1000]
push ecx
call fcn.0040d9a0
push 0x800
push ebx
lea edx, [ebp]
push edx
call fcn.0040d9a0
add esp, 0x24
mov dword [ebp - 4], ebx
cmp dword [esi], ebx
je 0x40390a
mov al, 1
jmp 0x4039d4
push 0x800
lea eax, [ebp + 0x800]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x403932
mov byte [ebp - 0x12], bl
push 0x43b58c
lea ecx, [ebp - 0x12]
push ecx
call fcn.0040eef8
push 0x5c
lea edx, [ebp + 0x800]
push edx
call fcn.0040c87b
add esp, 8
mov edi, eax
cmp edi, ebx
je 0x40394e
add edi, 2
jmp 0x403953
mov edi, 0x4351fc
lea eax, [ebp + 0x1000]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push edi
lea ecx, [ebp + 0x1000]
push ecx
push str._s_s.log
lea edx, [ebp]
call fcn.004029a0
add esp, 0xc
push ebx
push 0x80
push 4
push ebx
mov ebx, 1
push ebx
push 0xc0000000
lea edx, [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
setne al
mov byte [ebp - 0x11], al
mov byte [esi + 0x204], bl
lea eax, [esi + 4]
call fcn.00403810
mov ecx, esi
call fcn.00403d40
lea ecx, [ebp]
push ecx
call fcn.00409a70
add esp, 4
mov byte [ebp - 0x11], bl
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp - 0x11]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1800]
xor ecx, ebp
call fcn.0040c641
add ebp, 0x1804
mov esp, ebp
pop ebp
ret
Function at 0x403a30
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4301c0
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x4008
call fcn.00416960
mov eax, dword [0x43e270]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov esi, edx
cmp dword [esi], 0
je 0x403b3c
mov dword [ebp - 4], 0
push 0x2000
push 0
lea eax, [ebp - 0x2014]
push eax
call fcn.0040d9a0
push 0x2000
push 0
lea ecx, [ebp - 0x4014]
push ecx
call fcn.0040d9a0
lea edx, [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push 0x1000
lea ecx, [ebp - 0x2014]
push ecx
call fcn.0040cd51
add esp, 0x28
test edi, edi
je 0x403b0e
push 0
push 0
lea edx, [ebp - 0x4018]
push edx
push 0x409
push edi
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov eax, dword [ebp - 0x4018]
test eax, eax
je 0x403b0e
push eax
push edi
lea eax, [esi + 4]
push eax
push str.___s___Error_Code___d_:_s
lea edx, [ebp - 0x4014]
call fcn.004040c0
add esp, 0x10
mov ecx, dword [ebp - 0x4018]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea edx, [ebp - 0x2014]
mov ecx, esi
call fcn.00403c50
test edi, edi
je 0x403b35
lea edx, [ebp - 0x4014]
mov ecx, esi
call fcn.00403c50
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040c641
mov esp, ebp
pop ebp
ret

Function at 0x404000
Capabilities:
Clear file content
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x430140
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x43e270]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov esi, edx
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x4040a1
cmp eax, ebx
je 0x4040a1
mov dword [ebp - 4], ebx
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x404053
sub eax, edx
sar eax, 1
push ebx
lea ecx, [ebp - 0x18]
push ecx
lea edx, [eax + eax]
push edx
push edi
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405270
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebp
mov ebp, dword [esp + 0x10]
push edi
xor edi, edi
mov eax, ebx
mov dword [esp + 0x14], edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x405282
sub eax, edx
sar eax, 1
jne 0x40529e
pop edi
mov eax, 0x57
pop ebp
pop ecx
ret 8
push esi
push edi
push 0x80
push 4
push edi
push 1
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405309
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x4052f9
cmp ebp, edi
je 0x4052f9
push edi
lea ecx, [esp + 0x1c]
push ecx
push ebp
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4052f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push ebx
push str.Write_file_fail_____s_
mov ecx, edi
mov edx, 0x440628
call fcn.00403a30
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, edi
pop edi
pop ebp
pop ecx
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push ebx
push str.Create_file_fail_____s_
mov ecx, edi
mov edx, 0x440628
call fcn.00403a30
add esp, 8
pop esi
mov eax, edi
pop edi
pop ebp
pop ecx
ret 8

Function at 0x405a00
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x430928
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x43e270]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 8], esi
mov dword [esi], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [esp + 0x14], 0
test byte [esi + 0x40], 1
je 0x405a4a
mov eax, dword [esi + 0x10]
mov eax, dword [eax]
push eax
call fcn.0040cdeb
add esp, 4
mov ecx, dword [esi + 0x10]
mov dword [ecx], 0
mov edx, dword [esi + 0x20]
mov dword [edx], 0
mov eax, dword [esi + 0x30]
mov dword [eax], 0
mov ecx, dword [esi + 0x14]
mov dword [ecx], 0
mov edx, dword [esi + 0x24]
mov dword [edx], 0
mov eax, dword [esi + 0x34]
mov dword [eax], 0
and dword [esi + 0x40], 0xfffffffe
mov dword [esi + 0x3c], 0
mov dword [esp + 0x14], 0xffffffff
mov ecx, esi
call fcn.00408210
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x10
ret
Function at 0x406410
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push 0xffffffffffffffff
push 0x43052b
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x43e270]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov esi, dword [esp + 0x1c]
lea ecx, [esi + 4]
mov dword [esi], vtable.std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__.0
call fcn.0040bb82
mov dword [esp + 0x14], 0
push 4
call fcn.0040d3ae
mov edi, eax
add esp, 4
test edi, edi
je 0x406471
call fcn.0040be34
mov dword [edi], eax
call fcn.0040bc62
mov ecx, eax
call fcn.00407df0
jmp 0x406473
xor edi, edi
mov dword [esi + 0x38], edi
lea eax, [esi + 8]
mov dword [esi + 0x10], eax
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], 0
mov eax, dword [esi + 0x24]
mov dword [eax], 0
mov ecx, dword [esi + 0x34]
mov dword [ecx], 0
mov edx, dword [esi + 0x10]
mov dword [edx], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov ecx, dword [esi + 0x30]
mov dword [ecx], 0
mov dword [esp + 0x14], 0xffffffff
mov eax, esi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0xc
ret 4