Function at 0x1005ad70
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x101968bc
mov eax, dword fs:[0]
push eax
sub esp, 0x154
mov eax, dword [0x1026d48c]
xor eax, esp
mov dword [esp + 0x150], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1026d48c]
xor eax, esp
push eax
lea eax, [esp + 0x168]
mov dword fs:[0], eax
mov eax, dword [esp + 0x17c]
mov ebp, dword [esp + 0x178]
mov esi, dword [esp + 0x180]
mov edi, ecx
push edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], eax
call fcn.1005ff60
xor ebx, ebx
lea ecx, [edi + 0x2c0]
mov dword [esp + 0x170], ebx
call fcn.100326a0
test eax, eax
jne 0x1005ae12
mov edx, dword [esi]
mov eax, dword [str.No_cache_roots_have_been_set.__Need_to_call_AddRoot_at_least_once.]
mov edx, dword [edx + 0x14]
push eax
mov ecx, esi
call edx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x170], 0xffffffff
call fcn.1005ff90
xor al, al
jmp 0x1005b0a4
lea ecx, [esp + 0x4c]
call fcn.1000a870
push esi
lea eax, [esp + 0x50]
push eax
push ebp
mov ecx, edi
mov byte [esp + 0x17c], 1
call fcn.1005a340
cmp al, bl
jne 0x1005ae56
mov edx, dword [esi]
mov eax, dword [str.Failed_to_convert_resource_name_to_filename]
mov edx, dword [edx + 0x14]
push eax
mov ecx, esi
call edx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x170], bl
call fcn.1000a910
jmp 0x1005adf7
cmp byte [edi + 0x2bc], bl
je 0x1005ae78
lea eax, [edi + 0x2c]
push eax
lea ecx, [esp + 0x50]
call fcn.1000c320
push eax
call fcn.1005a760
add esp, 8
cmp al, bl
je 0x1005ae44
push 0x101e8688
lea ecx, [esp + 0x50]
call fcn.1000c320
push eax
call fcn.1002b120
mov ebp, eax
add esp, 8
cmp ebp, ebx
jne 0x1005aeee
cmp byte [edi + 0x2bc], bl
je 0x1005aeb3
add edi, 0x2c
push edi
lea ecx, [esp + 0x50]
call fcn.1000c320
push eax
call fcn.1005a920
add esp, 8
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_open_file
mov ecx, esi
call eax
mov edi, dword [esi]
lea ecx, [esp + 0x4c]
call fcn.1000c320
mov edx, dword [edi + 0x2c]
push eax
push str.filename
mov ecx, esi
call edx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x170], bl
call fcn.1000a910
jmp 0x1005adf7
push ebx
push 0xa
push ebp
call dword [sym.imp.MSVCR80.dll_fseek]
add esp, 0xc
test eax, eax
je 0x1005af62
cmp byte [edi + 0x2bc], bl
je 0x1005af1d
add edi, 0x2c
push edi
lea ecx, [esp + 0x50]
call fcn.1000c320
push eax
call fcn.1005a920
add esp, 8
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_seek_to_position_in_cache_file.
mov ecx, esi
call edx
mov edi, dword [esi]
lea ecx, [esp + 0x4c]
call fcn.1000c320
push eax
mov eax, dword [edi + 0x2c]
push str.filename
mov ecx, esi
call eax
push ebp
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
lea ecx, [esp + 0x4c]
mov byte [esp + 0x170], bl
call fcn.1000a910
jmp 0x1005adf7
lea ecx, [esp + 0x18]
call fcn.1002bf10
mov ecx, dword [esp + 0x14]
push ecx
mov byte [esp + 0x174], 2
call fcn.1002b8d0
fstp qword [esp + 0x2c]
add esp, 4
lea ecx, [esp + 0x30]
call fcn.100182e0
push 8
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x38]
mov byte [esp + 0x178], 3
call fcn.10019380
call fcn.100eee40
test al, al
jne 0x1005afb7
lea ecx, [esp + 0x30]
call fcn.100185a0
push ebp
push 1
push 8
lea ecx, [esp + 0x3c]
call fcn.1008bea0
push eax
call dword [sym.imp.MSVCR80.dll_fwrite]
push ebp
mov dword [esp + 0x28], eax
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 0x14
cmp byte [edi + 0x2bc], bl
je 0x1005aff8
add edi, 0x2c
push edi
lea ecx, [esp + 0x50]
call fcn.1000c320
push eax
call fcn.1005a920
add esp, 8
cmp dword [esp + 0x14], 1
je 0x1005b05c
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_update_cache_file.
mov ecx, esi
call edx
mov edi, dword [esi]
lea ecx, [esp + 0x4c]
call fcn.1000c320
push eax
mov eax, dword [edi + 0x2c]
push str.filename
mov ecx, esi
call eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x170], 2
call fcn.10018a90
lea ecx, [esp + 0x18]
mov byte [esp + 0x170], 1
call fcn.1002bf20
lea ecx, [esp + 0x4c]
mov byte [esp + 0x170], bl
call fcn.1000a910
jmp 0x1005adf7
lea ecx, [esp + 0x30]
mov byte [esp + 0x170], 2
call fcn.10018a90
lea ecx, [esp + 0x18]
mov byte [esp + 0x170], 1
call fcn.1002bf20
lea ecx, [esp + 0x4c]
mov byte [esp + 0x170], bl
call fcn.1000a910
lea ecx, [esp + 0x1c]
mov dword [esp + 0x170], 0xffffffff
call fcn.1005ff90
mov al, 1
mov ecx, dword [esp + 0x168]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x150]
xor ecx, esp
call fcn.1018f87e
add esp, 0x160
ret 0xc