joyce8/EMBER2024-capa huggingface dataset:
Function at 0x411f60
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x210
mov eax, dword [0x46aa78]
mov dword [esp + 0x20c], eax
lea eax, [esp + 4]
push eax
push str..htm
push SysReAllocStringLen
call fcn.004118e0
add esp, 0xc
test eax, eax
jne 0x412059
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push str._shellopencommand
lea ecx, [esp + 0xc]
push ecx
call edi
lea edx, [esp + 8]
push edx
mov eax, edx
push eax
push SysReAllocStringLen
call fcn.004118e0
add esp, 0xc
test eax, eax
jne 0x412041
push esi
lea ecx, [esp + 0xc]
push str.__1_
push ecx
call fcn.00431114
mov esi, eax
add esp, 8
test esi, esi
jne 0x412003
lea edx, [esp + 0xc]
push 0x456c50
push edx
call fcn.00431114
mov esi, eax
add esp, 8
test esi, esi
jne 0x412003
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esp + eax + 0xb]
jmp 0x412006
mov byte [esi], 0
push 0x456c4c
push esi
call edi
mov ecx, dword [esp + 0x21c]
push ecx
push esi
call edi
mov edx, dword [esp + 0x220]
push edx
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
pop esi
pop edi
mov ecx, dword [esp + 0x20c]
call fcn.00430cd9
add esp, 0x210
ret
mov eax, dword [esp + 4]
pop edi
mov ecx, dword [esp + 0x20c]
call fcn.00430cd9
add esp, 0x210
ret
mov ecx, dword [esp + 0x20c]
mov eax, dword [esp]
call fcn.00430cd9
add esp, 0x210
ret

