Function at 0x405ea0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40c116
push eax
mov dword fs:[0], esp
sub esp, 0x4f4
xor eax, eax
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov edi, 0x411110
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x405f11
mov edi, 0x411110
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp + 0xb94]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 0xb90], 0
mov dword [ebp + 0x1b80], 1
jmp 0x406121
mov ecx, ebp
call fcn.00405d80
mov edx, eax
cmp edx, 1
jle 0x405f9a
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x11c]
lea esi, [ebp + 0x23290]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
push edx
push esi
lea ecx, [esp + 0x124]
push str._supdate__d.dat
push ecx
call edi
lea edx, [esp + 0x12c]
push 0
push edx
call dword [sym.imp.MSVCRT.dll__access]
add esp, 0x18
test eax, eax
jne 0x405f8b
lea edi, [esp + 0x11c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x18]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x405fb4
push esi
lea ecx, [esp + 0x1c]
push str._supdate.dat
push ecx
call edi
jmp 0x405fb1
lea edx, [ebp + 0x23290]
lea eax, [esp + 0x18]
push edx
push str._supdate.dat
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x18]
push 0x4107f8
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x10], esi
jne 0x40602c
lea ecx, [esp + 0x10]
mov byte [ebp + 0x23284], 1
call sub.MFC42.DLL_CString::CString_1
push 0x71
lea ecx, [esp + 0x14]
mov dword [esp + 0x510], esi
call sub.MFC42.DLL_CString::LoadStringA
mov edx, dword [esp + 0x10]
push esi
push esi
push edx
call sub.MFC42.DLL_AfxMessageBox
push str.GetWebVersion__
push str.CUpdateThread
push 0x14
call fcn.0040ab80
add esp, 0xc
lea ecx, [esp + 0x10]
mov dword [esp + 0x50c], 0xffffffff
call sub.MFC42.DLL_CString::CString
jmp 0x4063bf
test byte [esi + 0xc], 0x10
jne 0x406117
lea ebx, [ebp + 0xb94]
mov ecx, 0x7d
xor eax, eax
lea edi, [esp + 0x11c]
push esi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x120]
push 0x1f4
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x406117
mov esi, 0x4101fc
lea eax, [esp + 0x11c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40609b
test cl, cl
je 0x406097
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40609b
add eax, 2
add esi, 2
test cl, cl
jne 0x406077
xor eax, eax
jmp 0x4060a0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x406107
mov esi, 0x4107e8
lea eax, [esp + 0x11c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4060d4
test cl, cl
je 0x4060d0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4060d4
add eax, 2
add esi, 2
test cl, cl
jne 0x4060b0
xor eax, eax
jmp 0x4060d9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x406107
push ebx
lea eax, [esp + 0x120]
push 0x410444
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
mov eax, dword [ebp + 0x1b80]
add esp, 0xc
add ebx, 0xcc
inc eax
mov dword [ebp + 0x1b80], eax
mov ecx, dword [esp + 0x10]
mov esi, ecx
test byte [ecx + 0xc], 0x10
je 0x40603c
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, dword [ebp + 0x1b80]
test eax, eax
jne 0x406157
push 0
push 0
push 0x4108bc
call sub.MFC42.DLL_AfxMessageBox
lea edx, [esp + 0x18]
push edx
push str.GetWebVersion_____s_
push str.CUpdateThread
push 0x14
call fcn.0040ab80
add esp, 0x10
jmp 0x4063bf
lea esi, [ebp + 0x6c]
mov ecx, esi
mov dword [esp + 0x10], esi
call fcn.00402290
test eax, eax
jl 0x4063bf
call dword [sym.imp.MSVCRT.dll_rand]
mov ecx, dword [ebp + 0x1b80]
xor edx, edx
div ecx
xor eax, eax
test ecx, ecx
mov dword [esp + 0x14], eax
mov dword [ebp + 0x23398], edx
jle 0x4063b0
mov eax, dword [ebp + 0x23398]
cdq
idiv ecx
mov ebx, edx
mov eax, ebx
shl eax, 4
add eax, ebx
lea eax, [eax + eax*2]
mov ecx, dword [ebp + eax*4 + 0xb90]
lea eax, [ebp + eax*4]
test ecx, ecx
jne 0x406384
mov dword [eax + 0xb90], 1
lea edi, [eax + 0xb94]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x310]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x310]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._files.dat
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp + 0x230c4]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x32
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, 0x410884
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
lea esi, [ebp + 0x23290]
push esi
lea ecx, [esp + 0x1c]
push str._sfiles.dat
push ecx
call edi
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.MSVCRT.dll__unlink]
lea eax, [esp + 0x28]
push 0x410880
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x18
mov dword [ebp + 0x23280], eax
test eax, eax
je 0x4063db
lea ecx, [esp + 0x310]
push ecx
mov ecx, dword [esp + 0x14]
call fcn.004022a0
mov ecx, dword [esp + 0x10]
call fcn.004023b0
test eax, eax
jge 0x4062f4
mov ecx, dword [esp + 0x10]
call fcn.004023b0
test eax, eax
jge 0x4062f4
mov eax, dword [ebp + 0x23398]
mov ebx, dword [esp + 0x14]
lea edx, [esp + 0x310]
inc eax
push edx
push str.GetWebVersion_ConnectHost
inc ebx
push str.CUpdateThread
push 0x14
mov dword [ebp + 0x23398], eax
mov dword [esp + 0x24], ebx
call fcn.0040ab80
add esp, 0x10
jmp 0x40639a
mov ecx, dword [esp + 0x10]
push 0
call fcn.004023f0
test eax, eax
jge 0x406447
cmp eax, 0xfffffff6
jne 0x406368
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x186a0
idiv ecx
push edx
push esi
lea edx, [esp + 0x124]
push str._serrorHead_d.dat
push edx
call edi
lea eax, [esp + 0x12c]
push 0x410544
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x18
test esi, esi
je 0x406368
mov ecx, dword [ebp + 0xb84]
push esi
push 1
lea edx, [ebp + 0x76c]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
lea eax, [esp + 0x310]
push eax
push str.GetWebVersion_GetWebFile
push str.CUpdateThread
push 0x14
call fcn.0040ab80
add esp, 0x10
mov ecx, dword [ebp + 0x23398]
mov eax, dword [esp + 0x14]
inc ecx
inc eax
mov dword [ebp + 0x23398], ecx
mov dword [esp + 0x14], eax
mov ecx, dword [ebp + 0x1b80]
mov eax, dword [esp + 0x14]
cmp eax, ecx
jl 0x406191
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 0x1b80]
cmp eax, ecx
mov ecx, esi
call fcn.00402280
or eax, 0xffffffff
mov ecx, dword [esp + 0x504]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x500
ret
lea ecx, [esp + 0x10]
mov byte [ebp + 0x23284], 1
call sub.MFC42.DLL_CString::CString_1
add ebp, 0x230c4
lea ecx, [esp + 0x10]
push ebp
push 0x6a
push ecx
mov dword [esp + 0x518], 1
call sub.MFC42.DLL_CString::Format_1
mov edx, dword [esp + 0x1c]
add esp, 0xc
push 0
push 0
push edx
call sub.MFC42.DLL_AfxMessageBox
push 0x4107fc
push str.CUpdateThread
push 0x14
call fcn.0040ab80
add esp, 0xc
lea ecx, [esp + 0x10]
mov dword [esp + 0x50c], 0xffffffff
call sub.MFC42.DLL_CString::CString
jmp 0x4063bf
mov eax, dword [ebp + 0x23280]
mov dword [ebp + 0x23398], ebx
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [ebp + 0x23280], 0
xor eax, eax
jmp 0x4063c2