Function at 0x77ca9c35
Capabilities:
Get file attributes
Read file on windows
Write file on windows

Disassembly:
push dword [ebp - 0x78]
call fcn.77caa2c7
and eax, 0x3ff
cmp eax, 4
je 0x77c9dca8
cmp eax, 0x16
je 0x77c9dca8
push 5
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x78]
call fcn.77caa30f
mov edi, eax
cmp edi, ebx
jne 0x77ca9d66
jmp 0x77c9dca8
mov eax, 0x77caa760
lea edx, [eax + 2]
jmp 0x77c9dccc
mov edi, dword [ebp - 0x78]
jmp 0x77ca9d66
mov esi, 0x77c9db4c
jmp 0x77ca9d4a
push 0x57
pop edi
jmp 0x77cd9d63
mov esi, 0xc000000d
jmp 0x77ca9eb4
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x77c9dccc
sub eax, edx
sar eax, 1
jmp 0x77caa883
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xe8
mov eax, dword [0x77d260c4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp + 0x18]
push ebx
mov dword [ebp - 0xac], eax
mov eax, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x78], eax
movzx eax, di
mov dword [ebp - 0xa8], eax
mov eax, edi
shr eax, 0x10
not al
and al, 1
push 0x77ca9f30
mov byte [ebp - 0x81], al
push 0x32
lea eax, [ebp - 0x74]
xor ebx, ebx
push eax
mov dword [ebp - 0x98], esi
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x80], ebx
call fcn.77cac425
mov eax, dword [0x77d2b29c]
and al, 0xf
cmp al, 4
jae 0x77cece18
mov eax, dword [ebp - 0xa8]
cmp eax, 7
je 0x77cd9cbe
cmp eax, 8
mov dword [ebp - 0xb0], ebx
je 0x77cd9cbe
cmp eax, 5
jne 0x77caa851
test edi, 0x10000
mov dword [ebp - 0x94], 0x63
jne 0x77cd9d70
mov eax, 0x77ca9c20
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x77ca9d01
sub eax, edx
sar eax, 1
cmp dword [ebp - 0x78], ebx
jne 0x77c9da0d
mov ecx, dword [ebp - 0x98]
mov edx, dword [ecx + 4]
lea esi, [edx + eax*2]
movzx edx, word [ecx]
lea eax, [eax + eax + 6]
cmp edx, eax
jb 0x77c9dcb0
movzx ecx, word [esi]
cmp cx, 0x30
jb 0x77cd9c86
cmp cx, 0x39
ja 0x77cd9c86
push esi
call fcn.77cd9c3f
push 5
lea eax, [ebp - 0x10]
push eax
push esi
call fcn.77caa30f
mov edi, eax
cmp edi, ebx
je 0x77cece5f
movzx eax, word [edi + 6]
cmp ax, 0x30
jae 0x77cece66
mov dword [ebp - 0x78], ebx
cmp dword [ebp - 0x78], ebx
push 0x19
pop esi
jne 0x77cece7c
mov cx, word [ebp - 0x94]
lea eax, [esi + esi]
mov word [ebp + eax - 0x74], cx
mov cx, word [edi]
mov word [ebp + eax - 0x72], cx
lea ecx, [edi + 2]
mov dx, word [ecx]
inc ecx
inc ecx
cmp dword [ebp - 0x78], ebx
mov word [ebp + eax - 0x70], dx
mov dx, word [ecx]
mov word [ebp + eax - 0x6e], dx
jne 0x77cece94
mov eax, dword [0x77d2b29c]
and al, 0xf
cmp al, 4
jae 0x77cecea2
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0xe8]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
cmp dword [ebp - 0xb0], ebx
push 0x18
lea eax, [ebp - 0xe8]
pop esi
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0xc8], esi
mov dword [ebp - 0xc4], ebx
mov dword [ebp - 0xbc], 0x40
mov dword [ebp - 0xb8], ebx
mov dword [ebp - 0xb4], ebx
lea eax, [ebp - 0xa4]
jne 0x77cd9cea
push 0x60
push 7
push eax
lea eax, [ebp - 0xc8]
push eax
push 0x80100000
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.ntdll.dll_NtOpenFile]
mov esi, eax
cmp esi, ebx
jl 0x77cecf30
push 5
push 0x18
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0xa4]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.ntdll.dll_NtQueryInformationFile]
mov esi, eax
cmp esi, ebx
jl 0x77cecf85
cmp dword [ebp - 0xd4], ebx
jg 0x77cecf59
cmp esi, ebx
jl 0x77cecf85
cmp byte [ebp - 0x81], bl
je 0x77ca9eb4
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x8c]
push eax
push dword [ebp - 0x94]
push edi
call fcn.77caa2c7
push eax
call fcn.77ca5481
test eax, eax
jne 0x77c9dcc2
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x80], eax
xor esi, esi
cmp dword [ebp - 0x88], ebx
jne 0x77caa770
push dword [ebp - 0x7c]
call dword [sym.imp.ntdll.dll_NtClose]
push dword [ebp - 0x8c]
push 0x13c
push 0x77ca9f78
call fcn.77ca972d
mov eax, dword [0x77d2b29c]
and al, 0xf
cmp al, 4
jae 0x77cecff0
mov edi, dword [ebp - 0xac]
cmp edi, ebx
je 0x77ca9ef9
mov dword [edi], ebx
cmp dword [ebp - 0x88], ebx
jne 0x77ced00c
mov eax, dword [ebp - 0x90]
cmp eax, ebx
je 0x77ca9f1c
mov ecx, dword [ebp - 0xd8]
mov edx, dword [ebp - 0x80]
add ecx, edx
mov dword [eax], ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.77cd6011
leave
ret 0x18
mov ecx, dword [ebp - 0x90]
cmp ecx, ebx
je 0x77ca9ec0
mov eax, dword [ebp - 0xd8]
mov edx, dword [ebp - 0x80]
add edx, eax
cmp dword [ecx], edx
jb 0x77ca9ec0
push ebx
push ebx
push eax
push dword [ebp - 0x88]
lea eax, [ebp - 0xa4]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x7c]
call dword [sym.imp.ntdll.dll_NtReadFile]
mov edi, eax
cmp edi, ebx
jl 0x77cecfc3
mov edi, dword [ebp - 0xa4]
cmp edi, ebx
jl 0x77caa823
mov esi, dword [ebp - 0xd8]
cmp dword [ebp - 0xa0], esi
jne 0x77cecfb2
cmp dword [ebp - 0x8c], ebx
je 0x77caa806
cmp dword [ebp - 0x80], ebx
jbe 0x77caa806
cmp esi, 2
lea eax, [esi - 2]
jb 0x77cecfbc
push dword [ebp - 0x80]
mov ecx, dword [ebp - 0x88]
push dword [ebp - 0x8c]
add ecx, eax
push ecx
call sub.ntdll.dll_memcpy
add esp, 0xc
cmp edi, ebx
jl 0x77caa823
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x90]
add eax, esi
mov dword [ecx], eax
mov ecx, dword [ebp - 0xac]
cmp ecx, ebx
je 0x77caa823
mov dword [ecx], eax
push dword [ebp - 0x8c]
push 0x17f
push 0x77ca9f78
call fcn.77ca972d
push dword [ebp - 0x7c]
call dword [sym.imp.ntdll.dll_NtClose]
mov eax, edi
jmp 0x77ca9f1e
cmp eax, 7
je 0x77ca9ce3
test edi, 0x10000
je 0x77c9dc9e
mov eax, 0x77ca9b6c
lea edx, [eax + 2]
jmp 0x77cd9ccd
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x77caa873
sub eax, esi
sar eax, 1
add eax, edx
mov dword [ebp - 0x94], 0x68
jmp 0x77ca9d0f
inc esi
inc esi
inc eax
inc eax
cmp eax, 6
ja 0x77ca9d2b
jmp 0x77ca9d4a
mov dword [ebp - 0xb0], 1
jmp 0x77ca9cda
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x77cd9ccd
sub eax, edx
sar eax, 1
mov edx, eax
mov eax, 0x77caa760
lea esi, [eax + 2]
jmp 0x77caa873
push ebx
push ebx
push 0x20
push ebx
push 1
push 0x80
push ebx
push eax
lea eax, [ebp - 0xc8]
push eax
push 0x40100000
lea eax, [ebp - 0x7c]
push eax
mov dword [ebp - 0x98], ebx
mov dword [ebp - 0x9c], ebx
call dword [sym.imp.ntdll.dll_NtCreateFile]
mov edi, eax
cmp edi, ebx
jl 0x77cecedc
cmp dword [ebp - 0x88], ebx
je 0x77c9dcba
mov eax, dword [ebp - 0x90]
cmp eax, ebx
je 0x77c9dcba
push ebx
lea ecx, [ebp - 0x9c]
push ecx
push dword [eax]
lea eax, [ebp - 0xa4]
push dword [ebp - 0x88]
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x7c]
call dword [sym.imp.ntdll.dll_NtWriteFile]
mov edi, eax
cmp edi, ebx
jge 0x77caa823
jmp 0x77cecf06
mov eax, 0x77ca9b6c
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x77cd9d78
sub eax, edx
sar eax, 1
mov edx, eax
mov eax, 0x77ca9c20
lea esi, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x77cd9d90
sub eax, esi
sar eax, 1
add eax, edx
jmp 0x77ca9d0f
mov edx, dword [esi + 4]
cmp edx, ebx
je 0x77cece38
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x77cece24
sub eax, esi
sar eax, 1
lea eax, [eax + eax + 2]
jmp 0x77cece3a
xor eax, eax
push ebx
push eax
push edx
push 4
lea eax, [ebp - 0xa8]
push eax
push ebx
push 0x10
push 0x18
push 0x6c
push 0x77cf057c
call fcn.77d1cff0
add esp, 0x28
jmp 0x77ca9cbc
mov edi, esi
jmp 0x77ca9d66
cmp ax, 0x39
mov dword [ebp - 0x78], 1
ja 0x77ca9d74
jmp 0x77ca9d77
push 0x18
pop esi
push 0x77ced058
push 0x32
lea eax, [ebp - 0x74]
push eax
call fcn.77cac425
jmp 0x77ca9d83
mov cx, word [ecx + 2]
mov word [ebp + eax - 0x6c], cx
jmp 0x77ca9db8
lea eax, [ebp - 0x74]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x77cecea8
sub eax, edx
push ebx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x74]
push eax
push ebx
push 1
push 0x18
push 0xc9
push 0x77cf057c
call fcn.77d1cff0
add esp, 0x20
jmp 0x77ca9dc7
mov eax, dword [0x77d2b29c]
and al, 0xf
cmp al, 4
jb 0x77caa841
push ebx
push edi
push ebx
push esi
push 0xe7
push 0x77cf057c
call fcn.77d1cff0
add esp, 0x18
jmp 0x77caa841
mov eax, dword [0x77d2b29c]
and al, 0xf
cmp al, 4
jb 0x77caa838
push ebx
push edi
push ebx
push esi
push 0xfc
push 0x77cf057c
call fcn.77d1cff0
add esp, 0x18
jmp 0x77caa838
mov eax, dword [0x77d2b29c]
and al, 0xf
cmp al, 4
jb 0x77cecf52
push ebx
push esi
push ebx
push 0x18
push 0x10f
push 0x77cf057c
call fcn.77d1cff0
add esp, 0x18
mov eax, esi
jmp 0x77ca9f1e
mov eax, dword [0x77d2b29c]
and al, 0xf
cmp al, 4
mov esi, 0x80000005
jb 0x77cecf85
push ebx
push esi
push ebx
push 0x18
push 0x11d
push 0x77cf057c
call fcn.77d1cff0
add esp, 0x18
jmp 0x77ca9e71
mov eax, dword [0x77d2b29c]
and al, 0xf
cmp al, 4
jb 0x77cecfa7
push ebx
push esi
push ebx
push 0x18
push 0x123
push 0x77cf057c
call fcn.77d1cff0
add esp, 0x18
push dword [ebp - 0x7c]
call dword [sym.imp.ntdll.dll_NtClose]
jmp 0x77cecf52
mov edi, 0xc0000011
jmp 0x77caa823
mov eax, esi
jmp 0x77caa7ec
mov eax, dword [0x77d2b29c]
and al, 0xf
cmp al, 4
jb 0x77cecfe5
push ebx
push edi
push ebx
push 0x18
push 0x172
push 0x77cf057c
call fcn.77d1cff0
add esp, 0x18
mov esi, dword [ebp - 0xd8]
jmp 0x77caa806
push ebx
push esi
push ebx
push 0x18
push 0x13e
push 0x77cf057c
call fcn.77d1cff0
add esp, 0x18
jmp 0x77ca9eed
mov eax, dword [0x77d2b29c]
and al, 0xf
cmp al, 4
jb 0x77ced02e
push ebx
push esi
push ebx
push 0x18
push 0x145
push 0x77cf057c
call fcn.77d1cff0
add esp, 0x18
mov eax, dword [ebp - 0x90]
cmp eax, ebx
je 0x77ced04b
cmp edi, ebx
je 0x77ced04b
mov ecx, dword [ebp - 0xd8]
mov edx, dword [ebp - 0x80]
add ecx, edx
mov dword [eax], ecx
mov dword [edi], ebx
mov eax, 0x80000005
jmp 0x77ca9f1e