Function at 0x4a3f90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e7ef6
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x53d9f8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
test edi, edi
je 0x4a4253
mov ecx, dword [esi + 0x678]
test ecx, ecx
je 0x4a4253
mov eax, dword [esi + 0x670]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0x674]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0x68c]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x48]
push eax
lea eax, [esi + 0x62c]
mov dword [ebp - 0x58], 0
push eax
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov byte [ebp - 0x2c], cl
call fcn.004501d0
add esi, 0x21c
mov dword [ebp - 0x18], 0
mov ecx, esi
mov dword [ebp - 0x14], 7
add esp, 8
xor eax, eax
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a4060
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.004033b0
push 4
push str..dt_
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.00403230
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00478110
add esp, 8
cmp dword [ebp - 0x60], 0
mov byte [ebp - 4], 1
jne 0x4a40d6
push str.Get_dtFile_Md5_Failed.
push str.kupdate::KHttpDownload::SaveStateToCfg
push 0x3d9
push str.H:_rc_v12_i18n_20231201_branchCoding_supportwpsupdateUpdateClient_srcwebhttpdownload.cpp
push 0
call fcn.00412750
add esp, 0x14
xor edi, edi
jmp 0x4a420b
cmp dword [ebp - 0x5c], 8
lea ecx, [ebp - 0x58]
lea eax, [ebp - 0x70]
cmovae eax, dword [ebp - 0x70]
push ecx
push eax
call fcn.004501d0
add esp, 8
lea ecx, [ebp - 0x88]
push edi
call fcn.00404c50
cmp dword [ebp - 0x74], 8
lea eax, [ebp - 0x88]
push 0
cmovae eax, dword [ebp - 0x88]
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x94], esi
mov byte [ebp - 4], 3
test esi, esi
je 0x4a41bb
cmp esi, 0xffffffff
je 0x4a41bb
push 0x2d
lea eax, [ebp - 0x58]
push eax
push 0
call fcn.004a4930
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
add esp, 0xc
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x8c], 0
push 0
push eax
push 0x2d
lea eax, [ebp - 0x58]
push eax
push esi
call edi
test eax, eax
je 0x4a419d
push 0
lea eax, [ebp - 0x8c]
push eax
push 4
lea eax, [ebp - 0x90]
push eax
push esi
call edi
test eax, eax
je 0x4a419d
mov edi, 1
jmp 0x4a41f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4a41af
movzx eax, ax
or eax, 0x80070000
mov ecx, 0x3ee
mov edx, str.Failed_WriteFile:_0x_08x.
jmp 0x4a41d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4a41cd
movzx eax, ax
or eax, 0x80070000
mov ecx, 0x3e3
mov edx, str.Failed_CreateFile
push eax
push edx
push str.kupdate::KHttpDownload::SaveStateToCfg
push ecx
push str.H:_rc_v12_i18n_20231201_branchCoding_supportwpsupdateUpdateClient_srcwebhttpdownload.cpp
push 0
call fcn.00412750
add esp, 0x18
xor edi, edi
test esi, esi
je 0x4a4200
cmp esi, 0xffffffff
je 0x4a4200
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x88]
call fcn.00402d80
lea ecx, [ebp - 0x70]
call fcn.00402d80
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4a424f
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4a4245
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4a4245
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004bee2d
add esp, 8
mov eax, edi
jmp 0x4a4255
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bee49
mov esp, ebp
pop ebp
ret 4