Function at 0x41da10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d36d8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x511070]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
test edx, edx
jne 0x41da46
xor ecx, ecx
jmp 0x41da5f
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41da50
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x18]
call fcn.0041ccd0
mov edx, dword [esi + 0x18]
mov ecx, dword [edx - 0xc]
test ecx, ecx
je 0x41daa1
lea eax, [ecx - 1]
test eax, eax
js 0x41db55
cmp eax, ecx
jg 0x41db55
movzx eax, word [edx + eax*2]
cmp eax, 0x5c
je 0x41daa1
cmp eax, 0x2f
je 0x41daa1
push str.0s
lea ecx, [esi + 0x18]
call fcn.0041c190
mov ecx, dword [esi + 0x18]
call fcn.00489ee0
mov edi, dword [esi + 0x24]
mov edi, dword [edi]
cmp edi, dword [esi + 0x24]
je 0x41dcae
nop word [eax + eax]
cmp dword [esi + 0x30], 0
jne 0x41dce4
mov ebx, dword [edi + 8]
mov dword [ebp - 0x1c], ebx
cmp dword [ebx + 4], 0
jne 0x41dcce
call fcn.0041bed0
test eax, eax
je 0x41dcc4
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 4], 0
push eax
mov ecx, ebx
call fcn.0041ce40
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
push ecx
lea ecx, [ebp - 0x14]
push ecx
push dword [eax]
mov ecx, esi
call fcn.0041f350
test eax, eax
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x20]
sete byte [ebp + 0xf]
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41db40
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp + 0xf], 0
mov esi, dword [ebp - 0x14]
jne 0x41dc3c
test esi, esi
jne 0x41db5f
xor eax, eax
jmp 0x41db73
push 0x80070057
call fcn.0041cdf0
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41db64
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebx + 0xc]
call fcn.0041ccd0
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebx + 0x24]
push 0
mov dword [ebp - 0x18], eax
sub ebx, dword [ecx + 0x20]
lea ecx, [ebp + 0xc]
push ecx
push ebx
push eax
push dword [ebp - 0x10]
mov dword [ebp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41dbd7
nop dword [eax + eax]
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp + 0xc]
mov dword [ebp - 0x18], ecx
sub ebx, dword [ebp + 0xc]
je 0x41dc78
push 0
lea eax, [ebp + 0xc]
push eax
push ebx
push ecx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41dbb0
mov eax, dword [0x51544c]
mov edi, dword [eax]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x51544c]
push eax
push 0x79
call dword [edi + 0x20]
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp + 8]
push eax
call fcn.0041ce70
mov byte [ebp - 4], 2
push dword [eax]
push str.C7zExtractImpl::ExtractMemoryFiles_SaveToFile_error_ws
push 0x515488
call fcn.0048cf90
mov byte [ebp - 4], 0
add esp, 0xc
mov edx, dword [ebp + 8]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41dc33
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x41dd05
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x41dca0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp + 8]
mov edi, dword [edi]
cmp edi, dword [esi + 0x24]
jne 0x41dac0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.0041cdf0
mov ecx, dword [0x51544c]
push 2
push 0x78
mov eax, dword [ecx]
call dword [eax + 0x20]
push str.C7zExtractImpl::ExtractMemoryFiles
jmp 0x41dcf8
mov ecx, dword [0x51544c]
push 1
push 0x78
mov eax, dword [ecx]
call dword [eax + 0x20]
push str.ExtractMemoryFiles_ExitByCancelInstall
push 0x515488
call fcn.0048cf90
add esp, 8
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8