joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4e17f2
Capabilities:
Set socket configuration

Disassembly:
push ebx
mov ebx, ecx
push ebp
mov ebp, dword [esp + 0xc]
mov ecx, ebp
push edi
lea edi, [ebx + 0xac]
push edi
call fcn.004cce17
xor edx, edx
test al, al
je 0x4e1819
cmp word [ebp + 0x10], dx
jne 0x4e191e
cmp dword [ebx + 4], 0xffffffff
push esi
push 5
pop ecx
mov esi, ebp
rep movsd dword es:[edi], dword [esi]
je 0x4e1831
push edx
mov ecx, ebx
call fcn.00479264
xor edx, edx
push edx
push edx
push 2
lea eax, [ebx + 0xac]
push eax
call fcn.004652a0
movzx eax, al
mov ecx, ebx
neg eax
sbb eax, eax
and eax, 0xffffffeb
add eax, 0x17
push eax
call fcn.0047a8dd
cmp dword [ebx + 4], 0xffffffff
je 0x4e191d
push ebp
mov ecx, ebx
call fcn.00478e1a
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xffffffff
jne 0x4e188f
call edi
mov esi, eax
push esi
call fcn.0047741b
push eax
push esi
push ebp
push str.UDP_port_bind_failed__A:___d___s
call fcn.0047d3ef
add esp, 0x10
jmp 0x4e18a5
xor eax, eax
cmp word [ebp + 0x10], ax
jne 0x4e18a5
mov ecx, ebx
call fcn.0047a680
mov word [ebx + 0xbc], ax
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0x14]
push 4
push eax
push 0x1002
push 0xffff
push dword [ebx + 4]
mov ebp, 0x200000
mov dword [esp + 0x28], ebp
call esi
cmp eax, 0xffffffff
jne 0x4e18e3
call edi
push eax
push dword [esp + 0x18]
push str.UDP_setsockopt_SO_RCVBUF___d__failed:__d
call fcn.0047d375
add esp, 0xc
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebp
push eax
push 0x1001
push 0xffff
push dword [ebx + 4]
call esi
cmp eax, 0xffffffff
jne 0x4e1916
call edi
push eax
push dword [esp + 0x18]
push str.UDP_setsockopt_SO_SNDBUF___d__failed:__d
call fcn.0047d375
add esp, 0xc
mov ecx, ebx
call fcn.0047a05d
pop esi
pop edi
pop ebp
pop ebx
ret 4

Function at 0x4e1cb8
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
push ebx
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x80
push eax
lea eax, [ebp - 0x98]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4e1d0b
push esi
push edi
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0x18]
call fcn.004ccd29
mov edi, dword [ebp + 0x18]
lea esi, [ebp - 0x18]
push 5
pop ecx
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x14
Function at 0x4e20de
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x1a0
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1bc]
xor ebx, ebx
mov dword [esp + 0xc], ecx
mov word [esp + 0x25], bx
mov byte [esp + 0x24], bl
movzx eax, word [esi + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esp + 0x1c0]
movzx ebp, ax
test ecx, ecx
je 0x4e2145
mov ebx, ecx
mov byte [esp + 0x27], 3
lea edx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4e2120
sub ebx, edx
lea eax, [esp + 0x29]
push ebx
push ecx
push eax
mov byte [esp + 0x34], bl
call fcn.0066d9b0
add esp, 0xc
mov word [esp + ebx + 0x29], bp
xor ebx, ebx
jmp 0x4e2176
push esi
call fcn.004652a0
test al, al
je 0x4e2162
mov eax, dword [esi + 0xc]
mov byte [esp + 0x27], 1
mov dword [esp + 0x28], eax
mov word [esp + 0x2c], bp
jmp 0x4e2176
push edi
mov byte [esp + 0x2b], 4
lea edi, [esp + 0x2c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov word [esp + 0x3c], bp
pop edi
lea eax, [esp + 0x24]
mov ecx, eax
mov dword [esp + 0x18], eax
call fcn.004e2219
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x14], eax
add ecx, 0x12c
mov eax, dword [esp + 0x1b8]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1b4]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x130]
push eax
call fcn.0047a584
push ebx
push ebx
push dword [esp + 0x18]
lea eax, [esp + 0x138]
mov dword [esp + 0x18], ebx
push eax
push ebx
lea eax, [esp + 0x20]
push eax
push 2
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x1d0]
call dword [sym.imp.WS2_32.dll_WSASendTo]
mov esi, eax
test esi, esi
jne 0x4e21f1
mov esi, dword [esp + 0xc]
or eax, 0xffffffff
cmp esi, eax
je 0x4e220d
lea ecx, [esp + 0x24]
call fcn.004e2219
cmp esi, eax
jg 0x4e2209
xor eax, eax
jmp 0x4e220d
sub esi, eax
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1a0
ret 0x14

