Function at 0x10017e10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004a500
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push esi
push edi
mov eax, dword [0x10059008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [edi + 0xdc], 0
jle 0x100182c6
cmp dword [edi + 0xb4], 0
jl 0x100182c6
jg 0x10017e63
cmp dword [edi + 0xb0], 0
jbe 0x100182c6
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 4], 1
test byte [edi + 0x4c], 1
je 0x10017f4d
lea eax, [ebp - 0x60]
push eax
lea ecx, [edi + 0x58]
call fcn.10010510
mov byte [ebp - 4], 2
mov ecx, 0x10051170
cmp dword [eax + 0x10], 0
je 0x10017ebb
mov ecx, dword [eax + 4]
cmp dword [edi + 0xa4], 0
mov eax, 0x10051170
je 0x10017ecf
mov eax, dword [edi + 0x98]
push ecx
push eax
lea eax, [ebp - 0x4c]
push str._s__s.bz2
push eax
call fcn.100101a0
mov byte [ebp - 4], 1
add esp, 0x10
cmp dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
jl 0x10017f03
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x10017f03
push eax
call fcn.1002f05f
add esp, 4
push 0x5c
lea ecx, [ebp - 0x4c]
call fcn.10010230
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x4c]
call fcn.10010410
mov byte [ebp - 4], 3
mov ecx, 0x10051170
cmp dword [eax + 0x10], 0
je 0x10017f2b
mov ecx, dword [eax + 4]
call fcn.10004c00
cmp dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
jl 0x10017f4d
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x10017f4d
push eax
call fcn.1002f05f
add esp, 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x28], 0
mov byte [ebp - 4], 5
mov eax, dword [edi + 0x4c]
shr eax, 5
test al, 1
je 0x10017f9d
cmp dword [edi + 0x68], 0
mov eax, 0x10051170
je 0x10017f92
mov eax, dword [edi + 0x5c]
push eax
lea ecx, [ebp - 0x38]
call fcn.1000ff00
jmp 0x10017fd2
cmp dword [edi + 0x68], 0
mov ecx, 0x10051170
je 0x10017fab
mov ecx, dword [edi + 0x5c]
cmp dword [edi + 0xa4], 0
mov eax, 0x10051170
je 0x10017fbf
mov eax, dword [edi + 0x98]
push ecx
push eax
lea eax, [ebp - 0x38]
push str._s__s
push eax
call fcn.100101a0
add esp, 0x10
push 0x5c
lea ecx, [ebp - 0x38]
call fcn.10010230
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x38]
call fcn.10010410
mov byte [ebp - 4], 6
mov ecx, 0x10051170
cmp dword [eax + 0x10], 0
je 0x10017ffa
mov ecx, dword [eax + 4]
call fcn.10004c00
mov byte [ebp - 4], 5
cmp dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
jl 0x10018020
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x10018020
push eax
call fcn.1002f05f
add esp, 4
mov eax, dword [edi + 0x4c]
mov ebx, 0x10051170
shr eax, 5
test al, 1
je 0x1001803e
cmp dword [ebp - 0x28], 0
mov ecx, ebx
cmovne ecx, dword [ebp - 0x34]
call fcn.10004ec0
test byte [edi + 0x4c], 1
mov byte [ebp - 0xd], 0
je 0x100180c2
mov esi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x3c]
test esi, esi
je 0x10018059
lea eax, [esi - 1]
test eax, eax
jne 0x1001806c
test edx, edx
je 0x1001826c
lea eax, [edx - 1]
test eax, eax
je 0x1001826c
cmp dword [edi + 0xd4], 0xfffffffe
mov eax, dword [edi + 0xdc]
mov dword [ebp - 0x20], eax
jne 0x1001809b
push 0x20d
mov edx, str.D:_build_partners_boostmaster_rungoldsrc_clientpublic_tier1_utlmemory.h
mov ecx, str.Assertion_failed__IsReadOnly__
call fcn.10003340
mov edx, dword [ebp - 0x3c]
add esp, 4
mov esi, dword [ebp - 0x28]
push dword [ebp - 0x20]
test edx, edx
mov ecx, ebx
push dword [edi + 0xcc]
cmovne ecx, dword [ebp - 0x48]
mov eax, ebx
test esi, esi
push ecx
cmovne eax, dword [ebp - 0x34]
mov ecx, edi
push eax
call fcn.100182e0
jmp 0x100181ee
cmp dword [ebp - 0x28], 0
mov ecx, ebx
mov eax, ebx
mov dword [ebp - 0x5c], 0
cmovne ecx, dword [ebp - 0x34]
test ecx, ecx
mov dword [ebp - 0x58], 0
mov word [ebp - 0x54], 0
cmovne eax, ecx
mov byte [ebp - 0x52], 0
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x50], 4
push 0x10053b30
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 7
call fcn.100016d0
push eax
call fcn.1002eea0
mov esi, eax
add esp, 8
mov dword [ebp - 0x20], esi
test esi, esi
je 0x100181df
mov ebx, dword [edi + 0xdc]
lea ecx, [edi + 0xc8]
cmp ebx, 0x40000
jle 0x100181b7
mov dword [ebp - 0x18], ebx
call fcn.100051a0
xor edx, edx
mov ecx, eax
cmp dword [edi + 0x50], 4
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], edx
jne 0x10018199
nop dword [eax]
test ebx, ebx
je 0x10018196
push dword [ebp - 0x20]
lea edx, [ebp - 0x24]
mov dword [ebp - 0x24], 0x40000
cmp ebx, 0x40000
lea eax, [ebp - 0x18]
cmovae eax, edx
mov esi, dword [eax]
push esi
push 1
push ecx
call fcn.100350bc
mov edx, dword [ebp - 0x14]
sub ebx, esi
mov ecx, dword [ebp - 0x1c]
add edx, eax
add ecx, esi
mov dword [ebp - 0x14], edx
add esp, 0x10
mov dword [ebp - 0x18], ebx
cmp dword [edi + 0x50], 4
mov dword [ebp - 0x1c], ecx
je 0x10018150
mov esi, dword [ebp - 0x20]
cmp edx, dword [edi + 0xdc]
je 0x100181c9
push esi
call fcn.1002ecaf
add esp, 4
lea ecx, [ebp - 0x60]
call fcn.10001770
jmp 0x1001826c
push esi
push ebx
push 1
call fcn.100051a0
push eax
call fcn.100350bc
add esp, 0x10
push esi
call fcn.1002ecaf
add esp, 4
mov ebx, 0x10051170
cmp dword [edi + 0x50], 4
sete byte [ebp - 0xd]
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 5
call fcn.10001770
mov al, byte [ebp - 0xd]
test al, al
je 0x10018256
mov ecx, dword [edi + 0xa8]
test ecx, ecx
je 0x1001824d
mov eax, dword [edi + 0x4c]
shr eax, 5
test al, 1
jne 0x1001824d
cmp dword [ebp - 0x28], 0
cmovne ebx, dword [ebp - 0x34]
push ebx
push str.pathfrom
call fcn.10006ca0
cmp dword [edi + 0x68], 0
mov eax, 0x10051170
je 0x10018227
mov eax, dword [edi + 0x5c]
mov ecx, dword [edi + 0xa8]
push eax
push str.pathto
call fcn.10006ca0
mov ecx, dword [edi + 0xa8]
push str.completed
push str.status
call fcn.10006ca0
mov dword [edi + 0x50], 5
jmp 0x1001826c
cmp dword [ebp - 0x28], 0
mov dword [edi + 0x50], 7
cmovne ebx, dword [ebp - 0x34]
mov ecx, ebx
call fcn.10004fb0
cmp dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
jl 0x10018297
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10018290
push eax
call fcn.1002f05f
add esp, 4
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
cmp dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
jl 0x100182cd
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x100182cd
push eax
call fcn.1002f05f
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x50], 7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret