Function at 0x424420
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b1bf0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x62c140]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp edi, ebx
je 0x4248c6
push str.Inside_ProcessDownloadedBuffer_n
call fcn.0043d390
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x38]
add esp, 4
cmp eax, ebx
jne 0x424498
push str.File_Handle_is_NULL_n
call fcn.0043d500
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp eax, 0xffffffff
jne 0x4244c4
push str.Invalid_File_Handle_n
call fcn.0043d500
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 0xc]
push ebx
lea ecx, [ebp - 0x1c]
push ecx
push edi
push edx
push eax
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x42451c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push str.ProcessDownloadedBuffer_:__Error_in_WriteFile______lu__n
call fcn.0043d500
mov eax, dword [esi + 0x38]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [esi + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
add dword [esi + 0x50], edi
push str.File_updated_with_data._n
adc dword [esi + 0x54], ebx
call fcn.0043d390
mov edx, dword [esi + 0x38]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp byte [esi + 0x60], bl
jne 0x4248c6
mov eax, dword [0x62d034]
mov edx, dword [eax + 0xc]
mov ecx, 0x62d034
call edx
add eax, 0x10
mov dword [ebp + 0xc], eax
push str.SoftwareAdventNetDesktopCentralDCDistributionServer
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.004027b0
mov edx, str.FileMetaData_
lea eax, [ebp + 0xc]
call fcn.004027f0
mov ecx, dword [esi + 0x20]
mov eax, dword [ecx - 0xc]
push ecx
lea ebx, [ebp + 0xc]
call fcn.00402b60
mov edi, dword [ebp + 0xc]
cmp dword [edi - 4], 1
jle 0x42459b
mov eax, dword [edi - 0xc]
push eax
mov ecx, ebx
call fcn.004028c0
mov edi, dword [ebp + 0xc]
call fcn.00412120
xor ebx, ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov byte [ebp - 4], 2
cmp dword [edi - 4], 1
jle 0x4245c4
mov ecx, dword [edi - 0xc]
push ecx
lea ecx, [ebp + 0xc]
call fcn.004028c0
mov edi, dword [ebp + 0xc]
lea edx, [ebp - 0x3c]
push edx
mov eax, edi
call fcn.0040d4a0
cmp eax, ebx
jne 0x4248dc
mov ebx, dword [esi + 0x40]
add ebx, dword [esi + 0x50]
mov edi, dword [esi + 0x44]
adc edi, dword [esi + 0x54]
mov ecx, dword [ebp - 0x3c]
push 8
lea eax, [ebp - 0x28]
push eax
push 0xb
push 0
push str.PartialFileSize
push ecx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push edi
push ebx
push str.updated_registry_entries___llu__n
call fcn.0043d390
mov esi, dword [esi + 0x18]
add esp, 0xc
push str.LastModifiedTime
lea edx, [ebp - 0x3c]
push edx
call fcn.004145b0
push str.SoftwareAdventNetDesktopCentralDCDistributionServer
lea ecx, [ebp - 0x14]
call fcn.004026e0
mov edx, str.FileMetaData_
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.004027f0
lea ecx, [ebp - 0x14]
call fcn.00402830
lea ecx, [ebp - 0x18]
push ecx
push str.TempFileIdentifier
call fcn.004128e0
mov esi, dword [ebp - 0x18]
add esp, 8
test eax, eax
jne 0x424678
test esi, esi
je 0x424685
push str.TempFileIdentifier
lea edx, [ebp - 0x3c]
push edx
call fcn.004145b0
test esi, esi
je 0x424685
push esi
call fcn.0057f05b
add esp, 4
call fcn.00412da0
lea ecx, [ebp - 0x18]
push ecx
push eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], 0
call fcn.00411f90
mov esi, dword [ebp - 0x18]
add esp, 8
push str.LastRetryTime
lea edx, [ebp - 0x3c]
push edx
call fcn.004145b0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4246c2
push eax
call fcn.0057f05b
add esp, 4
test esi, esi
je 0x4246cf
push esi
call fcn.0057f05b
add esp, 4
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x68]
mov ecx, dword [esi + 0x6c]
mov dword [ebp - 0x28], eax
or eax, ecx
mov dword [ebp - 0x24], ecx
jne 0x424786
mov eax, dword [0x6349bc]
mov edi, dword [eax]
mov dword [ebp - 0x18], edi
cmp edi, dword [0x6349bc]
je 0x424783
mov eax, dword [edi + 0x10]
sub eax, 0x10
push eax
call fcn.00402a30
add eax, 0x10
add esp, 4
mov dword [ebp + 8], eax
mov byte [ebp - 4], 4
cmp dword [0x634778], 0
je 0x424814
mov ecx, dword [0x6346f4]
push 0x5e72e8
push ecx
call fcn.0058021f
add esp, 8
test eax, eax
jne 0x424746
cmp dword [0x63477c], eax
je 0x424814
lea ecx, [esi + 0x24]
call fcn.00402830
lea ecx, [ebp + 8]
mov ebx, eax
call fcn.00402830
push ebx
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x424853
mov edx, dword [edi + 0x18]
mov eax, dword [edi + 0x1c]
lea ecx, [ebp + 8]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 3
call fcn.00402790
mov ebx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
mov dword [0x6347a0], eax
or eax, ecx
mov dword [0x6347a4], ecx
je 0x4247ba
push 0
push 0x64
push edi
push ebx
call fcn.0058a000
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x28]
push ecx
push edx
push eax
call fcn.00596000
mov dword [0x634798], eax
cmp byte [ebp + 0x10], 0
jne 0x424872
mov edx, dword [esi + 0x2c]
mov eax, dword [esi + 0x18]
push edx
push eax
push edi
push ebx
push str.updated_registry_entries_size___llu_and_last_modified_time__S_retry_time__d_n
call fcn.0043d7e0
inc dword [esi + 0x2c]
mov eax, dword [esi + 0x2c]
mov ebx, dword [ebp - 0x3c]
add esp, 0x14
push 4
lea ecx, [ebp + 0x10]
push ecx
push 4
push 0
push str.RetryCount
push ebx
mov dword [ebp + 0x10], eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push str.downloadInProgress
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov edx, dword [esi + 0x2c]
mov dword [0x63479c], edx
jmp 0x424875
lea ecx, [ebp + 8]
call fcn.00402830
lea ecx, [esi + 0x24]
mov dword [ebp - 0x20], eax
call fcn.00402830
mov ecx, dword [ebp - 0x20]
push ecx
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x424856
mov edx, dword [edi + 0x18]
mov eax, dword [edi + 0x1c]
lea ecx, [ebp + 8]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 3
call fcn.00402790
jmp 0x424783
mov ebx, dword [ebp - 0x30]
lea ecx, [ebp + 8]
mov byte [ebp - 4], 3
call fcn.00402790
lea eax, [ebp - 0x18]
call fcn.00427970
mov edi, dword [ebp - 0x18]
jmp 0x4246f0
mov ebx, dword [ebp - 0x3c]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x424898
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp + 0xc]
test ebx, ebx
je 0x4248a6
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4248c6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0xc
mov ebx, dword [ebp - 0x3c]
jmp 0x42489b