joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45e030
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x104
push ebx
mov ebx, dword [esp + 0x10c]
test ebx, ebx
jne 0x45e04c
xor eax, eax
pop ebx
add esp, 0x104
ret
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
push 0x103
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x14]
push ebx
push eax
mov ebp, 1
call fcn.00421690
lea ecx, [esp + 0x1c]
push 0x5c
push ecx
call fcn.0042c560
mov esi, eax
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jbe 0x45e0d0
cmp byte [esp + 0x10], 0x5c
jne 0x45e0d0
cmp byte [esp + 0x11], 0x5c
jne 0x45e0d0
lea edx, [esp + 0x12]
push 0x5c
push edx
call fcn.0042c560
add esp, 8
test eax, eax
je 0x45e14e
inc eax
push 0x5c
push eax
call fcn.0042c560
add esp, 8
mov esi, eax
test esi, esi
je 0x45e14e
lea eax, [esp + 0x10]
mov byte [esi], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
mov edi, ebx
and edi, 0x10
jne 0x45e112
test bl, 1
je 0x45e101
mov ecx, ebx
lea edx, [esp + 0x10]
and ecx, 0xfffffffe
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
je 0x45e184
cmp ebx, 0xffffffff
je 0x45e11b
test edi, edi
jne 0x45e12a
lea ecx, [esp + 0x10]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
test ebp, ebp
je 0x45e184
mov byte [esi], 0x5c
inc esi
push 0x5c
push esi
call fcn.0042c560
mov esi, eax
add esp, 8
test esi, esi
jne 0x45e0d4
test ebp, ebp
je 0x45e184
mov ebx, dword [esp + 0x118]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x45e179
test al, 0x10
jne 0x45e184
test al, 1
je 0x45e16c
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
je 0x45e184
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
Function at 0x45e1a0
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
test ebx, ebx
jne 0x45e1bc
xor eax, eax
pop ebx
add esp, 0x208
ret
push ebp
push esi
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x12]
mov word [esp + 0x10], 0
push 0x103
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x14]
push ebx
push eax
mov ebp, 1
call fcn.004256b0
mov edi, 0x5c
lea ecx, [esp + 0x1c]
push edi
push ecx
call fcn.004b6c0c
lea edx, [esp + 0x24]
mov esi, eax
push edx
call fcn.00421d8c
add esp, 0x18
cmp eax, 2
jbe 0x45e241
cmp word [esp + 0x10], di
jne 0x45e241
cmp word [esp + 0x12], di
jne 0x45e241
lea eax, [esp + 0x14]
push edi
push eax
call fcn.004b6c0c
add esp, 8
test eax, eax
je 0x45e2c9
add eax, 2
push edi
push eax
call fcn.004b6c0c
add esp, 8
mov esi, eax
test esi, esi
je 0x45e2c9
lea ecx, [esp + 0x10]
mov word [esi], 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
mov edi, ebx
and edi, 0x10
jne 0x45e289
test bl, 1
je 0x45e278
mov edx, ebx
lea eax, [esp + 0x10]
and edx, 0xfffffffe
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebp, eax
test ebp, ebp
je 0x45e2ff
cmp ebx, 0xffffffff
je 0x45e292
test edi, edi
jne 0x45e2a1
lea edx, [esp + 0x10]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebp, eax
test ebp, ebp
je 0x45e2ff
mov word [esi], 0x5c
add esi, 2
push 0x5c
push esi
call fcn.004b6c0c
mov esi, eax
add esp, 8
test esi, esi
jne 0x45e249
test ebp, ebp
je 0x45e2ff
mov ebx, dword [esp + 0x21c]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x45e2f4
test al, 0x10
jne 0x45e2ff
test al, 1
je 0x45e2e7
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebp, eax
test ebp, ebp
je 0x45e2ff
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebp, eax
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
Function at 0x45e9f0
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x154
push ebx
mov ebx, dword [esp + 0x15c]
push ebp
mov ebp, dword [esp + 0x164]
push esi
mov esi, dword [esp + 0x16c]
mov eax, 0x1f3
push esi
sub eax, ebp
push ebx
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x45ea39
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x154
ret
push edi
mov dword [esp + 0x10], 1
mov eax, dword [esi]
test al, 0x10
mov dword [esp + 0x14], eax
je 0x45eba1
mov al, byte [esi + 0x2c]
lea edx, [esi + 0x2c]
cmp al, 0x2e
jne 0x45ea74
mov al, byte [esi + 0x2d]
test al, al
je 0x45ebc9
cmp al, 0x2e
jne 0x45ea74
mov al, byte [esi + 0x2e]
test al, al
je 0x45ebc9
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x20]
not ecx
dec ecx
mov dword [esp + 0x1c], ecx
inc ecx
cmp eax, ecx
jb 0x45ebc9
add ebp, ebx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
mov byte [ebp - 1], 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x174]
and ecx, 3
test dl, 0x10
rep movsb byte es:[edi], byte [esi]
je 0x45eaec
mov eax, dword [esp + 0x17c]
mov ecx, dword [esp + 0x14]
push eax
push ecx
push 0
push ebx
call dword [esp + 0x188]
mov edx, dword [esp + 0x174]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x45eb58
test dl, 0x40
jne 0x45eb58
mov esi, dword [esp + 0x1c]
mov ecx, 0x4f
xor eax, eax
lea edi, [esp + 0x28]
mov dword [esp + 0x24], 0
mov byte [esi + ebp - 1], 0x5c
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x17c]
mov ecx, dword [esp + 0x178]
push eax
mov eax, dword [esp + 0x170]
push ecx
push edx
lea edx, [esp + 0x30]
lea ecx, [esi + eax + 1]
push edx
push ecx
mov byte [esi + ebp], 0x2a
push ebx
mov byte [esi + ebp + 1], 0
call fcn.0045e9f0
mov edx, dword [esp + 0x18c]
add esp, 0x18
mov dword [esp + 0x10], eax
jmp 0x45eb5c
mov esi, dword [esp + 0x1c]
test dl, 0x20
je 0x45eb89
mov eax, dword [esp + 0x10]
test eax, eax
je 0x45eb89
mov edx, dword [esp + 0x17c]
mov eax, dword [esp + 0x14]
push edx
push eax
push 0
push ebx
mov byte [esi + ebp - 1], 0
call dword [esp + 0x188]
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x170]
mov byte [ebp - 1], 0x2a
mov byte [ebp], 0
mov ebp, dword [esp + 0x16c]
jmp 0x45ebc9
mov ecx, dword [esp + 0x17c]
lea edx, [esi + 0x2c]
push ecx
push eax
push edx
push ebx
mov byte [ebx + ebp - 2], 0
call dword [esp + 0x188]
mov byte [ebx + ebp - 2], 0x5c
mov dword [esp + 0x10], eax
mov byte [ebx + ebp - 1], 0x2a
mov edi, dword [esp + 0x10]
test edi, edi
je 0x45ebe5
mov eax, dword [esp + 0x18]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x45ea42
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x154
ret
Function at 0x45fcf0
Capabilities:
Delete directory
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x45fd0f
push 0x57
mov dword [0x5b29a4], 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
ret
push 0
push 0x45fb90
push 0x20
push esi
call fcn.0045e8e0
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov esi, eax
test esi, esi
jne 0x45fd55
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x5b29a4], eax
je 0x45fd55
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
pop esi
ret
Function at 0x462ec0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x558ddc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [0x599508]
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
lea edi, [esi + 8]
mov dword [edi], eax
mov ecx, dword [0x599508]
lea ebp, [esi + 0x18]
xor ebx, ebx
mov dword [esp + 0x1c], ebx
mov dword [ebp], ecx
mov edx, dword [0x599508]
mov dword [esi + 0x20], edx
lea ecx, [esi + 0x28]
mov byte [esp + 0x1c], 2
call fcn.005251ac
mov eax, dword [esp + 0x24]
mov ecx, edi
push eax
mov byte [esp + 0x20], 3
mov dword [esi], 0x568f9c
mov dword [esi + 4], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x1c], ebx
mov word [esi + 0x24], 0xffff
call fcn.0052ab6b
mov eax, dword [esp + 0x28]
mov cx, word [esp + 0x30]
test eax, 0xffff0000
mov word [esi + 0x24], cx
mov dword [esi + 0x14], eax
je 0x462f63
push eax
mov ecx, ebp
call fcn.0052ab6b
mov edx, dword [ebp]
mov dword [esi + 0x14], edx
mov eax, dword [esp + 0x2c]
test eax, 0xffff0000
mov dword [esi + 0x1c], eax
je 0x462f81
lea edi, [esi + 0x20]
push eax
mov ecx, edi
call fcn.0052ab6b
mov eax, dword [edi]
mov dword [esi + 0x1c], eax
mov ecx, dword [esp + 0x14]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 0x10
Function at 0x4669e0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x568fe8
push 0x42b4f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov ecx, dword [ebp + 8]
xor edx, edx
cmp ecx, edx
je 0x466a72
mov dword [ebp - 4], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], ecx
cmp word [ecx], 0x5a4d
jne 0x466a6b
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x20], eax
cmp dword [eax], 0x4550
jne 0x466a6b
cmp word [eax + 0x14], dx
je 0x466a6b
cmp dword [ebp + 0xc], edx
je 0x466a45
cmp word [eax + 4], 0x14c
jne 0x466a6b
mov dword [ebp - 4], 0xffffffff
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x466b60
Capabilities:
Enumerate pe sections

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
test ebx, ebx
push edi
je 0x466bad
mov edi, dword [esp + 0x18]
test edi, edi
je 0x466bad
mov eax, dword [ebx + 0x3c]
xor ecx, ecx
add eax, ebx
xor edx, edx
mov cx, word [eax + 0x14]
mov dx, word [eax + 6]
lea esi, [ecx + eax + 0x18]
xor ecx, ecx
test edx, edx
mov dword [esp + 0x14], esi
jbe 0x466bad
lea eax, [esi + 0x10]
mov esi, dword [eax - 4]
cmp edi, esi
jb 0x466ba5
mov ebp, dword [eax]
add ebp, esi
cmp edi, ebp
jb 0x466bb4
inc ecx
add eax, 0x28
cmp ecx, edx
jb 0x466b96
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov eax, dword [esp + 0x14]
lea edx, [ecx + ecx*4]
mov esi, dword [eax + edx*8 + 0xc]
lea ecx, [eax + edx*8]
mov eax, dword [eax + edx*8 + 0x14]
sub eax, esi
add eax, ebx
add eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x467460
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x568ff8
push 0x42b4f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x20]
push eax
mov edi, dword [ebp + 0x14]
push edi
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00466cc0
add esp, 0x10
mov esi, eax
cmp esi, ebx
je 0x467513
mov eax, dword [esi]
push eax
mov eax, dword [ebp - 0x20]
push eax
call edi
add esp, 8
mov dword [ebp - 0x24], eax
mov edi, dword [ebp + 0x10]
sub edi, dword [ebp - 0x20]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x30], ebx
lea ecx, [ebp - 0x30]
push ecx
push 0x40
push 4
push esi
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
call ebx
test eax, eax
je 0x46750c
mov dword [esi], edi
lea edx, [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x30]
push eax
push 4
push esi
call ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x467d70
Capabilities:
Check os version
Get system information on windows

