Function at 0x860b50
Capabilities:
Check if file exists
Get file attributes
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0xb11ac8
push 0xa847a0
mov eax, dword fs:[0]
push eax
sub esp, 0x374
mov eax, dword [0xb196ec]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x20], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, ecx
mov dword [ebp - 0x380], edi
mov dword [ebp - 4], 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x860bb5
mov dword [ebp - 4], 0xfffffffe
mov eax, 0x200
jmp 0x861058
push 0
push 3
push 1
push 0x80000000
call fcn.0094db00
add esp, 0x10
mov edi, eax
cmp edi, 0xffffffff
je 0x860ba4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 0x374], esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 8], 0
je 0x860c5a
mov dword [ebp - 0x364], 0
lea eax, [ebp - 0x364]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov bl, 0x2c
lea edi, [ebp - 0x22c]
call fcn.0095ae80
add esp, 8
cmp dword [ebp - 0x364], 0xffffffff
je 0x860c5a
push 0
push 3
push 1
push 0x80000000
call fcn.0094db00
add esp, 0x10
mov edi, eax
cmp edi, 0xffffffff
je 0x860c4d
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
add esi, eax
mov dword [ebp - 0x374], esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x364]
push edx
mov eax, dword [ebp + 8]
push eax
jmp 0x860c02
lea edi, [esi + esi]
mov dword [ebp - 0x374], edi
mov ebx, dword [ebp - 0x380]
call fcn.0094b570
mov ebx, eax
mov dword [ebp - 0x360], ebx
test ebx, ebx
jne 0x860c8b
mov dword [ebp - 4], 0xfffffffe
mov eax, 0x800
jmp 0x861058
push 3
push edi
push 0
xor edi, edi
call fcn.00947440
add esp, 0xc
mov dword [ebp - 0x364], eax
test eax, eax
jne 0x860cdd
mov eax, ebx
call fcn.0094ba80
test al, al
je 0x860cc5
call fcn.0094ba00
mov dword [ebp - 4], 0xfffffffe
mov eax, 0x400
jmp 0x861058
mov edi, ebx
call fcn.00947670
mov dword [ebp - 4], 0xfffffffe
mov eax, 0x400
jmp 0x861058
xor edi, edi
mov dword [ebp - 0x368], edi
mov dword [ebp - 0x37c], edi
push edi
push 0xffffffffffffffff
lea edx, [ebp - 0x35c]
mov ebx, dword [ebp - 0x360]
mov eax, ebx
call fcn.0094b640
add esp, 8
mov esi, eax
mov ecx, dword [ebp - 0x35c]
mov dword [ebp - 0x36c], ecx
cmp esi, edi
je 0x860d4c
mov eax, ebx
call fcn.0094ba80
test al, al
je 0x860d28
call fcn.0094ba00
jmp 0x860d33
mov edi, dword [ebp - 0x360]
call fcn.00947670
mov edi, dword [ebp - 0x364]
call fcn.00947670
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
jmp 0x861058
xor eax, eax
mov dword [ebp - 0x370], eax
cmp eax, dword [ebp - 0x36c]
jge 0x860ed4
push 0
push eax
lea edx, [ebp - 0x35c]
mov eax, ebx
call fcn.0094b640
add esp, 8
mov esi, eax
test esi, esi
jne 0x860d16
mov dword [ebp - 0x378], eax
lea edx, [ebp - 0x378]
push edx
mov eax, dword [ebp + 8]
push eax
mov bl, 0x2c
lea edi, [ebp - 0x22c]
call fcn.0095ae80
add esp, 8
cmp dword [ebp - 0x378], 0xffffffff
je 0x860de3
push 0x5c
mov ecx, edi
push ecx
call fcn.00a7aa50
add esp, 8
test eax, eax
je 0x860db7
inc eax
jmp 0x860dbd
lea eax, [ebp - 0x22c]
lea ecx, [ebp - 0x358]
call fcn.0094c330
test eax, eax
jne 0x860d7f
inc dword [ebp - 0x370]
mov ebx, dword [ebp - 0x360]
mov eax, dword [ebp - 0x370]
jmp 0x860d54
xor eax, eax
jne 0x860dcc
test byte [ebp - 0x254], 0x10
je 0x860e2a
lea ecx, [ebp - 0x358]
push ecx
mov eax, dword [ebp - 0x364]
call fcn.009475c0
add esp, 4
mov esi, eax
test esi, esi
je 0x860dcc
mov ebx, dword [ebp - 0x360]
mov eax, ebx
call fcn.0094ba80
test al, al
je 0x860d28
call fcn.0094ba00
jmp 0x860d33
mov edi, dword [ebp - 0x37c]
cmp dword [ebp - 0x234], edi
jle 0x860e6c
mov eax, dword [ebp - 0x368]
test eax, eax
je 0x860e4b
push eax
call fcn.00a7a976
add esp, 4
mov edi, dword [ebp - 0x234]
add edi, edi
mov dword [ebp - 0x37c], edi
push edi
call fcn.00a77370
add esp, 4
mov ebx, eax
mov dword [ebp - 0x368], ebx
jmp 0x860e72
mov ebx, dword [ebp - 0x368]
mov edx, dword [ebp - 0x370]
push edx
mov ecx, edi
mov edx, ebx
mov eax, dword [ebp - 0x360]
call fcn.0094b9c0
add esp, 4
mov esi, eax
test esi, esi
jne 0x860e0b
push edi
push ebx
lea edx, [ebp - 0x358]
mov eax, dword [ebp - 0x364]
call fcn.00947580
add esp, 8
mov esi, eax
test esi, esi
je 0x860dcc
mov ebx, dword [ebp - 0x360]
mov eax, ebx
call fcn.0094ba80
test al, al
je 0x860d28
call fcn.0094ba00
jmp 0x860d33
mov eax, dword [ebp - 0x368]
push eax
call fcn.00a7a976
add esp, 4
cmp dword [ebp + 8], 0
je 0x860f65
mov dword [ebp - 0x36c], 0
lea ecx, [ebp - 0x36c]
push ecx
mov edx, dword [ebp + 8]
push edx
mov bl, 0x2c
lea edi, [ebp - 0x22c]
call fcn.0095ae80
add esp, 8
cmp dword [ebp - 0x36c], 0xffffffff
je 0x860f5d
push 0x5c
mov eax, edi
push eax
call fcn.00a7aa50
add esp, 8
test eax, eax
je 0x860f2b
inc eax
jmp 0x860f31
lea eax, [ebp - 0x22c]
push eax
lea edx, [ebp - 0x22c]
mov eax, dword [ebp - 0x364]
call fcn.00947540
add esp, 4
mov esi, eax
test esi, esi
jne 0x860e0b
lea eax, [ebp - 0x22c]
call fcn.0094dd20
jmp 0x860ef3
test esi, esi
jne 0x860e0b
mov ebx, dword [ebp - 0x360]
mov eax, ebx
call fcn.0094ba80
test al, al
je 0x860f7d
call fcn.0094ba00
jmp 0x860f88
mov edi, dword [ebp - 0x360]
call fcn.00947670
mov esi, eax
test esi, esi
jne 0x860d33
lea ebx, [ebp - 0x374]
lea edi, [ebp - 0x368]
mov esi, dword [ebp - 0x364]
mov eax, esi
call fcn.00947600
mov ebx, eax
test ebx, ebx
je 0x860fc6
mov edi, esi
call fcn.00947670
mov dword [ebp - 4], 0xfffffffe
mov eax, ebx
jmp 0x861058
push 0x80
push 2
push 0
push 0x40000000
mov edi, dword [ebp - 0x380]
call fcn.0094db00
add esp, 0x10
mov edi, eax
cmp edi, 0xffffffff
jne 0x860ff0
mov edi, esi
jmp 0x860cc7
push 0
lea eax, [ebp - 0x384]
push eax
mov ecx, dword [ebp - 0x374]
push ecx
mov edx, dword [ebp - 0x368]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, esi
call fcn.00947670
test eax, eax
je 0x861029
mov dword [ebp - 4], 0xfffffffe
jmp 0x861058
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
jmp 0x861058
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.00a78f21
mov esp, ebp
pop ebp
ret