Function at 0x4e23e8
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
cmp byte [0x7c8a88], 0
je 0x4e23fe
mov al, 1
leave
ret
lea eax, [ebp - 0x190]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4e2434
mov eax, dword [ebp - 0x190]
cmp al, 2
jne 0x4e242e
shr eax, 8
cmp al, 2
jne 0x4e242e
mov byte [0x7c8a88], 1
jmp 0x4e23fa
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
leave
ret
Function at 0x4ec840
Capabilities:
Encode data using xor

Disassembly:
push ebp
sub esp, 0x18
mov eax, 0x6badb7
call fcn.0066bd6c
sub esp, 0xf4
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp + 0x18], esi
mov ebx, dword [esi + 0x39c]
call fcn.004ec9eb
mov esi, dword [esi + 0x154]
lea edi, [ebp + 4]
push 5
pop ecx
mov dword [ebp], 0x32716572
add esi, 8
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x100]
call fcn.00469aa8
and dword [ebp - 4], 0
lea eax, [ebp]
push 0x18
push eax
lea ecx, [ebp - 0x100]
call fcn.00469a46
push 5
pop ecx
mov esi, eax
lea edi, [ebp - 0x74]
rep movsd dword es:[edi], dword [esi]
push 5
pop ecx
mov esi, ebx
lea edi, [ebp - 0x88]
rep movsd dword es:[edi], dword [esi]
xor edi, edi
mov ecx, edi
mov eax, dword [ebx + ecx + 0x14]
xor dword [ebp + ecx - 0x74], eax
add ecx, 4
cmp ecx, 0x14
jb 0x4ec8a5
mov al, byte [0x79cddc]
mov esi, dword [ebp + 0x18]
mov ecx, esi
shr al, 2
not al
mov dword [ebp - 0x58], edi
and al, 1
mov dword [ebp - 0x60], edi
or al, 2
mov dword [ebp - 0x5c], edi
mov byte [ebp - 0x55], al
mov byte [ebx], al
lea eax, [ebp - 0x50]
push dword [esi + 0x154]
mov dword [ebp - 0x54], 0x44000000
push eax
call fcn.004e6834
mov eax, dword [esi + 0x154]
mov ecx, esi
push 0x14
add eax, 8
push eax
call fcn.004ede35
lea eax, [ebx + 0xc]
push eax
push 0x54
lea eax, [ebp - 0x60]
push eax
call fcn.00588eda
lea eax, [ebx + 0x114]
mov dword [ebx + 5], edi
push eax
lea ecx, [ebx + 1]
push 8
push ecx
mov dword [ecx], edi
call fcn.00588eda
push edi
push 0x7c
lea eax, [ebp - 0x88]
mov ecx, esi
push eax
call fcn.0047b4f9
lea ecx, [ebp - 0x100]
call fcn.00427598
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add ebp, 0x1c
leave
ret

