joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45abe0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x516e78
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x34]
push esi
cmp ebp, 0x640
push edi
mov esi, ecx
ja 0x45acc1
xor edi, edi
cmp ebp, edi
jbe 0x45acc1
lea eax, [esi + 0x7c]
push 1
push eax
lea ecx, [esp + 0x20]
call fcn.0041f698
mov eax, dword [esp + 0x34]
mov ebx, dword [esi + 0x6c]
mov dword [esp + 0x2c], edi
lea ecx, [eax + eax*2]
shl ecx, 4
add ebx, ecx
cmp dword [ebx + 0x28], edi
jne 0x45acd8
mov esi, dword [esp + 0x38]
mov edi, dword [ebx + 0x1c]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x24]
mov edx, dword [ebx + 0x1c]
lea ecx, [esp + 0x38]
push eax
mov eax, dword [ebx]
push ecx
push ebp
xor esi, esi
push edx
push eax
mov dword [ebx + 0x28], 1
mov dword [esp + 0x4c], esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, esi
je 0x45aca3
cmp dword [esp + 0x38], ebp
jne 0x45ac8b
mov dword [ebx + 0x28], esi
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], 0xffffffff
call fcn.0041f6d4
mov eax, 1
jmp 0x45acc3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x45ac8b
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], 0xffffffff
call fcn.0041f6d4
xor eax, eax
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 0xc
push ebp
mov dword [esp + 0x18], edi
call fcn.004ff0e6
mov edx, eax
add esp, 4
cmp edx, edi
mov dword [esp + 0x3c], edx
je 0x45acb0
mov esi, dword [esp + 0x38]
mov ecx, ebp
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebx + 0x2c]
mov eax, dword [esi + 0x10]
mov edi, dword [esi + 8]
test eax, eax
jne 0x45ad45
mov ecx, dword [esi + 0x18]
push 0x10
lea edx, [esi + 0x14]
push ecx
push edx
call fcn.004fd781
mov ecx, dword [esi + 0x18]
mov edx, ecx
shl edx, 4
dec ecx
test ecx, ecx
lea eax, [edx + eax - 0xc]
jl 0x45ad41
inc ecx
mov edx, dword [esi + 0x10]
mov dword [eax], edx
mov dword [esi + 0x10], eax
sub eax, 0x10
dec ecx
jne 0x45ad33
mov edx, dword [esp + 0x3c]
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
mov dword [esi + 0x10], ecx
mov dword [eax + 4], edi
mov dword [eax], 0
mov edi, dword [esi + 0xc]
inc edi
lea ecx, [eax + 8]
mov dword [esi + 0xc], edi
mov ebx, ecx
xor edi, edi
mov dword [ebx], edi
mov dword [ebx + 4], edi
mov dword [ecx], ebp
mov dword [ecx + 4], edx
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x45ad79
mov dword [ecx], eax
jmp 0x45ad7c
mov dword [esi + 4], eax
lea ecx, [esp + 0x18]
mov dword [esi + 8], eax
mov dword [esp + 0x2c], 0xffffffff
call fcn.0041f6d4
mov eax, 1
jmp 0x45acc3
Function at 0x45ada0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x516e98
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push esi
mov esi, ecx
push edi
push 1
lea eax, [esi + 0x7c]
lea ecx, [esp + 0x10]
push eax
call fcn.0041f698
mov eax, dword [esp + 0x28]
xor edi, edi
lea ecx, [eax + eax*2]
mov eax, dword [esi + 0x6c]
shl ecx, 4
add eax, ecx
mov edx, dword [eax + 0x20]
mov dword [edx], edi
mov ecx, dword [eax + 0x20]
mov dword [ecx + 4], edi
mov edx, dword [eax + 0x20]
mov dword [edx + 8], edi
mov ecx, dword [eax + 0x20]
mov dword [ecx + 0xc], edi
mov dword [esp + 8], edi
mov edx, dword [eax + 0x20]
lea ecx, [esp + 8]
push edx
mov edx, dword [eax + 0x18]
mov eax, dword [eax]
push ecx
push 0x640
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, edi
pop edi
pop esi
jne 0x45ae52
cmp eax, 0x3e5
je 0x45ae52
cmp eax, 0x218
je 0x45ae52
lea ecx, [esp + 4]
mov dword [esp + 0x18], 0xffffffff
call fcn.0041f6d4
xor eax, eax
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret 4
lea ecx, [esp + 4]
mov dword [esp + 0x18], 0xffffffff
call fcn.0041f6d4
mov ecx, dword [esp + 0x10]
mov eax, 1
mov dword fs:[0], ecx
add esp, 0x1c
ret 4

