Function at 0x103756e
Capabilities:
Check if file exists
Get file attributes
Set file attributes
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x1099a38]
push ebx
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], eax
mov dword [ebp - 0x128], edi
mov dword [ebp - 0x10c], 1
mov dword [ebp - 0x11c], ebx
mov byte [ebp - 0x108], bl
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
cmp eax, ebx
mov dword [ebp - 0x130], eax
jne 0x10375dd
mov dword [ebp - 0x10c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x82b
push 0x100cad4
push 0x100ca9c
call fcn.01071aea
add esp, 0x10
jmp 0x1037952
push esi
mov esi, 0x1000
push esi
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [ebp - 0x110], eax
jne 0x1037615
mov dword [ebp - 0x10c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x832
push 0x100cad4
push 0x100ca60
jmp 0x1037671
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov dword [ebp - 0x134], eax
jne 0x1037645
mov dword [ebp - 0x10c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x839
push 0x100cad4
push 0x100ca2c
jmp 0x1037671
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x103767e
mov dword [ebp - 0x10c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x840
push 0x100cad4
push 0x100c9ec
call fcn.01071aea
add esp, 0x10
jmp 0x1037936
push ebx
push 0x80000080
push 3
push ebx
push 1
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x124], eax
jne 0x10376ca
mov dword [ebp - 0x10c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x84f
push 0x100cad4
push 0x100c9c0
call fcn.01071aea
add esp, 0x14
jmp 0x1037936
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1037706
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1037706
mov dword [ebp - 0x10c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x856
push 0x100cad4
push 0x100c98c
jmp 0x10378bd
push 0x100c974
push 0x200
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x11c]
push eax
push esi
push dword [ebp - 0x110]
mov dword [ebp - 0x120], esi
call fcn.010374af
add esp, 0x18
cmp eax, ebx
jge 0x1037752
push eax
push 0x85f
push 0x100cad4
mov dword [ebp - 0x10c], ebx
push 0x100c944
jmp 0x1037919
mov esi, dword [ebp - 0x11c]
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0x100c934
push 0x10f54c0
call fcn.01070fc9
mov ecx, dword [0x10bbbec]
dec ecx
cmp ecx, ebx
mov dword [ebp - 0x118], ecx
jl 0x103787b
lea ecx, [ecx + ecx*4]
shl ecx, 6
mov dword [ebp - 0x114], ecx
mov edi, 0x140
mov eax, dword [0x10bbbe4]
add eax, ecx
cmp dword [eax + 0x12c], ebx
jne 0x103785b
cmp dword [eax + 0x130], ebx
je 0x103785b
mov cl, byte [eax + 0x13c]
add cl, 0x30
movsx ecx, cl
push ecx
push eax
lea ecx, [ebp - 0x108]
push ecx
push eax
push ecx
push eax
push 0x100c920
push 0x200
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x11c]
push eax
push dword [ebp - 0x120]
push esi
call fcn.010374af
add esp, 0x30
cmp eax, 0x8007007a
jne 0x1037847
sub esi, dword [ebp - 0x110]
push ebx
lea eax, [ebp - 0x12c]
push eax
push esi
push dword [ebp - 0x110]
push dword [ebp - 0x124]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10378c7
mov esi, dword [ebp - 0x110]
inc dword [ebp - 0x118]
add dword [ebp - 0x114], edi
mov dword [ebp - 0x120], 0x1000
mov byte [esi], bl
jmp 0x1037855
cmp eax, ebx
jl 0x10378e1
mov esi, dword [ebp - 0x11c]
mov ecx, dword [ebp - 0x114]
dec dword [ebp - 0x118]
sub ecx, edi
cmp dword [ebp - 0x118], ebx
mov dword [ebp - 0x114], ecx
jge 0x1037799
mov edi, dword [ebp - 0x128]
sub esi, dword [ebp - 0x110]
push ebx
lea eax, [ebp - 0x12c]
push eax
push esi
push dword [ebp - 0x110]
push dword [ebp - 0x124]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10378ec
mov dword [ebp - 0x10c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x892
push 0x100cad4
push 0x100c8f0
call fcn.01071aea
add esp, 0x14
jmp 0x103792a
mov dword [ebp - 0x10c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x128]
push 0x878
jmp 0x10378b3
push eax
push 0x883
jmp 0x103773d
push dword [ebp - 0x134]
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x1037923
mov dword [ebp - 0x10c], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x899
push 0x100cad4
push 0x100c8a8
call fcn.01071aea
add esp, 0x10
jmp 0x103792a
push edi
push ebx
call fcn.01034d42
push dword [ebp - 0x124]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x110], ebx
pop esi
je 0x1037952
push dword [ebp - 0x110]
push ebx
push dword [ebp - 0x130]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10c]
pop edi
pop ebx
call fcn.0106bc50
leave
ret 4