Function at 0x4f2a18
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x6bb1c3
call fcn.0066bd6c
sub esp, 0x1c
push ebx
push esi
mov ebx, ecx
push edi
mov dword [ebp - 0x10], ebx
xor eax, eax
mov dword [ebx], 0x6f4f70
mov dword [ebp - 4], eax
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 8]
lea edi, [ebx + 0x14]
push 5
pop ecx
lea esi, [ebp + 0xc]
mov byte [ebp - 4], 1
rep movsd dword es:[edi], dword [esi]
xor edi, edi
mov dword [ebx + 0x10], eax
push edi
call fcn.0049605e
mov ecx, eax
mov esi, edx
mov eax, dword [0x7c19f8]
cdq
add ecx, eax
mov dword [ebx + 0x30], edi
mov dword [ebx + 0x28], ecx
adc esi, edx
mov dword [ebx + 0x34], edi
mov dword [ebx + 0x2c], esi
mov dword [ebx + 0x38], edi
mov dword [ebx + 0x3c], 0xea60
mov dword [ebx + 0x40], edi
mov dword [ebx + 0x44], edi
mov dword [ebx + 0x48], edi
lea esi, [ebx + 0x4c]
mov dword [esi], 0x6f4e68
push str.share
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 3
push eax
call fcn.00473644
push esi
push eax
lea ecx, [ebx + 0x50]
mov byte [ebp - 4], 4
call fcn.00542894
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 6
call fcn.0042756c
push 0x1388
call fcn.0045e2af
mov ecx, ebx
mov dword [ebx + 0x94], eax
mov dword [ebx + 0x90], edi
call fcn.004f3c8f
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x18
Function at 0x4f4ec8
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
cmp byte [esi + 0x154], 0
jne 0x4f4f4d
mov edx, 0x100
cmp dword [esi + 0x170], edx
jae 0x4f4f4d
mov edi, dword [esp + 0x10]
lea eax, [esi + 0x158]
mov byte [esi + 0x154], 1
xor ebx, ebx
mov dword [esi + 0x158], ebx
mov dword [esi + 0x15c], ebx
push eax
mov dword [esi + 0x160], ebx
lea eax, [esi + 0x16c]
mov dword [esi + 0x164], ebx
mov ecx, dword [esi + 0x170]
sub edx, ecx
push eax
push edx
mov edx, dword [esi]
lea eax, [esi + 0x174]
add eax, ecx
mov dword [esi + 0x168], edi
push eax
mov ecx, esi
call dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x4f4f55
push edi
mov byte [esi + 0x154], bl
call dword [sym.imp.KERNEL32.DLL_SetEvent]
mov al, 1
pop edi
pop esi
pop ebx
ret 4
xor al, al
jmp 0x4f4f4f
Function at 0x4fadb9
Capabilities:
Get process heap flags

Disassembly:
mov eax, 0x6b4bc1
call fcn.0066bd6c
push ecx
push ebx
mov ebx, ecx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x10], ebx
xor edi, edi
push esi
mov dword [ebx], edi
mov dword [ebx + 0x10], edi
mov dword [ebx + 0x14], edi
call fcn.004274a7
lea ecx, [ebx + 0x18]
mov dword [ebp - 4], edi
lea eax, [esi + 0x18]
mov dword [ecx], edi
push eax
mov dword [ecx + 0x10], edi
mov dword [ecx + 0x14], edi
call fcn.004274a7
mov eax, dword [esi + 0x30]
lea edi, [ebx + 0x40]
mov dword [ebx + 0x30], eax
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x3c]
add esi, 0x40
mov dword [ebx + 0x3c], ecx
push 5
pop ecx
mov dword [ebx + 0x38], eax
mov eax, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4

Function at 0x5006f4
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 8]
xor eax, eax
push esi
mov esi, dword [esp + 8]
cmp edx, 4
jb 0x500719
mov ecx, edx
shr ecx, 2
xor eax, dword [esi]
sub edx, 4
add esi, 4
rol eax, 0xd
sub ecx, 1
jne 0x500709
test edx, edx
je 0x50072b
movzx ecx, byte [esi]
xor eax, ecx
inc esi
rol eax, 8
sub edx, 1
jne 0x50071d
pop esi
ret 8
Function at 0x50631d
Capabilities:
Get file attributes