Function at 0x45ae80
Capabilities:
Access peb ldr_data
Connect pipe
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x516eb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
lea eax, [ebx + 0x7c]
push 1
push eax
lea ecx, [esp + 0x14]
call fcn.0041f698
mov eax, dword [esp + 0x38]
mov esi, dword [ebx + 0x6c]
xor edi, edi
lea ecx, [eax + eax*2]
mov dword [esp + 0x30], edi
shl ecx, 4
add esi, ecx
mov edx, dword [esi + 0x20]
mov dword [edx + 8], edi
mov eax, dword [esi + 0x20]
mov dword [eax + 0xc], edi
mov ecx, dword [esi + 0x20]
mov dword [ecx], edi
mov edx, dword [esi + 0x20]
mov dword [edx + 4], edi
mov eax, dword [esi + 0x24]
mov dword [eax + 8], edi
mov ecx, dword [esi + 0x24]
mov dword [ecx + 0xc], edi
mov edx, dword [esi + 0x24]
mov dword [edx], edi
mov eax, dword [esi + 0x24]
mov dword [eax + 4], edi
mov ecx, dword [esi + 0x20]
mov edx, dword [esi]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
jne 0x45af63
mov ecx, dword [esi + 0x20]
xor eax, eax
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x18]
mov dword [esp + 0x20], eax
push edx
mov dword [esp + 0x28], eax
mov eax, dword [esi]
mov dword [esp + 0x28], ecx
push eax
mov ecx, ebx
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], 0x217
call fcn.0045a4b0
lea ecx, [esp + 0xc]
mov dword [esp + 0x30], 0xffffffff
call fcn.0041f6d4
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 4
cmp eax, edi
je 0x45af6e
cmp eax, 0x3e5
jne 0x45af73
mov edi, 1
lea ecx, [esp + 0xc]
mov dword [esp + 0x30], 0xffffffff
call fcn.0041f6d4
mov ecx, dword [esp + 0x28]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x28
ret 4
Function at 0x45c8a0
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x517165
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x91c
push esi
push edi
mov esi, dword [esp + 0x938]
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x126]
mov word [esp + 0x124], 0
mov dword [esp + 0xc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [0x564548]
test esi, esi
je 0x45c98c
test eax, eax
jne 0x45c94b
mov ecx, 0x44
xor eax, eax
lea edi, [esp + 0x14]
mov dword [0x564548], 1
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x114
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x20], 2
jne 0x45c93f
cmp dword [esp + 0x14], 5
jb 0x45c93f
mov ecx, dword [str.GlobalOCULAR_]
mov dword [0x56454c], ecx
jmp 0x45c94b
mov edx, dword [0x54dc30]
mov dword [0x56454c], edx
mov eax, dword [esp + 0x93c]
test eax, eax
mov eax, dword [0x54dc30]
jne 0x45c960
mov eax, dword [0x56454c]
mov ecx, dword [esp + 0x944]
mov edx, dword [esp + 0x940]
push ecx
push edx
push esi
push eax
lea eax, [esp + 0x134]
push str._s__s__08x__08x
push eax
call fcn.00421460
add esp, 0x18
jmp 0x45ca1b
test eax, eax
jne 0x45c9e0
mov ecx, 0x44
xor eax, eax
lea edi, [esp + 0x14]
mov dword [0x564548], 1
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x114
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x20], 2
jne 0x45c9d6
cmp dword [esp + 0x14], 5
jb 0x45c9d6
mov edx, dword [str.GlobalOCULAR_]
mov dword [0x56454c], edx
jmp 0x45c9e0
mov eax, dword [0x54dc30]
mov dword [0x56454c], eax
mov eax, dword [esp + 0x93c]
test eax, eax
mov eax, dword [0x54dc30]
jne 0x45c9f5
mov eax, dword [0x56454c]
mov ecx, dword [esp + 0x944]
mov edx, dword [esp + 0x940]
push ecx
push edx
push eax
lea eax, [esp + 0x130]
push str._s___08x__08x
push eax
call fcn.00421460
add esp, 0x14
lea ecx, [esp + 0x124]
push ecx
lea ecx, [esp + 0xc]
call fcn.004ff523
mov esi, dword [esp + 0x934]
lea edx, [esp + 8]
push edx
mov ecx, esi
mov dword [esp + 0x930], 1
call fcn.004ff21c
mov dword [esp + 0xc], 1
lea ecx, [esp + 8]
mov byte [esp + 0x92c], 0
call fcn.004ff4af
mov ecx, dword [esp + 0x924]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x928
ret
Function at 0x4626f0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 8
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0xc], 0xffffffff
je 0x462778
mov eax, dword [esi + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x462752
mov ecx, dword [esi + 0x18]
xor eax, eax
mov dword [esp + 9], eax
push edi
mov edi, dword [sym.imp.WSOCK32.dll_htonl]
mov word [esp + 0x11], ax
push ecx
mov byte [esp + 0x10], bl
mov byte [esp + 0x17], al
call edi
push ebx
mov dword [esp + 0x10], eax
call edi
lea edx, [esp + 0xc]
push 8
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xc]
push edx
push 0xd
push ebx
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
pop edi
jge 0x462752
pop esi
xor eax, eax
pop ebx
add esp, 8
ret
mov ecx, dword [esi + 0xc]
push 1
push ecx
call dword [sym.imp.WSOCK32.dll_shutdown]
mov edx, dword [esi + 0xc]
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov dword [esi + 0xc], 0xffffffff
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
pop esi
mov eax, 1
pop ebx
add esp, 8
ret

