Function at 0x51f720
Capabilities:
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a1964
mov eax, dword fs:[0]
push eax
mov eax, 0x102b0
call fcn.005604e0
mov eax, dword [0x60a070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 8], 0
mov edi, dword [ebp + 8]
je 0x51f852
test edi, edi
jne 0x51f768
lea edi, [esi + 0x34]
push edi
call fcn.00520040
test al, al
jne 0x51f859
cmp dword [esi + 0x244], 0
je 0x51f7a6
lea ecx, [ebp - 0x102a0]
call fcn.00503250
mov edx, eax
mov dword [ebp - 4], 0
cmp dword [edx + 0x14], 8
jb 0x51f79b
mov edx, dword [edx]
mov eax, dword [esi + 0x244]
jmp 0x51f82b
cmp dword [0x615408], 0
je 0x51f801
lea ecx, [ebp - 0x102a0]
call fcn.00503250
mov dword [ebp - 4], 1
cmp dword [eax + 0x14], 8
jb 0x51f7c9
mov eax, dword [eax]
push eax
push edi
push str.Failed_to_create_destinationFolder__s.___s
push 0x5c0ec0
push 0x5c0ec0
push str.UnzipHandler
push str.OOBEUtils
push 0x32
call dword [0x615408]
add esp, 0x20
lea ecx, [ebp - 0x102a0]
call fcn.004137d0
xor al, al
jmp 0x51fe73
cmp dword [0x61540c], 0
je 0x51f852
lea ecx, [ebp - 0x102a0]
call fcn.00503250
mov edx, eax
mov dword [ebp - 4], 2
cmp dword [edx + 0x14], 8
jb 0x51f826
mov edx, dword [edx]
mov eax, dword [0x61540c]
mov ecx, dword [eax]
push edx
push edi
push str.Failed_to_create_destinationFolder__s.___s
push str.UnzipHandler
push 0x5c0ec0
push 0x32
push eax
call dword [ecx + 0x34]
add esp, 0x1c
lea ecx, [ebp - 0x102a0]
call fcn.004137d0
xor al, al
jmp 0x51fe73
lea eax, [ebp - 0x10284]
mov ecx, esi
push eax
call fcn.0051ff30
push edi
lea ecx, [ebp - 0x1002c]
call fcn.00413890
mov dword [ebp - 4], 3
mov ecx, dword [ebp - 0x1001c]
test ecx, ecx
je 0x51f8b0
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
cmovae eax, dword [ebp - 0x1002c]
cmp word [eax + ecx*2 - 2], 0x5c
je 0x51f8b0
push 0x5c0e8c
lea ecx, [ebp - 0x1002c]
call fcn.00413760
lea eax, [ebp - 0x10284]
push eax
lea ecx, [ebp - 0x102a0]
call fcn.00405500
push ecx
lea edx, [ebp - 0x102a0]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x10048]
call fcn.00508d80
add esp, 4
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x1028c]
cmp eax, 0x10
jb 0x51f8fd
inc eax
lea ecx, [ebp - 0x102a0]
push eax
push dword [ebp - 0x102a0]
call fcn.00408330
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x10048]
mov dword [ebp - 0x1028c], 0xf
push eax
lea ecx, [ebp - 0x1002c]
mov dword [ebp - 0x10290], 0
mov byte [ebp - 0x102a0], 0
call fcn.00414250
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
mov ebx, dword [ebp - 0x10058]
cmovae eax, dword [ebp - 0x1002c]
push eax
call fcn.0057d2e6
add esp, 4
mov edi, eax
push 0x5c
push edi
call fcn.005630bd
add esp, 8
mov byte [ebp - 0x10285], 0
test eax, eax
je 0x51f97c
xor ecx, ecx
mov word [eax], cx
mov ecx, esi
push edi
call fcn.00520040
mov byte [ebp - 0x10285], al
push edi
call fcn.00571f41
add esp, 4
cmp byte [ebp - 0x10285], 0
jne 0x51fa7a
cmp dword [esi + 0x244], 0
je 0x51f9c0
lea ecx, [ebp - 0x102b8]
call fcn.00503250
mov edi, eax
mov byte [ebp - 4], 7
cmp dword [edi + 0x14], 8
jb 0x51f9b4
mov edi, dword [edi]
mov ecx, dword [esi + 0x244]
push edi
jmp 0x51fa5b
cmp dword [0x615408], 0
je 0x51fa2e
lea ecx, [ebp - 0x102b8]
call fcn.00503250
mov ecx, eax
mov byte [ebp - 4], 8
cmp dword [ecx + 0x14], 8
jb 0x51f9e2
mov ecx, dword [ecx]
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
push ecx
cmovae eax, dword [ebp - 0x1002c]
push eax
push str.Failed_to_CreateFilePath:__s.__s
push 0x5c0ec0
push 0x5c0ec0
push str.UnzipHandler
push str.OOBEUtils
push 0x32
call dword [0x615408]
add esp, 0x20
lea ecx, [ebp - 0x102b8]
call fcn.004137d0
xor bl, bl
jmp 0x51fe18
cmp dword [0x61540c], 0
je 0x51fc64
lea ecx, [ebp - 0x102b8]
call fcn.00503250
mov esi, eax
mov byte [ebp - 4], 9
cmp dword [esi + 0x14], 8
jb 0x51fa54
mov esi, dword [esi]
mov ecx, dword [0x61540c]
push esi
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
cmovae eax, dword [ebp - 0x1002c]
push eax
push str.Failed_to_CreateFilePath:__s.__s
jmp 0x51fc44
mov cl, byte [ebp - 0x10054]
test cl, cl
je 0x51faaf
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
cmovae eax, dword [ebp - 0x1002c]
test ebx, ebx
je 0x51faaf
cmp ebx, 0xffffffff
je 0x51faaf
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
mov cl, byte [ebp - 0x10054]
cmp dword [ebp - 0x10034], 8
lea eax, [ebp - 0x10048]
lea edi, [esi + 0x18]
mov dword [esi + 0x1c], 0
cmovae eax, dword [ebp - 0x10048]
cmp dword [ebp - 0x10018], 8
mov dword [esi + 0x24], eax
lea eax, [ebp - 0x1002c]
cmovae eax, dword [ebp - 0x1002c]
mov dword [esi + 0x28], eax
xor eax, eax
test cl, cl
mov byte [esi + 0x2c], cl
push edi
setne al
lea eax, [eax*2 + 1]
mov dword [edi], eax
mov eax, dword [esi + 0x30]
call eax
add esp, 4
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
lea ecx, [eax - 1]
cmp ecx, 1
ja 0x51fb21
cmp eax, 2
jmp 0x51fe15
cmp byte [ebp - 0x10054], 0
je 0x51fb31
mov bl, 1
jmp 0x51fe18
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
push 0
cmovae eax, dword [ebp - 0x1002c]
push ebx
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x51fc6b
cmp dword [esi + 0x244], 0
je 0x51fb93
lea ecx, [ebp - 0x102b8]
call fcn.00503250
mov edi, eax
mov byte [ebp - 4], 0xa
cmp dword [edi + 0x14], 8
jb 0x51fb87
mov edi, dword [edi]
mov ecx, dword [esi + 0x244]
push edi
jmp 0x51fc2a
cmp dword [0x615408], 0
je 0x51fc01
lea ecx, [ebp - 0x102b8]
call fcn.00503250
mov ecx, eax
mov byte [ebp - 4], 0xb
cmp dword [ecx + 0x14], 8
jb 0x51fbb5
mov ecx, dword [ecx]
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
push ecx
cmovae eax, dword [ebp - 0x1002c]
push eax
push str.Cannot_open_file__s_for_writing:__s
push 0x5c0ec0
push 0x5c0ec0
push str.UnzipHandler
push str.OOBEUtils
push 0x32
call dword [0x615408]
add esp, 0x20
lea ecx, [ebp - 0x102b8]
call fcn.004137d0
xor bl, bl
jmp 0x51fe18
cmp dword [0x61540c], 0
je 0x51fc64
lea ecx, [ebp - 0x102b8]
call fcn.00503250
mov esi, eax
mov byte [ebp - 4], 0xc
cmp dword [esi + 0x14], 8
jb 0x51fc23
mov esi, dword [esi]
mov ecx, dword [0x61540c]
push esi
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
cmovae eax, dword [ebp - 0x1002c]
push eax
push str.Cannot_open_file__s_for_writing:__s
mov edx, dword [ecx]
push str.UnzipHandler
push 0x5c0ec0
push 0x32
push ecx
call dword [edx + 0x34]
add esp, 0x1c
lea ecx, [ebp - 0x102b8]
call fcn.004137d0
xor bl, bl
jmp 0x51fe18
push dword [esi + 0x240]
mov ecx, dword [esi + 8]
sub esp, 8
call fcn.0052c860
add esp, 0xc
test eax, eax
je 0x51fd25
mov edx, dword [esi + 0x244]
test edx, edx
jne 0x51fce8
mov ecx, dword [0x615408]
test ecx, ecx
je 0x51fcde
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
cmovae eax, dword [ebp - 0x1002c]
push eax
push str.Failed_to_unzOpenCurrentFilePassword:__s
push 0x5c0ec0
push 0x5c0ec0
push str.UnzipHandler
push str.OOBEUtils
push 0x32
call ecx
add esp, 0x1c
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor bl, bl
jmp 0x51fe18
mov edx, dword [0x61540c]
test edx, edx
je 0x51fd17
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
mov ecx, dword [edx]
cmovae eax, dword [ebp - 0x1002c]
push eax
push str.Failed_to_unzOpenCurrentFilePassword:__s
push str.UnzipHandler
push 0x5c0ec0
push 0x32
push edx
call dword [ecx + 0x34]
add esp, 0x18
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor bl, bl
jmp 0x51fe18
mov dword [edi], 2
nop dword [eax + eax]
push ecx
mov ecx, dword [esi + 8]
lea edx, [ebp - 0x10014]
call fcn.0052cb50
mov edi, eax
add esp, 4
test edi, edi
jle 0x51fd8a
push 0
lea eax, [ebp - 0x10030]
mov dword [ebp - 0x10030], edi
push eax
push edi
lea eax, [ebp - 0x10014]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x51fd87
mov eax, dword [ebp - 0x10030]
cmp eax, edi
jne 0x51fd87
mov dword [esi + 0x1c], eax
lea eax, [esi + 0x18]
push eax
mov eax, dword [esi + 0x30]
call eax
add esp, 4
test eax, eax
je 0x51fd30
or edi, 0xffffffff
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [esi + 8]
call fcn.0052ce10
test edi, edi
jne 0x51fdbd
cmp dword [ebp - 0x10018], 8
lea eax, [ebp - 0x1002c]
push dword [ebp - 0x1006c]
cmovae eax, dword [ebp - 0x1002c]
push eax
call fcn.005200f0
cmp dword [ebp - 0x10034], 8
lea eax, [ebp - 0x10048]
mov dword [esi + 0x18], 3
cmovae eax, dword [ebp - 0x10048]
cmp dword [ebp - 0x10018], 8
mov dword [esi + 0x24], eax
lea eax, [ebp - 0x1002c]
cmovae eax, dword [ebp - 0x1002c]
mov dword [esi + 0x28], eax
lea eax, [esi + 0x18]
push eax
mov eax, dword [esi + 0x30]
mov dword [esi + 0x1c], 0
call eax
add esp, 4
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
test edi, edi
sete bl
mov eax, dword [ebp - 0x10034]
cmp eax, 8
jb 0x51fe36
inc eax
lea ecx, [ebp - 0x10048]
push eax
push dword [ebp - 0x10048]
call fcn.00414580
mov ecx, dword [ebp - 0x10018]
xor eax, eax
mov dword [ebp - 0x10034], 7
mov dword [ebp - 0x10038], 0
mov word [ebp - 0x10048], ax
cmp ecx, 8
jb 0x51fe71
inc ecx
push ecx
push dword [ebp - 0x1002c]
lea ecx, [ebp - 0x1002c]
call fcn.00414580
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0055eeb4
mov esp, ebp
pop ebp
ret 0xc