Disassembly:
mov eax, 0x6bc48d
call fcn.0066bd6c
sub esp, 0x34
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
mov edx, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
test edx, edx
je 0x506346
mov eax, dword [edx + 0x20]
mov ecx, dword [edx + 0x24]
jmp 0x50634a
mov eax, ebx
mov ecx, ebx
mov dword [esi], eax
mov eax, dword [ebp + 0x24]
mov dword [esi + 4], ecx
mov ecx, dword [ebp + 0x28]
mov dword [esi + 8], eax
xor eax, eax
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
push 7
pop edi
mov dword [esi + 0x38], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x4c], edi
mov word [esi + 0x38], ax
mov dword [esi + 0x50], ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x64], edi
mov word [esi + 0x50], ax
mov al, byte [ebp + 0x2c]
mov byte [esi + 0x69], al
mov al, byte [esi + 0x6a]
and al, 0xe1
mov byte [esi + 0x68], 8
or al, 0x40
mov word [esi + 0x6b], bx
mov byte [esi + 0x6a], al
xor eax, eax
mov dword [esi + 0x70], ebx
mov dword [esi + 0x80], ebx
mov dword [esi + 0x84], edi
mov word [esi + 0x70], ax
mov dword [esi + 0x88], ebx
mov dword [esi + 0x8c], ebx
mov dword [esi + 0x90], edx
mov byte [esi + 0x94], bl
mov dword [esi + 0x98], ebx
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.00506c0d
sub esp, 0x18
lea eax, [ebp + 0xc]
mov ecx, esp
push eax
mov dword [ecx], ebx
mov dword [ecx + 0x10], ebx
mov dword [ecx + 0x14], ebx
call fcn.004274a7
mov ecx, esi
call fcn.00508ba9
xor eax, eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], edi
mov word [ebp - 0x28], ax
mov ecx, dword [esi + 0x90]
mov byte [ebp - 4], 5
test ecx, ecx
je 0x50644a
push esi
lea eax, [ebp - 0x40]
push eax
call fcn.00507a71
lea ecx, [ebp - 0x28]
cmp ecx, eax
je 0x506442
mov byte [ebp + 0x2c], bl
push dword [ebp + 0x2c]
push eax
call fcn.00427543
lea ecx, [ebp - 0x40]
call fcn.0042756c
lea eax, [ebp - 0x28]
push eax
call fcn.0045f5f5
test al, al
je 0x506477
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
jb 0x506463
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
shl al, 5
xor al, byte [esi + 0x6a]
and al, 0x20
xor byte [esi + 0x6a], al
jmp 0x50647b
and byte [esi + 0x6a], 0xdf
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x5064b6
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov dword [ebp + 0x2c], eax
mov dword [ebp + 8], ecx
cmp eax, 0x1000
jb 0x5064ad
lea eax, [ebp + 0x2c]
push eax
lea eax, [ebp + 8]
push eax
call fcn.0042741e
mov eax, dword [ebp + 0x2c]
mov ecx, dword [ebp + 8]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
lea ecx, [ebp + 0xc]
call fcn.0042756c
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x28
Function at 0x506f7c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, 0x6af802
call fcn.0066bd6c
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, ecx
mov esi, 0xa0
xor ebx, ebx
mov dword [ebp - 0x10], esi
mov eax, dword [edi + 8]
mov ecx, dword [edi + 4]
sub eax, ecx
cdq
idiv esi
test eax, eax
je 0x507036
xor esi, esi
lea eax, [esi + ecx]
mov ecx, edi
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00507a71
and dword [ebp - 4], 0
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
jb 0x506fcc
mov eax, dword [ebp - 0x28]
push eax
call fcn.00458d4c
test al, al
jne 0x506fe0
mov eax, dword [edi + 4]
and byte [eax + esi + 0x6a], 0xdf
jmp 0x50700f
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
jb 0x506fec
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
mov ecx, dword [edi + 4]
cmp eax, 0xffffffff
je 0x50700a
shl al, 5
xor al, byte [esi + ecx + 0x6a]
and al, 0x20
xor byte [esi + ecx + 0x6a], al
jmp 0x50700f
or byte [esi + ecx + 0x6a], 0x20
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.0042756c
mov eax, dword [edi + 8]
inc ebx
mov ecx, dword [edi + 4]
add esi, 0xa0
sub eax, ecx
cdq
idiv dword [ebp - 0x10]
cmp ebx, eax
jb 0x506fad
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x50760d
Capabilities:
Delete file