Disassembly:
mov eax, dword [0x5b2b2c]
test eax, eax
jne 0x467e5c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push 0x5b29c8
mov dword [0x5b2b2c], 1
mov dword [0x5b29c8], 0x94
call esi
mov edx, dword [0x5b29d8]
xor eax, eax
cmp edx, 2
sete al
test eax, eax
mov dword [0x59ebc0], eax
je 0x467e3e
push edi
push 0x5b2a60
mov dword [0x5b2a60], 0x9c
call esi
push 0x58c450
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push str.GetNativeSystemInfo
push esi
call edi
push str.GetProductInfo
push esi
mov dword [0x5b2b24], eax
call edi
mov dword [0x5b2b28], eax
mov eax, dword [0x5b2b24]
pop edi
test eax, eax
push 0x5b2b00
je 0x467e0c
call eax
jmp 0x467e12
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x5b2a64]
cmp eax, 6
jae 0x467e2a
cmp eax, 5
jne 0x467e3e
cmp dword [0x5b2a68], 2
jb 0x467e3e
cmp word [0x5b2b00], 9
jne 0x467e3e
mov dword [0x5b29bc], 1
push 0x5b29d0
push 0x5b29cc
call fcn.00468190
add esp, 8
call fcn.00467e70
mov eax, 1
pop esi
ret
mov eax, 1
ret
Function at 0x468e90
Capabilities:
Get common file path
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x569038
push 0x42b4f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x22c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov eax, dword [0x5b2b30]
xor ebx, ebx
cmp eax, ebx
jne 0x468ff0
mov byte [ebp - 0x11c], bl
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x11b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x468feb
mov byte [ebp - 0x224], bl
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x223]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push str.user32.dll
lea ecx, [ebp - 0x11c]
push ecx
push 0x591ecc
lea edx, [ebp - 0x224]
push edx
call fcn.00421a02
add esp, 0x10
mov dword [ebp - 0x22c], ebx
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x224]
push ecx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov dword [ebp - 0x120], eax
push eax
call fcn.00529cd7
add esp, 4
mov esi, eax
mov dword [ebp - 0x238], esi
cmp esi, ebx
je 0x468feb
push esi
mov edx, dword [ebp - 0x120]
push edx
mov eax, dword [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x224]
push ecx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x468fe2
mov dword [ebp - 0x230], ebx
lea edx, [ebp - 0x120]
push edx
lea eax, [ebp - 0x230]
push eax
push str.VarFileInfoTranslation
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x468fe2
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x230]
mov dword [ebp - 0x234], eax
mov ecx, dword [eax]
mov dword [0x5b2b30], ecx
mov dword [ebp - 4], 0xffffffff
jmp 0x468fe2
push esi
call fcn.00529d00
add esp, 4
mov eax, dword [0x5b2b30]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x46b960
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, 0x8000
push edi
cmp eax, esi
mov dword [esp + 0x14], esi
jbe 0x46b97e
mov dword [esp + 0x14], eax
mov esi, eax
push esi
call fcn.00529cd7
mov ecx, esi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
mov ebp, dword [esp + 0x24]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x10], ebx
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x24]
push 0
push 0
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test esi, esi
jne 0x46b9bd
xor ebx, ebx
jmp 0x46b9da
lea eax, [esp + 0x24]
push 0
push eax
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46b9d6
or ebx, 0xffffffff
jmp 0x46b9da
mov ebx, dword [esp + 0x24]
push 0
push 0
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x46ba2d
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x24]
push 0
push ecx
push eax
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46ba12
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
cmp ecx, eax
je 0x46ba29
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00529d00
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, dword [esp + 0x2c]
cmp ebx, esi
jae 0x46ba52
test ebx, ebx
je 0x46bb26
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x2c]
push 0
push edx
push ebx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x46bb26
lea ecx, [ebx + edi]
add edi, eax
push esi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], edi
call fcn.00529cd7
mov ecx, esi
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x24], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x46ba86
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
jg 0x46bac5
push 0
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test esi, esi
je 0x46bac5
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x28]
push 0
push eax
push esi
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46babf
or esi, 0xffffffff
jmp 0x46bac7
mov esi, dword [esp + 0x28]
jmp 0x46bac7
xor esi, esi
mov edx, dword [esp + 0x2c]
push 0
push 0
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test ebx, ebx
je 0x46baef
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push 0
push eax
push ebx
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
add edx, ebx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x20]
add edi, esi
mov dword [esp + 0x10], edx
test esi, esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], eax
mov ebx, esi
jg 0x46ba82
push eax
call fcn.00529d00
add esp, 4
mov eax, dword [esp + 0x10]
push eax
call fcn.00529d00
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x46bb40
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push 0
push 0
push esi
call edi
cmp eax, 0xffffffff
jne 0x46bb63
or ebx, eax
jmp 0x46bb65
mov ebx, eax
push 2
push 0
push 0
push esi
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x1c], 0xffffffff
je 0x46bb7f
mov dword [esp + 0x1c], eax
push 0
push ebx
push esi
call fcn.0046be80
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
sub eax, ebp
sub ecx, ebp
add esp, 0xc
cmp ecx, eax
mov dword [esp + 0x20], ecx
jl 0x46bba7
mov dword [esp + 0x20], eax
push 0x8000
call fcn.00529cd7
mov ebx, eax
add esp, 4
mov ecx, 0x2000
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x20]
push 0
push 0
lea ecx, [eax + ebp]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x24]
push 0
push edx
push 0x8000
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46bbf1
or eax, 0xffffffff
jmp 0x46bc2d
mov edi, dword [esp + 0x24]
mov eax, edi
test edi, edi
mov dword [esp + 0x14], eax
jle 0x46bc2d
push 0
push 0
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test edi, edi
je 0x46bc29
lea eax, [esp + 0x10]
push 0
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x46bc38
cmp dword [esp + 0x10], edi
jne 0x46bc38
mov eax, dword [esp + 0x14]
add ebp, eax
cmp eax, 0x8000
jne 0x46bc4b
jmp 0x46bbc1
push ebx
call fcn.00529d00
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
push 0
sub eax, ecx
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
call fcn.00529d00
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x46bc80
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x55964b
push eax
mov dword fs:[0], esp
sub esp, 0xa0
push ebx
mov ebx, dword [esp + 0xb4]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
je 0x46be24
push ebx
call fcn.00421d8c
add esp, 4
test eax, eax
je 0x46be24
push ebx
lea ecx, [esp + 0x18]
call fcn.0052aaa2
mov esi, dword [esp + 0xc4]
mov dword [esp + 0xb8], ebp
cmp esi, ebp
je 0x46bcf1
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x46be10
neg esi
sbb esi, esi
mov dword [esp + 0x18], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileW]
and esi, 0xc0000000
add esi, 0xc0000000
or edi, 0xffffffff
cmp edi, 0xffffffff
jne 0x46bdc4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46bd27
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x59f3d0]
cmp eax, 0xffffffff
jne 0x46bd62
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x94
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esp + 0x2c]
xor eax, eax
cmp ecx, 2
sete al
mov dword [0x59f3d0], eax
test eax, eax
je 0x46bd7b
push 0
push 0x80
push 4
push 0
push 1
push esi
push ebx
call ebp
mov edi, eax
jmp 0x46bda9
push ebx
lea ecx, [esp + 0x14]
call fcn.00434dd0
mov edx, dword [esp + 0x10]
push 0
push 0x80
push 4
push 0
push 1
push esi
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [esp + 0x10]
mov edi, eax
call fcn.004355e0
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 3
mov dword [esp + 0x18], eax
jl 0x46bd0e
cmp edi, 0xffffffff
je 0x46be5a
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push 0
push 0
push edi
call esi
cmp eax, 0xffffffff
jne 0x46bddc
or ebp, eax
jmp 0x46bdde
mov ebp, eax
push 2
push 0
push 0
push edi
call esi
cmp eax, 0xffffffff
jne 0x46bdf0
or ebx, eax
jmp 0x46bdf2
mov ebx, eax
push 0
push 0
push ebp
push edi
call esi
test ebx, ebx
jne 0x46be5a
mov eax, dword [esp + 0xc4]
test eax, eax
je 0x46be40
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
mov dword [esp + 0xb8], 0xffffffff
call fcn.0052a9e2
or eax, 0xffffffff
mov ecx, dword [esp + 0xb0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xac
ret
lea eax, [esp + 0x10]
push 2
push eax
push 0
push edi
mov dword [esp + 0x20], 0xfeff
call fcn.0046b960
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [esp + 0xb8], 0xffffffff
call fcn.0052a9e2
mov eax, edi
jmp 0x46be27