Function at 0x785140
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x80
mov ebx, edx
mov edi, ecx
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x786260
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x30], 0
xor esi, esi
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x3c], edi
cmp esi, 4
ja 0x7853da
nop word [eax + eax]
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x7851aa
mov eax, dword [edi]
mov dword [ebp - 0x10], 0xffffffff
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x785469
mov dword [ebp - 0x48], eax
and eax, 0x410
cmp eax, 0x10
jne 0x7853fd
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x10], 0
lea eax, [ebp - 0x38]
push eax
push 0
push 0x10
push edi
lea eax, [ebp - 0x28]
push eax
call fcn.00789cf0
add esp, 0x14
mov eax, dword [ebp - 0x30]
test al, 1
je 0x785212
cmp eax, 1
jne 0x785350
cmp dword [ebp - 0x38], 0
jne 0x785350
mov dword [ebp - 0x44], 0
mov ecx, dword [ebp - 0x28]
test ecx, ecx
mov ebx, dword [ebp - 0x2c]
je 0x7852e0
xor eax, eax
xor edx, edx
xor esi, esi
jmp 0x785241
mov esi, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x28]
cmp ecx, esi
mov eax, dword [ebp - 0x20]
je 0x7852ed
test ecx, ecx
je 0x78524b
cmp dword [ecx + 0x34], 0
jne 0x785257
xor edi, edi
test esi, esi
je 0x7852cf
cmp dword [esi + 0x34], 0
je 0x7852cf
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], eax
add ecx, 0xc
mov dword [ebp - 0x10], 1
mov edx, ebx
call fcn.00785140
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x20], eax
adc edx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x785294
mov eax, dword [ebx + 8]
test al, 1
je 0x785294
mov edi, 1
cmp eax, 1
jne 0x7852cc
cmp dword [ebx], 0
jne 0x7852cc
push ebx
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x24], edx
call fcn.0078b320
mov edx, dword [ebp - 0x24]
add esp, 8
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x785230
mov eax, dword [ebx + 8]
test al, 1
je 0x785230
mov edi, 1
cmp eax, 1
jne 0x7852cc
cmp dword [ebx], 0
je 0x785230
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x20], eax
test esi, esi
jne 0x7852f3
jmp 0x785310
mov dword [ebp - 0x20], 0
xor edx, edx
xor edi, edi
jmp 0x785310
xor edi, edi
test esi, esi
je 0x785310
lock dec dword [esi]
jne 0x785310
mov ecx, esi
mov dword [ebp - 0x24], edx
call fcn.00789c00
push esi
call fcn.00789bd0
mov edx, dword [ebp - 0x24]
add esp, 4
nop
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x785332
lock dec dword [esi]
jne 0x785332
mov ecx, esi
mov dword [ebp - 0x24], edx
call fcn.00789c00
push esi
call fcn.00789bd0
mov edx, dword [ebp - 0x24]
add esp, 4
cmp edi, 4
jne 0x7853d1
mov esi, dword [ebp - 0x4c]
inc esi
mov edi, dword [ebp - 0x3c]
cmp esi, 4
jbe 0x7851a0
jmp 0x7853da
mov dword [ebp - 0x44], 0x14
mov dword [ebp - 0x40], 0xa56f90
lea eax, [ebp - 0x44]
push eax
lea esi, [ebp - 0x38]
push esi
call fcn.00785560
add esp, 8
test al, al
mov ebx, dword [ebp - 0x2c]
jne 0x785394
mov dword [ebp - 0x54], 0x72
mov dword [ebp - 0x50], 0xa56f90
lea eax, [ebp - 0x54]
push eax
push esi
call fcn.00785560
add esp, 8
test al, al
je 0x7853a7
mov dword [ebp - 0x20], 0
mov edi, 4
xor edx, edx
jmp 0x785310
test ebx, ebx
je 0x7854d9
mov eax, dword [ebp - 0x30]
mov dword [ebx + 8], eax
movsd xmm0, qword [ebp - 0x38]
movsd qword [ebx], xmm0
mov dword [ebp - 0x20], 0
mov edi, 1
xor edx, edx
jmp 0x785310
test edi, edi
mov edi, dword [ebp - 0x3c]
jne 0x7853f1
jmp 0x785406
test ebx, ebx
je 0x78549a
mov eax, dword [ebp - 0x30]
mov dword [ebx + 8], eax
movsd xmm0, qword [ebp - 0x38]
movsd qword [ebx], xmm0
mov eax, 0xffffffff
mov edx, 0xffffffff
jmp 0x78543e
mov dword [ebp - 0x20], 0
xor edx, edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x10], 0xffffffff
mov ecx, edi
mov edx, dword [ebp - 0x48]
push ebx
call fcn.00784670
add esp, 4
mov ecx, eax
test ebx, ebx
je 0x78542e
mov esi, ebx
mov ebx, dword [ebx + 8]
test bl, 1
jne 0x785453
movzx eax, cl
mov ecx, dword [ebp - 0x20]
add ecx, eax
mov edx, dword [ebp - 0x24]
adc edx, 0
mov eax, ecx
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x80
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 0xffffffff
mov edx, 0xffffffff
cmp ebx, 1
jne 0x78543e
cmp dword [esi], 0
jne 0x78543e
jmp 0x78542e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, eax
call fcn.00783260
mov ecx, eax
xor eax, eax
mov edx, 0
test cl, cl
jne 0x78543e
push 0x9dab6c
push ebx
push edi
push esi
call fcn.0078cac0
add esp, 0x10
jmp 0x7853f1
mov dword [ebp - 0x10], 0xffffffff
sub esp, 0x14
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x10], eax
movsd xmm0, qword [ebp - 0x38]
movsd qword [esp + 8], xmm0
mov dword [esp + 4], edi
mov dword [esp], 0x9dab8a
lea esi, [ebp - 0x8c]
mov ecx, esi
call fcn.0078bde0
push 0xa2c644
push esi
call fcn.0093533b
sub esp, 0x14
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x10], eax
movsd xmm0, qword [ebp - 0x38]
movsd qword [esp + 8], xmm0
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
mov dword [esp], 0x9dab6c
lea ecx, [ebp - 0x70]
call fcn.0078bde0
push 0xa2c644
lea eax, [ebp - 0x70]
push eax
call fcn.0093533b
add esp, 8
nop word cs:[eax + eax]
push ebp
sub esp, 0x14
add ebp, 0xc
lea ecx, [ebp - 0x44]
call fcn.00759370
add esp, 0x14
pop ebp
ret