Disassembly:
mov eax, 0x6bc619
call fcn.0066bd6c
sub esp, 0x78
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.00458d4c
test al, al
je 0x50781d
push ebx
xor ebx, ebx
push esi
cmp byte [ebp + 0xc], bl
je 0x507746
push edi
call fcn.0045f4ee
mov esi, eax
test esi, esi
je 0x50781b
call fcn.004947c1
push eax
push 0x21
lea ecx, [ebp - 0x1c]
call fcn.004945e0
push edi
push str.fileName
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], ebx
call fcn.0046591f
push esi
push str.error
lea ecx, [ebp - 0x1c]
call fcn.0046591f
lea eax, [ebp - 0x1c]
push eax
call fcn.00495af4
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.00494649
push esi
push edi
push str.Warning:_Delete_to_trash_failed_for__S._Error:__d._Deleting_permanently.
push 0x800
call fcn.0048a8cb
add esp, 0x10
lea eax, [ebp - 0x54]
push esi
push eax
call fcn.0043c317
lea eax, [ebp - 0x54]
mov dword [ebp - 4], 1
push eax
push str._to_trash_:1___error_code_:
lea eax, [ebp - 0x6c]
push eax
call fcn.00427aa2
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 3
call fcn.004102c8
push 0xa
mov dword [ebp - 0x24], ebx
lea ecx, [ebp - 0x24]
push str.deletefail
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], 0xf
mov byte [ebp - 0x24], bl
call fcn.0040fe77
push ebx
push ebx
push ebx
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x6c]
push eax
push 0x21
call fcn.004814dd
mov eax, dword [ebp - 0x10]
cmp eax, 0x10
jb 0x50773a
mov ecx, dword [ebp - 0x24]
inc eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], ecx
cmp eax, 0x1000
jb 0x507731
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call fcn.0042741e
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.004102c8
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x50781b
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, eax
push esi
push edi
push str.Warning:_Delete_to_trash_failed_for__S._Error:__d._Deleting_permanently.
push 0x800
call fcn.0048a8cb
add esp, 0x10
lea eax, [ebp - 0x6c]
push esi
push eax
call fcn.00471e9c
lea eax, [ebp - 0x6c]
mov dword [ebp - 4], 5
push eax
push str._to_trash_:0___error_code_:
lea eax, [ebp - 0x84]
push eax
call fcn.00427aa2
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 7
call fcn.004102c8
push 0xa
mov dword [ebp - 0x3c], ebx
lea ecx, [ebp - 0x3c]
push str.deletefail
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], 0xf
mov byte [ebp - 0x3c], bl
call fcn.0040fe77
push ebx
push ebx
push ebx
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x84]
push eax
push 0x21
call fcn.004814dd
mov eax, dword [ebp - 0x28]
cmp eax, 0x10
jb 0x507810
mov ecx, dword [ebp - 0x3c]
inc eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], ecx
cmp eax, 0x1000
jb 0x507807
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 8]
push eax
call fcn.0042741e
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
lea ecx, [ebp - 0x84]
call fcn.004102c8
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
leave
ret 8
Function at 0x5081a2
Capabilities:
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebp, 0xa0
xor ecx, ecx
mov dword [esp + 0x14], ebp
mov bl, 1
mov dword [esp + 0x10], ecx
mov eax, dword [edi + 8]
mov esi, dword [edi + 4]
sub eax, esi
cdq
idiv ebp
test eax, eax
je 0x508242
mov ebp, ecx
lea eax, [esi + ebp]
test byte [eax + 0x6a], 0x20
jne 0x508226
push eax
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
call fcn.00507a71
cmp dword [esp + 0x2c], 8
lea eax, [esp + 0x18]
jb 0x5081f2
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
or eax, 1
lea ecx, [esp + 0x18]
cmp dword [esp + 0x2c], 8
jb 0x50820b
mov ecx, dword [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
neg eax
lea ecx, [esp + 0x18]
sbb al, al
and bl, al
call fcn.0042756c
mov ecx, dword [esp + 0x10]
mov eax, dword [edi + 8]
inc ecx
mov esi, dword [edi + 4]
add ebp, 0xa0
sub eax, esi
mov dword [esp + 0x10], ecx
cdq
idiv dword [esp + 0x14]
cmp ecx, eax
jb 0x5081cd
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x20
ret

Function at 0x50824c
Capabilities:
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ebp, 0xa0
xor ecx, ecx
mov dword [esp + 0x14], ebp
mov bl, 1
mov dword [esp + 0x10], ecx
mov eax, dword [edi + 8]
mov esi, dword [edi + 4]
sub eax, esi
cdq
idiv ebp
test eax, eax
je 0x5082ec
mov ebp, ecx
lea eax, [esi + ebp]
test byte [eax + 0x6a], 0x20
jne 0x5082d0
push eax
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
call fcn.00507a71
cmp dword [esp + 0x2c], 8
lea eax, [esp + 0x18]
jb 0x50829c
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
and eax, 0xfffffffe
lea ecx, [esp + 0x18]
cmp dword [esp + 0x2c], 8
jb 0x5082b5
mov ecx, dword [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
neg eax
lea ecx, [esp + 0x18]
sbb al, al
and bl, al
call fcn.0042756c
mov ecx, dword [esp + 0x10]
mov eax, dword [edi + 8]
inc ecx
mov esi, dword [edi + 4]
add ebp, 0xa0
sub eax, esi
mov dword [esp + 0x10], ecx
cdq
idiv dword [esp + 0x14]
cmp ecx, eax
jb 0x508277
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x20
ret
Function at 0x5088c9
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov eax, 0x6bc6be
call fcn.0066bd6c
sub esp, 0x5c
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov ecx, 0xa0
mov eax, dword [esi + 8]
mov edi, dword [esi + 4]
sub eax, edi
cdq
idiv ecx
add eax, 1
jmp 0x508a4c
xor edx, edx
mov dword [ebp - 0x24], 7
xor eax, eax
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x28], edx
mov word [ebp - 0x38], ax
mov dword [ebp - 4], edx
test ebx, ebx
jne 0x508950
push dword [esi + 0x24]
push dword [esi + 0x20]
call fcn.00494ea6
push eax
lea eax, [ebp - 0x68]
push str._sPartFile__LX.dat
push eax
call fcn.004646d1
lea ecx, [ebp - 0x38]
add esp, 0x14
cmp ecx, eax
je 0x508941
mov byte [ebp - 0x1c], bl
push dword [ebp - 0x1c]
push eax
call fcn.00427543
lea ecx, [ebp - 0x68]
call fcn.0042756c
xor edx, edx
mov byte [ebp - 0x10], dl
jmp 0x50897f
imul ebx, ebx, 0xa0
lea eax, [edi - 0x68]
lea ecx, [ebp - 0x38]
add eax, ebx
cmp ecx, eax
je 0x508970
mov byte [ebp - 0x20], dl
push dword [ebp - 0x20]
push eax
call fcn.00427529
xor edx, edx
mov al, byte [ebx + edi - 0x36]
mov ebx, dword [ebp - 0x18]
shr al, 2
and al, 1
mov byte [ebp - 0x10], al
push edx
lea eax, [ebp - 0x38]
push eax
sub esp, 0x18
mov ecx, esp
push dword [ebp + 8]
mov dword [ecx], edx
mov dword [ecx + 0x10], edx
mov dword [ecx + 0x14], edx
call fcn.004274a7
lea eax, [ebp - 0x50]
push eax
call fcn.0045e5a4
cmp dword [ebp - 0x3c], 8
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 1
jb 0x5089b2
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x5089d5
cmp dword [ebp - 0x3c], 8
lea ecx, [ebp - 0x50]
jb 0x5089ca
mov ecx, dword [ebp - 0x50]
and eax, 0xfffffffe
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push 1
push dword [ebp - 0x10]
lea eax, [esi + 0x28]
push dword [ebp + 8]
push eax
lea eax, [ebp - 0x38]
push eax
push eax
call fcn.005082f6
lea ecx, [ebp - 0x50]
mov edi, eax
call fcn.0042756c
mov eax, dword [ebp - 0x24]
test edi, edi
jne 0x508a6f
or dword [ebp - 4], 0xffffffff
cmp eax, 8
jb 0x508a38
mov ecx, dword [ebp - 0x38]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
cmp eax, 0x1000
jb 0x508a2f
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.0042741e
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
mov eax, dword [esi + 8]
mov ecx, 0xa0
mov edi, dword [esi + 4]
inc ebx
sub eax, edi
cdq
idiv ecx
inc eax
cmp ebx, eax
mov dword [ebp - 0x18], ebx
jne 0x5088f5
mov ecx, esi
call fcn.00507378
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4
cmp eax, 8
jb 0x508aa7
mov ecx, dword [ebp - 0x38]
lea eax, [eax*2 + 2]
mov dword [ebp + 8], eax
mov dword [ebp - 0x18], ecx
cmp eax, 0x1000
jb 0x508a9e
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.0042741e
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
mov eax, edi
jmp 0x508a5e