Function at 0x476b00
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5761fc
mov eax, dword fs:[0]
push eax
sub esp, 0x154
mov eax, dword [0x641030]
xor eax, esp
mov dword [esp + 0x150], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x641030]
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.00436260
xor ebx, ebx
lea ecx, [edi + 0x2b8]
mov dword [esp + 0x170], ebx
call fcn.00550cd0
test eax, eax
jne 0x476ba2
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.00436290
xor al, al
jmp 0x476e30
lea ecx, [esp + 0x4c]
call fcn.0040e280
push esi
lea eax, [esp + 0x50]
push eax
push ebp
mov ecx, edi
mov byte [esp + 0x17c], 1
call fcn.004760b0
cmp al, bl
jne 0x476be6
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.0040e320
jmp 0x476b87
cmp byte [edi + 0x2b4], bl
je 0x476c08
lea eax, [edi + 0x2c]
push eax
lea ecx, [esp + 0x50]
call fcn.0040f7f0
push eax
call fcn.004764d0
add esp, 8
cmp al, bl
je 0x476bd4
push 0x5ca79c
lea ecx, [esp + 0x50]
call fcn.0040f7f0
push eax
call fcn.00435b60
mov ebp, eax
add esp, 8
cmp ebp, ebx
jne 0x476c7e
cmp byte [edi + 0x2b4], bl
je 0x476c43
add edi, 0x2c
push edi
lea ecx, [esp + 0x50]
call fcn.0040f7f0
push eax
call fcn.00476680
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.0040f7f0
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.0040e320
jmp 0x476b87
push ebx
push 0xa
push ebp
call fcn.005570ac
add esp, 0xc
test eax, eax
je 0x476cf0
cmp byte [edi + 0x2b4], bl
je 0x476cac
add edi, 0x2c
push edi
lea ecx, [esp + 0x50]
call fcn.0040f7f0
push eax
call fcn.00476680
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.0040f7f0
push eax
mov eax, dword [edi + 0x2c]
push str.filename
mov ecx, esi
call eax
push ebp
call fcn.005571ed
add esp, 4
lea ecx, [esp + 0x4c]
mov byte [esp + 0x170], bl
call fcn.0040e320
jmp 0x476b87
lea ecx, [esp + 0x18]
call fcn.00438210
mov ecx, dword [esp + 0x14]
push ecx
mov byte [esp + 0x174], 2
call fcn.00437c10
fstp qword [esp + 0x2c]
add esp, 4
lea ecx, [esp + 0x30]
call fcn.00447240
push 8
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x38]
mov byte [esp + 0x178], 3
call fcn.00448260
call fcn.00436fc0
test al, al
jne 0x476d45
lea ecx, [esp + 0x30]
call fcn.004474c0
push ebp
push 1
push 8
lea ecx, [esp + 0x3c]
call fcn.00446f60
push eax
call fcn.00556f32
push ebp
mov dword [esp + 0x28], eax
call fcn.005571ed
add esp, 0x14
cmp byte [edi + 0x2b4], bl
je 0x476d84
add edi, 0x2c
push edi
lea ecx, [esp + 0x50]
call fcn.0040f7f0
push eax
call fcn.00476680
add esp, 8
cmp dword [esp + 0x14], 1
je 0x476de8
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.0040f7f0
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.004479b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x170], 1
call fcn.00438220
lea ecx, [esp + 0x4c]
mov byte [esp + 0x170], bl
call fcn.0040e320
jmp 0x476b87
lea ecx, [esp + 0x30]
mov byte [esp + 0x170], 2
call fcn.004479b0
lea ecx, [esp + 0x18]
mov byte [esp + 0x170], 1
call fcn.00438220
lea ecx, [esp + 0x4c]
mov byte [esp + 0x170], bl
call fcn.0040e320
lea ecx, [esp + 0x1c]
mov dword [esp + 0x170], 0xffffffff
call fcn.00436290
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.005550b0
add esp, 0x160
ret 0xc