Function at 0x522561
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
mov eax, dword [0x5f2e68]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
push 0x103
mov dword [ebp - 0x118], eax
lea eax, [ebp - 0x113]
mov esi, ecx
push ebx
push eax
mov dword [ebp - 0x11c], esi
mov byte [ebp - 0x114], bl
call fcn.005306b0
xor eax, eax
lea edi, [ebp - 0x144]
mov dword [ebp - 0x148], ebx
stosd dword es:[edi], eax
lea edi, [ebp - 0x134]
mov dword [ebp - 0x138], ebx
stosd dword es:[edi], eax
lea edi, [ebp - 0x13c]
add esp, 0xc
mov dword [ebp - 0x140], ebx
mov edx, esi
stosd dword es:[edi], eax
mov dword [ebp - 0x130], ebx
call fcn.004ccc0d
test eax, eax
jne 0x522689
mov edx, dword [ebp - 0x118]
call fcn.004ccc0d
test eax, eax
jne 0x522689
push ebx
push ebx
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x148]
push eax
push esi
call fcn.00432ab9
add esp, 0x18
test eax, eax
jne 0x522651
mov edi, esi
call fcn.00432263
test eax, eax
je 0x522689
cmp dword [0x5f3710], ebx
je 0x52265b
push str._GetLastError_
push dword [ebp + 0xc]
mov dword [0x5f3710], ebx
push dword [ebp - 0x118]
push esi
push str.:5:gzUnpackFile___s_____s____d__encountered_a_problem:_GetFileTime___FAILED:__s
call fcn.0042b70b
add esp, 0x14
jmp 0x52265b
mov dword [ebp - 0x130], 1
push 0x54f4b8
push esi
call fcn.00522401
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x120], eax
jne 0x52269a
push dword [ebp + 0xc]
push dword [ebp - 0x118]
push esi
push str.:1:gzUnpackFile___s_____s____d__FAILED:_gzopen___FAILED.
call fcn.0042bd38
add esp, 0x10
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005317e7
leave
ret
push dword [ebp - 0x118]
mov edi, 0x104
mov ecx, edi
lea eax, [ebp - 0x114]
call fcn.004ccc3f
pop ecx
mov esi, eax
call fcn.004cd889
mov edx, esi
call fcn.004ccc0d
test eax, eax
jne 0x5226f5
mov eax, esi
push eax
call fcn.00530f70
pop ecx
mov ecx, esi
dec ecx
cmp byte [eax + ecx], 0x5c
jne 0x5226f5
push dword [ebp - 0x11c]
mov ecx, edi
mov eax, esi
call fcn.004ccc3f
pop ecx
push dword [ebp - 0x118]
call fcn.004cd324
pop ecx
jmp 0x52270d
push dword [ebp - 0x11c]
lea eax, [ebp - 0x114]
push eax
call fcn.005318fe
test eax, eax
pop ecx
pop ecx
jne 0x522718
lea esi, [ebp - 0x114]
call fcn.004cd457
cmp dword [ebp + 0xc], ebx
je 0x52273d
lea edi, [ebp - 0x114]
call fcn.00432263
test eax, eax
je 0x52273d
push dword [ebp - 0x120]
call fcn.0052248c
pop ecx
jmp 0x522689
cmp dword [ebp + 0x10], ebx
mov esi, 0x54f4bc
jne 0x52274c
mov esi, 0x54f4b4
push 0x169
push str..zLib.c
mov edx, esi
lea ecx, [ebp - 0x114]
call fcn.00434df1
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x12c], eax
jne 0x52278e
push esi
push dword [ebp + 0xc]
push dword [ebp - 0x118]
push dword [ebp - 0x11c]
push str.:1:gzUnpackFile___s_____s____d__FAILED:_fopen___s___FAILED.
call fcn.0042bd38
add esp, 0x14
jmp 0x52272c
push 0x100002
call fcn.00532823
mov edi, eax
cmp edi, ebx
pop ecx
mov dword [ebp - 0x124], ebx
mov dword [ebp - 0x128], ebx
je 0x522826
push 0x100000
push edi
push dword [ebp - 0x120]
call fcn.00522430
mov esi, eax
add esp, 0xc
cmp esi, ebx
jle 0x52281d
push dword [ebp - 0x12c]
add dword [ebp - 0x128], esi
push 1
push esi
push edi
call fcn.00531aad
add esp, 0x10
cmp eax, ebx
jg 0x5227ab
mov ecx, dword [0x710a44]
inc dword [0x710a44]
cmp ecx, 0xa
jae 0x522815
push str._GetLastError_
push esi
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x118]
push dword [ebp - 0x11c]
push str.:4:gzUnpackFile___s_____s____d__FAILED:_WriteFile___FAILED:_Could_only_write__ld_of__ld_bytes:__s
call fcn.0042b70b
add esp, 0x1c
inc dword [ebp - 0x124]
jmp 0x5227ab
push edi
call fcn.0053061e
pop ecx
jmp 0x52284c
push dword [ebp + 0xc]
mov dword [ebp - 0x124], 1
push dword [ebp - 0x118]
push dword [ebp - 0x11c]
push str.:4:gzUnpackFile___s_____s____d__FAILED:_Out_of_memory.
call fcn.0042b70b
add esp, 0x10
mov ecx, dword [ebp - 0x12c]
call fcn.00435239
push dword [ebp - 0x120]
call fcn.0052248c
cmp dword [ebp - 0x130], ebx
pop ecx
je 0x52288f
push ebx
push ebx
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x138]
lea ecx, [ebp - 0x140]
call fcn.00432c0b
add esp, 0x10
cmp dword [ebp - 0x128], ebx
je 0x522689
cmp dword [ebp - 0x124], ebx
jne 0x522689
xor eax, eax
inc eax
jmp 0x52268b