Function at 0x464d10
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x20c
push ebx
push esi
mov edx, ecx
push edi
xor ebx, ebx
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x1a]
mov word [esp + 0x18], bx
add edx, 4
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x21c]
lea ecx, [esp + 0x18]
push eax
push edx
push 0x546ac0
push ecx
call fcn.00421460
add esp, 0x10
lea edx, [esp + 0xc]
lea eax, [esp + 0x18]
xor esi, esi
push edx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x18], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x464d87
lea ecx, [esp + 0xc]
lea edx, [esp + 0x18]
push ecx
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x464e02
mov edi, dword [esp + 0x220]
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
lea ecx, [esp + 0x1c]
push ebx
push ecx
push ebx
push edi
push edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], ebx
call ebp
mov eax, dword [esp + 0x14]
cmp eax, 2
jb 0x464de8
add eax, 2
mov dword [esp + 0x14], eax
shr eax, 1
add eax, eax
push eax
call fcn.004ff0e6
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x464de8
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push esi
push edx
push ebx
push edi
push eax
call ebp
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebp
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x20c
ret 8
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x20c
ret 8
Function at 0x464e10
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x210
push esi
mov edx, ecx
push edi
xor esi, esi
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x1a]
mov word [esp + 0x18], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x21c]
add edx, 4
push eax
push edx
lea ecx, [esp + 0x20]
push 0x546ac0
push ecx
call fcn.00421460
add esp, 0x10
lea edx, [esp + 8]
lea eax, [esp + 0x18]
mov dword [esp + 0xc], esi
push edx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x14], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x464e88
lea ecx, [esp + 8]
lea edx, [esp + 0x18]
push ecx
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x464ec2
lea eax, [esp + 0x10]
lea ecx, [esp + 0xc]
push eax
mov eax, dword [esp + 0x224]
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x10]
push edx
push esi
push eax
push ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0xc]
pop edi
pop esi
add esp, 0x210
ret 8