Function at 0x412070
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
mov eax, dword [esp + 0xc]
movzx ecx, word [esp + 8]
push ebx
mov ebx, dword [esp + 8]
push esi
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x412093
pop esi
xor al, al
pop ebx
ret
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
jne 0x4120a8
pop edi
pop esi
xor al, al
pop ebx
ret
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
test ebp, ebp
je 0x4120e1
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [esp + 0x20]
push 0
push 0x20
push 2
push 0
push 3
push 0xc0000000
push edx
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4120ef
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop ebp
pop edi
pop esi
xor al, al
pop ebx
ret
push 0
lea eax, [esp + 0x1c]
push eax
push ebx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41211e
cmp dword [esp + 0x18], ebx
jne 0x41211e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop ebp
pop edi
pop esi
mov al, 1
pop ebx
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop edi
pop esi
xor al, al
pop ebx
ret
Function at 0x413530
Capabilities:
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x124
mov eax, dword [0x46aa78]
push ebx
mov dword [esp + 0x124], eax
cmp dword [0x469234], 0x4ea
push esi
mov esi, ecx
push edi
mov dword [esp + 0x18], esi
jne 0x4135ce
xor eax, eax
mov byte [esp + 0x20], 0
mov ecx, 0x40
lea edi, [esp + 0x21]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x20]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push str.Helper_license.html
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push 0
push 0
push 0
push 0
lea edx, [esp + 0x30]
push edx
push 0x469378
push 0
push 0
push 1
push 0x68
add esi, 0x2ec
push esi
call fcn.00445e9d
add esp, 0x2c
mov ecx, dword [esp + 0x12c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc0]
push 0
push 0x8000005
push 3
push 0
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x413723
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea esi, [eax + 1]
push esi
mov dword [esp + 0x14], eax
call fcn.0044691a
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0xc], edi
je 0x413723
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0xc]
push 0
lea eax, [esp + 0x20]
push eax
push ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
push ebx
jne 0x413670
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00446915
add esp, 4
mov ecx, dword [esp + 0x12c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.0044691a
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x14], edi
je 0x413723
mov ecx, esi
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x10]
lea edi, [edi + edi + 2]
push edi
call fcn.0044691a
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x413723
mov ecx, edi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
push esi
mov ecx, edx
push ebx
and ecx, 3
push esi
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x18]
push eax
push 0
push 0x3a8
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, dword [esp + 0x14]
push 0
push 0
push esi
push edi
push esi
push ebx
push 0
push 0x3b6
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 0x8c]
push edi
push edx
call dword [sym.imp.USER32.dll_SetWindowTextA]
push edi
call fcn.00446915
push ebx
call fcn.00446915
mov eax, dword [esp + 0x14]
push eax
call fcn.00446915
add esp, 0xc
mov ecx, dword [esp + 0x12c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4140f0
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x14
push esi
lea eax, [esp + 4]
push eax
push 0x20
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x414163
lea ecx, [esp + 0xc]
push ecx
push str.SeDebugPrivilege
push esi
mov dword [esp + 0x14], 1
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 4]
push esi
push esi
push 0x10
neg edx
lea eax, [esp + 0x14]
push eax
sbb edx, edx
push esi
and edx, 2
push ecx
mov dword [esp + 0x2c], edx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 4]
mov esi, eax
neg esi
sbb esi, esi
push edx
inc esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
add esp, 0x14
ret 4
Function at 0x4157a0
Capabilities:
Capture screenshot

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x450ea0
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebp
push esi
push edi
mov esi, ecx
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edx, dword [esi + 0x1c]
push edx
call dword [sym.imp.USER32.dll_GetDC]
push eax
call fcn.0044994a
mov ebp, eax
test ebp, ebp
je 0x4157e5
mov eax, dword [ebp + 4]
push ebx
mov ebx, dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
call ebx
push eax
lea ecx, [esi + 0x50]
call fcn.00449958
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
sub eax, ecx
mov ecx, dword [esp + 0x20]
push eax
mov eax, dword [ebp + 4]
sub ecx, edi
push ecx
push eax
lea edi, [esi + 0x64]
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
mov ecx, edi
call fcn.00449c55
test edi, edi
je 0x41582a
mov edi, dword [edi + 4]
mov ecx, dword [esi + 0x54]
push edi
push ecx
call fcn.00449cde
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], vtable.CBitmap.0
mov dword [esp + 0x40], eax
call fcn.0044d05b
movzx edx, word [esp + 0x48]
mov eax, dword [eax + 0xc]
push edx
push eax
call dword [sym.imp.USER32.dll_LoadBitmapA]
push eax
lea ecx, [esp + 0x14]
call fcn.00449c55
lea ecx, [esp + 0x28]
call fcn.00449538
mov eax, dword [ebp + 4]
push eax
mov byte [esp + 0x44], 1
call ebx
push eax
lea ecx, [esp + 0x2c]
call fcn.00449958
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
push eax
push ecx
call fcn.00449cde
mov edi, eax
mov al, byte [esp + 0x4c]
test al, al
mov eax, dword [esp + 0x24]
mov dword [esp + 0x48], edi
push 0xcc0020
je 0x4158d9
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
push ebx
lea edi, [edx - 3]
push edi
sub ecx, edx
mov edx, dword [esp + 0x38]
push edx
sub eax, ebx
push eax
mov eax, dword [esi + 0x54]
push ecx
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov edi, dword [esp + 0x48]
jmp 0x415902
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x30]
mov ebx, dword [esp + 0x1c]
push 0
push 0
sub eax, ecx
mov ecx, dword [esp + 0x2c]
push edx
push eax
mov eax, dword [esi + 0x54]
sub ecx, ebx
push ecx
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
test edi, edi
pop ebx
jne 0x41590b
xor edi, edi
jmp 0x41590e
mov edi, dword [edi + 4]
mov ecx, dword [esp + 0x28]
push edi
push ecx
call fcn.00449cde
mov edx, dword [ebp + 4]
mov eax, dword [esi + 0x1c]
push edx
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
lea ecx, [esp + 0x24]
mov byte [esp + 0x3c], 0
call fcn.004499d6
lea ecx, [esp + 0xc]
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0xc], vtable.CGdiObject.0
call fcn.00449cac
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x34
ret 8
Function at 0x4168b0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x451018
push eax
mov dword fs:[0], esp
sub esp, 0x44
push ebp
mov ebp, dword [esp + 0x5c]
test ebp, ebp
je 0x4169e2
lea ecx, [esp + 8]
call fcn.00449538
mov eax, dword [esp + 0x58]
test eax, eax
mov dword [esp + 0x50], 0
je 0x4168f1
mov eax, dword [eax + 4]
push ebx
push esi
push edi
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x18]
call fcn.00449958
mov eax, dword [esp + 0x18]
push ebp
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x74]
mov esi, dword [esp + 0x78]
mov edi, dword [esp + 0x70]
sub ebx, ecx
lea ecx, [esp + 0x3c]
push ecx
push 0x18
sub esi, edi
push ebp
mov dword [esp + 0x1c], esi
call dword [sym.imp.GDI32.dll_GetObjectA]
lea edx, [esp + 0x24]
push edx
push 0x18
push ebp
call dword [sym.imp.GDI32.dll_GetObjectA]
cmp edi, esi
mov ebp, dword [esp + 0x2c]
mov eax, edi
mov dword [esp + 0x68], eax
jge 0x4169c3
jmp 0x416960
mov esi, dword [esp + 0x10]
lea esp, [esp]
lea ecx, [eax + ebp]
cmp ecx, esi
jle 0x41696b
mov ebp, esi
sub ebp, eax
mov esi, dword [esp + 0x6c]
mov edi, dword [esp + 0x40]
mov ecx, esi
cmp ecx, ebx
jge 0x4169b5
lea esp, [esp]
lea edx, [esi + edi]
cmp edx, ebx
jle 0x41698b
mov edi, ebx
sub edi, esi
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x64]
push 0xcc0020
push 0
push 0
push ecx
push ebp
push edi
push eax
mov eax, dword [edx + 4]
push esi
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x68]
add esi, edi
cmp esi, ebx
jl 0x416980
mov ecx, dword [esp + 0x10]
add eax, ebp
cmp eax, ecx
mov dword [esp + 0x68], eax
jl 0x416955
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.GDI32.dll_DeleteDC]
lea ecx, [esp + 0x14]
mov dword [esp + 0x5c], 0xffffffff
call fcn.004499d6
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
pop ebp
mov dword fs:[0], ecx
add esp, 0x50
ret 0x18
Function at 0x41b680
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov edx, dword [ebp + 0x10]
test edx, edx
mov eax, dword [0x46aa78]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x118], eax
push edi
mov dword [esp + 0xc], ecx
mov ebx, 0x10
je 0x41b6cf
cmp dword [esi + 0x38], ebx
jb 0x41b6b8
mov ecx, dword [esi + 0x24]
jmp 0x41b6bb
lea ecx, [esi + 0x24]
cmp dword [esi + 0x1c], ebx
jb 0x41b6c5
mov eax, dword [esi + 8]
jmp 0x41b6c8
lea eax, [esi + 8]
mov edi, dword [esi]
push edi
push ecx
push eax
call edx
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x40
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
push 0x104
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.00430cf0
mov eax, dword [esi + 0x38]
add esp, 0xc
cmp eax, ebx
jb 0x41b706
mov eax, dword [esi + 0x24]
jmp 0x41b709
lea eax, [esi + 0x24]
push eax
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
mov eax, dword [esi]
test eax, eax
jne 0x41b766
cmp dword [esi + 0x38], ebx
jb 0x41b725
mov eax, dword [esi + 0x24]
jmp 0x41b728
lea eax, [esi + 0x24]
cmp dword [esi + 0x54], ebx
jb 0x41b732
mov esi, dword [esi + 0x40]
jmp 0x41b735
add esi, 0x40
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x18]
push edx
push eax
push esi
call fcn.0041afd0
test al, al
setne al
mov ecx, dword [esp + 0x11c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp eax, 1
jne 0x41b78d
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov al, 1
mov ecx, dword [esp + 0x11c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0x45675a
push 0xa
call fcn.0041d220
mov ecx, dword [esp + 0x124]
add esp, 8
xor al, al
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x41d2b0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 0x24]
test eax, eax
jne 0x41d2cf
push 0x45675a
push 0xa
call fcn.0041d220
add esp, 8
xor al, al
pop esi
pop ecx
ret
mov cl, byte [esi + 0x20]
test cl, cl
je 0x41d2ea
push str.Const_Mode
push 3
call fcn.0041d220
add esp, 8
xor al, al
pop esi
pop ecx
ret
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x41d310
push str.point0
push 6
call fcn.0041d220
add esp, 8
xor al, al
pop esi
pop ecx
ret
mov edx, dword [esi + 0x24]
push 0
lea eax, [esp + 8]
push eax
push 0x28
lea ecx, [esi + 0x28]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41d337
cmp dword [esp + 4], 0x28
jne 0x41d337
mov al, 1
pop esi
pop ecx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.0041d220
add esp, 0xc
xor al, al
pop esi
pop ecx
ret
Function at 0x41d360
Capabilities:
Write file on windows

Disassembly:
push edi
mov edi, ecx
mov ecx, dword [esp + 8]
cmp ecx, 0x8000
jae 0x41d421
mov eax, dword [edi + 0x24]
test eax, eax
je 0x41d421
mov dl, byte [edi + 0x20]
test dl, dl
je 0x41d39a
push str.Const_Mode
push 3
call fcn.0041d220
add esp, 8
xor al, al
pop edi
ret 4
push esi
lea esi, [ecx + ecx*2]
mov ecx, dword [edi + 0x34]
push 0
shl esi, 2
push 0
add ecx, esi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x41d3da
mov edx, dword [edi + 0x34]
add edx, esi
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr_d__point_d
push 6
call fcn.0041d220
add esp, 0x10
pop esi
xor al, al
pop edi
ret 4
mov edx, dword [edi + 0x24]
push 0
lea eax, [esp + 0x10]
push eax
push 0xc
lea ecx, [esi + edi + 0x50]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41d404
cmp dword [esp + 0xc], 0xc
jne 0x41d404
pop esi
mov al, 1
pop edi
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.0041d220
add esp, 0xc
pop esi
xor al, al
pop edi
ret 4
push 0x45675a
push 0xa
call fcn.0041d220
add esp, 8
xor al, al
pop edi
ret 4
Function at 0x41d720
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov eax, dword [0x46aa78]
push ebx
push esi
mov dword [esp + 0x118], eax
mov eax, dword [ebp + 0x10]
test eax, eax
push edi
mov edi, ecx
mov dword [esp + 0x10], edi
je 0x41d74f
mov eax, dword [edi + 0x24]
test eax, eax
jne 0x41d775
push 0x45675a
push 0xa
call fcn.0041d220
add esp, 8
xor al, al
mov ecx, dword [esp + 0x11c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov cl, byte [edi + 0x20]
test cl, cl
je 0x41d7a2
push str.Const_Mode
push 3
call fcn.0041d220
add esp, 8
xor al, al
mov ecx, dword [esp + 0x11c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [ebp + 8]
push 0
push 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x41d7e4
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr_d__point_d
push 6
call fcn.0041d220
add esp, 0x10
xor al, al
mov ecx, dword [esp + 0x11c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
cmp ebx, esi
jbe 0x41d7f0
mov ebx, esi
mov ecx, dword [ebp + 0x10]
mov edx, dword [edi + 0x24]
push 0
lea eax, [esp + 0x18]
push eax
push ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41d85e
cmp dword [esp + 0x14], ebx
jne 0x41d85e
cmp ebx, esi
jae 0x41d847
mov edx, dword [esp + 0x10]
xor eax, eax
push eax
mov ecx, 0x40
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
push eax
mov eax, dword [edx + 0x24]
sub esi, ebx
push esi
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41d85e
cmp esi, dword [esp + 0x10]
jne 0x41d85e
mov al, 1
mov ecx, dword [esp + 0x11c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.0041d220
mov ecx, dword [esp + 0x128]
add esp, 0xc
xor al, al
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x41dfb0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x60054]
test eax, eax
je 0x41e097
mov ecx, dword [esi + 0x60058]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
mov ecx, dword [esp + 8]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jae 0x41e097
mov eax, dword [esi + 0x24]
test eax, eax
je 0x41e097
mov dl, byte [esi + 0x20]
test dl, dl
je 0x41e00c
push str.Const_Mode
push 3
call fcn.0041d220
add esp, 8
xor al, al
pop esi
ret 4
push edi
lea edi, [ecx + ecx*2]
mov ecx, dword [esi + 0x38]
push 0
shl edi, 2
push 0
add ecx, edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x41e04c
mov edx, dword [esi + 0x38]
add edx, edi
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr_d__point_d
push 6
call fcn.0041d220
add esp, 0x10
pop edi
xor al, al
pop esi
ret 4
mov eax, dword [esi + 0x60054]
mov edx, dword [esi + 0x24]
push 0
lea ecx, [esp + 0x10]
push ecx
push 0xc
add eax, edi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41e07a
cmp dword [esp + 0xc], 0xc
jne 0x41e07a
pop edi
mov al, 1
pop esi
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.0041d220
add esp, 0xc
pop edi
xor al, al
pop esi
ret 4
push 0x45675a
push 0xa
call fcn.0041d220
add esp, 8
xor al, al
pop esi
ret 4
Function at 0x420aa0
Capabilities:
Get file size

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x420aea
cmp byte [eax], 0
je 0x420aea
push esi
push 0
push 0x8000027
push 3
push 0
push 3
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x420ad2
xor eax, eax
pop esi
ret
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
ret
xor eax, eax
ret

Function at 0x420af0
Capabilities:
Write file on windows

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0xc]
test edi, edi
je 0x420be3
cmp byte [edi], 0
je 0x420be3
push 0
lea eax, [esp + 0x10]
push eax
push edi
call fcn.004217e0
add esp, 0xc
test al, al
je 0x420bf2
push esi
push 0
push 0x8000005
push 3
push 0
push 3
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x420b5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.File_s__WinErr_d
push 3
call fcn.0041d220
add esp, 0x10
pop esi
xor al, al
pop edi
pop ecx
ret
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x420b93
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.File_s__WinErr_d
push 6
call fcn.0041d220
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
xor al, al
pop edi
pop ecx
ret
push 0
lea ecx, [esp + 0xc]
push ecx
push 4
lea edx, [esp + 0x1c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x420bc0
cmp dword [esp + 8], 4
jne 0x420bc0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov al, 1
pop edi
pop ecx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.winErr:__d
push 5
call fcn.0041d220
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
xor al, al
pop edi
pop ecx
ret
push 0x45675a
push 0xa
call fcn.0041d220
add esp, 8
xor al, al
pop edi
pop ecx
ret
Function at 0x420c00
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0xc
push edi
mov edi, dword [esp + 0x14]
push 1
lea eax, [esp + 0x10]
push eax
push edi
call fcn.004217e0
add esp, 0xc
test al, al
jne 0x420c21
pop edi
add esp, 0xc
ret
push esi
push 0
push 0x8000027
push 3
push 0
push 3
push SysReAllocStringLen
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x420c61
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.File_s__WinErr_d
push 3
call fcn.0041d220
add esp, 0x10
pop esi
xor al, al
pop edi
add esp, 0xc
ret
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 4
jb 0x420cfd
push 2
push 0
push 0xfffffffffffffffc
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x420cab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.File_s__WinErr_d
push 6
call fcn.0041d220
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
xor al, al
pop edi
add esp, 0xc
ret
push 0
lea ecx, [esp + 0xc]
push ecx
push 4
lea edx, [esp + 0x18]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x420ce7
cmp dword [esp + 8], 4
jne 0x420ce7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
xor eax, eax
cmp ecx, edx
pop esi
sete al
pop edi
add esp, 0xc
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinErr_d
push 4
call fcn.0041d220
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
xor al, al
pop edi
add esp, 0xc
ret

Function at 0x420d10
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov eax, dword [0x46aa78]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push esi
mov dword [esp + 0x120], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x420d47
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push eax
push esi
call ebx
test eax, eax
je 0x420d5c
mov al, 1
mov ecx, dword [esp + 0x11c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov byte [esp + 0x10], 0
mov ecx, 0x40
lea edi, [esp + 0x11]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
stosb byte es:[edi], al
lea eax, [esp + 0x14]
push esi
push eax
call fcn.00430cf0
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
test eax, eax
je 0x420da4
lea edx, [esp + 0x10]
push edx
call fcn.00420d10
add esp, 4
test al, al
jne 0x420db9
xor al, al
mov ecx, dword [esp + 0x11c]
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push esi
call ebx
mov ecx, dword [esp + 0x11c]
dec eax
neg eax
sbb eax, eax
inc eax
call fcn.00430cd9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret