Function at 0x40b958
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x41b8b9
call fcn.0040f3e4
push ecx
mov eax, 0x1244
call fcn.0040f850
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x24], esi
push 0x41ea50
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 3
call dword [sym.imp.mfc140u.dll_Ordinal_1663]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
pop ecx
xor edi, edi
mov dword [ebp - 0x1c], eax
pop ecx
test eax, eax
jne 0x40b9ef
push edi
mov ecx, 0x451c90
call dword [sym.imp.mfc140u.dll_Ordinal_1663]
push eax
push 0x423240
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp + 0x10]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp + 0x14]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp + 0x20]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x1c
cmp dword [esi + 0x101c], edi
jne 0x40ba19
push dword [ebp + 0x18]
mov ecx, esi
call fcn.0040bdff
test eax, eax
jne 0x40ba19
push edi
mov ecx, 0x451c90
call dword [sym.imp.mfc140u.dll_Ordinal_1663]
push eax
push str.init_network_error.
jmp 0x40b9b1
cmp dword [ebp + 0x1c], edi
je 0x40ba28
push dword [ebp + 0x1c]
mov ecx, esi
call fcn.0040c10e
mov ecx, esi
call fcn.0040b829
push ecx
lea eax, [ebp + 0x10]
mov ecx, esp
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__3]
mov ecx, esi
call fcn.0040bf76
cmp byte [esi + 0x1024], 0
mov eax, 0x80000002
push edi
push edi
push 2
pop ecx
cmove eax, ecx
mov byte [ebp - 4], 4
mov ecx, dword [esi + 0x101c]
push eax
push 1
push dword [ebp + 8]
call sub.mfc140u.dll_CInternetSession::OpenURL
mov ebx, eax
mov dword [ebp - 4], 3
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x28], ebx
push eax
call fcn.0040bd98
test ebx, ebx
je 0x40bc91
mov byte [ebp - 4], 6
mov dword [ebp + 0x1c], edi
mov eax, dword [ebx]
lea ecx, [ebp - 0x1254]
push 0xfff
push ecx
mov ecx, ebx
call dword [eax + 0x40]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40bc70
push dword [ebp - 0x1c]
push 1
push eax
lea eax, [ebp - 0x1254]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov eax, dword [ebp - 0x14]
add esp, 0x10
add dword [ebp + 0x1c], eax
lea eax, [ebp - 0x54]
push eax
call fcn.0040bd98
lea ecx, [ebp - 0x3c]
push ecx
lea ecx, [ebp - 0x48]
push ecx
mov ecx, eax
call fcn.0040b6a2
lea ecx, [ebp - 0x48]
call fcn.0040bdb7
fstp qword [ebp - 0x18]
movsd xmm2, qword [ebp - 0x18]
comisd xmm2, xmmword [0x423370]
jbe 0x40bbff
mov ecx, dword [ebp + 0x1c]
mov eax, ecx
movsd xmm3, qword [0x423380]
shr eax, 0x1f
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x4233b0]
mulsd xmm1, xmm3
movsd qword [ebp - 0x18], xmm1
movaps xmm0, xmm1
divsd xmm0, xmm2
movsd qword [esi + 0x1058], xmm0
cmp ecx, 0x100000
jae 0x40bb9d
lea ecx, [ebp + 0x18]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
movsd xmm0, qword [esi + 0x1058]
lea eax, [ebp + 0x18]
sub esp, 0x10
mov byte [ebp - 4], 7
movsd qword [esp + 8], xmm0
movsd xmm0, qword [ebp - 0x18]
movsd qword [esp], xmm0
push dword [ebp + 0x20]
push str._s..___Read__0.01f_KBytes___0.1f_KB_s_
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__8]
add esp, 0x1c
lea eax, [ebp + 0x18]
push dword [ebp + 0x1c]
push ecx
mov ecx, esp
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__3]
mov ecx, esi
call fcn.0040c00e
lea ecx, [ebp + 0x18]
jmp 0x40bc5d
mulsd xmm1, xmm3
lea ecx, [ebp + 8]
movsd qword [ebp - 0x18], xmm1
call dword [sym.imp.mfc140u.dll_Ordinal_296]
movsd xmm0, qword [esi + 0x1058]
lea eax, [ebp + 8]
sub esp, 0x10
mov byte [ebp - 4], 8
movsd qword [esp + 8], xmm0
movsd xmm0, qword [ebp - 0x18]
movsd qword [esp], xmm0
push dword [ebp + 0x20]
push str._s..___Read__0.01f_MBytes___0.1f_KB_s_
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__8]
add esp, 0x1c
lea eax, [ebp + 8]
push dword [ebp + 0x1c]
push ecx
mov ecx, esp
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__3]
mov ecx, esi
call fcn.0040c00e
lea ecx, [ebp + 8]
jmp 0x40bc5d
lea ecx, [ebp - 0x20]
call dword [sym.imp.mfc140u.dll_Ordinal_296]
push dword [ebp + 0x1c]
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 9
push dword [ebp + 0x20]
push str._s..___Read__d_Bytes
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__8]
add esp, 0x10
lea eax, [ebp - 0x20]
push dword [ebp + 0x1c]
push ecx
mov ecx, esp
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__3]
mov ecx, esi
call fcn.0040c00e
mov eax, dword [ebp + 0x1c]
lea ecx, [ebp - 0x20]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4233b0]
movsd qword [esi + 0x1058], xmm0
mov byte [ebp - 4], 6
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
cmp dword [esi + 4], edi
je 0x40ba90
mov eax, dword [ebx]
mov ecx, ebx
mov dword [ebp - 4], 3
call dword [eax + 0x58]
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax + 4]
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
pop ecx
push ecx
lea eax, [ebp + 0x14]
mov ecx, esp
push eax
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__3]
mov ecx, esi
call fcn.0040bf76
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp + 0x10]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp + 0x14]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp + 0x20]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
xor eax, eax
inc eax
jmp 0x40b9de