Function at 0x465160
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
push esi
push edi
mov edi, dword [esp + 0x14]
lea eax, [esp + 8]
push eax
xor esi, esi
push edi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x14], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x46519d
lea ecx, [esp + 8]
push ecx
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x46521d
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 8]
lea edx, [esp + 0x14]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edx
lea eax, [esp + 0x14]
push 0
push eax
push 0
push edi
push ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], 0
call ebx
mov eax, dword [esp + 0x18]
cmp eax, 2
jb 0x465207
add eax, 2
mov dword [esp + 0x18], eax
shr eax, 1
lea edx, [eax + eax]
push edx
call fcn.004ff0e6
mov esi, eax
add esp, 4
test esi, esi
je 0x465207
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x14]
push esi
push ecx
push 0
push edi
push edx
call ebx
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
mov eax, esi
pop edi
pop esi
add esp, 8
ret 8
mov eax, esi
pop edi
pop esi
add esp, 8
ret 8
Function at 0x465330
Capabilities:
Enumerate files on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x517bab
push eax
mov dword fs:[0], esp
sub esp, 0x65c
mov ecx, 0x564ec0
push ebx
push ebp
push esi
push edi
push str.PATH
push 0x564ec4
call fcn.00465160
mov ebp, eax
xor ebx, ebx
cmp ebp, ebx
je 0x465381
push ebp
call fcn.00421443
add esp, 4
test eax, eax
jne 0x4653c4
push ebp
call fcn.004ff10f
add esp, 4
push 0x54df00
call fcn.00421443
inc eax
lea esi, [eax + eax]
push esi
call fcn.004ff0e6
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x465508
mov ecx, esi
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0x54df00
and ecx, 3
push ebp
rep stosb byte es:[edi], al
call fcn.0042141e
add esp, 8
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x266]
mov word [esp + 0x264], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x264]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x67c]
lea ecx, [esp + 0x264]
push eax
push str.oadbg_
push str._s_s_
push ecx
call fcn.00421460
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x476]
mov word [esp + 0x474], bx
rep stosd dword es:[edi], eax
add esp, 0x10
lea edx, [esp + 0x264]
stosw word es:[edi], ax
push edx
push ebp
lea eax, [esp + 0x46c]
push 0x54ded4
push eax
call fcn.00421460
mov ecx, 0x93
xor eax, eax
lea edi, [esp + 0x28]
mov dword [esp + 0x24], ebx
rep stosd dword es:[edi], eax
add esp, 0x10
lea ecx, [esp + 0x14]
lea edx, [esp + 0x464]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4654ff
mov esi, dword [esp + 0x680]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
lea eax, [esp + 0x40]
push 0x54decc
push eax
call edi
test eax, eax
je 0x4654e8
lea ecx, [esp + 0x40]
push 0x548688
push ecx
call edi
test eax, eax
je 0x4654e8
test byte [esp + 0x14], 0x10
jne 0x4654e8
lea edx, [esp + 0x40]
lea ecx, [esp + 0x10]
push edx
call fcn.004ff523
mov eax, dword [esi + 8]
lea ecx, [esp + 0x10]
push ecx
push eax
mov ecx, esi
mov dword [esp + 0x67c], 0
call fcn.004fe7b9
lea ecx, [esp + 0x10]
mov dword [esp + 0x674], 0xffffffff
call fcn.004ff4af
lea edx, [esp + 0x14]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x465484
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebp
call fcn.004ff10f
add esp, 4
mov ecx, dword [esp + 0x66c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x668
ret 8
Function at 0x46a910
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 0x46a92e
mov dword [esp + 0x14], eax
mov esi, eax
push esi
call fcn.004ff0e6
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 0x46a96d
xor ebx, ebx
jmp 0x46a98a
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 0x46a986
or ebx, 0xffffffff
jmp 0x46a98a
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 0x46a9dd
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 0x46a9c2
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
cmp ecx, eax
je 0x46a9d9
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004ff10f
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 0x46aa02
test ebx, ebx
je 0x46aad6
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 0x46aad6
lea ecx, [ebx + edi]
add edi, eax
push esi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], edi
call fcn.004ff0e6
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 0x46aa36
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
jg 0x46aa75
push 0
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test esi, esi
je 0x46aa75
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 0x46aa6f
or esi, 0xffffffff
jmp 0x46aa77
mov esi, dword [esp + 0x28]
jmp 0x46aa77
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 0x46aa9f
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 0x46aa32
push eax
call fcn.004ff10f
add esp, 4
mov eax, dword [esp + 0x10]
push eax
call fcn.004ff10f
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x46aaf0
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 0x46ab13
or ebx, eax
jmp 0x46ab15
mov ebx, eax
push 2
push 0
push 0
push esi
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x1c], 0xffffffff
je 0x46ab2f
mov dword [esp + 0x1c], eax
push 0
push ebx
push esi
call fcn.0046ae30
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 0x46ab57
mov dword [esp + 0x20], eax
push 0x8000
call fcn.004ff0e6
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 0x46aba1
or eax, 0xffffffff
jmp 0x46abdd
mov edi, dword [esp + 0x24]
mov eax, edi
test edi, edi
mov dword [esp + 0x14], eax
jle 0x46abdd
push 0
push 0
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test edi, edi
je 0x46abd9
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 0x46abe8
cmp dword [esp + 0x10], edi
jne 0x46abe8
mov eax, dword [esp + 0x14]
add ebp, eax
cmp eax, 0x8000
jne 0x46abfb
jmp 0x46ab71
push ebx
call fcn.004ff10f
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.004ff10f
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x46ac30
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x51813b
push eax
mov dword fs:[0], esp
sub esp, 0x120
push ebx
mov ebx, dword [esp + 0x134]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
je 0x46add4
push ebx
call fcn.00421443
add esp, 4
test eax, eax
je 0x46add4
push ebx
lea ecx, [esp + 0x18]
call fcn.004ff523
mov esi, dword [esp + 0x144]
mov dword [esp + 0x138], ebp
cmp esi, ebp
je 0x46aca1
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x46adc0
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 0x46ad74
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46acd7
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x54e048]
cmp eax, 0xffffffff
jne 0x46ad12
mov ecx, 0x44
xor eax, eax
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x114
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov ecx, dword [esp + 0x2c]
xor eax, eax
cmp ecx, 2
sete al
mov dword [0x54e048], eax
test eax, eax
je 0x46ad2b
push 0
push 0x80
push 4
push 0
push 1
push esi
push ebx
call ebp
mov edi, eax
jmp 0x46ad59
push ebx
lea ecx, [esp + 0x14]
call fcn.004340d0
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.004348e0
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 3
mov dword [esp + 0x18], eax
jl 0x46acbe
cmp edi, 0xffffffff
je 0x46ae0a
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push 0
push 0
push edi
call esi
cmp eax, 0xffffffff
jne 0x46ad8c
or ebp, eax
jmp 0x46ad8e
mov ebp, eax
push 2
push 0
push 0
push edi
call esi
cmp eax, 0xffffffff
jne 0x46ada0
or ebx, eax
jmp 0x46ada2
mov ebx, eax
push 0
push 0
push ebp
push edi
call esi
test ebx, ebx
jne 0x46ae0a
mov eax, dword [esp + 0x144]
test eax, eax
je 0x46adf0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
mov dword [esp + 0x138], 0xffffffff
call fcn.004ff4af
or eax, 0xffffffff
mov ecx, dword [esp + 0x130]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x12c
ret
lea eax, [esp + 0x10]
push 2
push eax
push 0
push edi
mov dword [esp + 0x20], 0xfeff
call fcn.0046a910
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [esp + 0x138], 0xffffffff
call fcn.004ff4af
mov eax, edi
jmp 0x46add7