Function at 0x401000
Capabilities:
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x40a0ed
mov eax, dword fs:[0]
push eax
mov eax, 0x4ccc
call fcn.00409cf0
mov eax, dword [0x41013c]
xor eax, esp
mov dword [esp + 0x4cc8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41013c]
xor eax, esp
push eax
lea eax, [esp + 0x4ce0]
mov dword fs:[0], eax
xor ebx, ebx
push 0x3ff
lea eax, [esp + 0x8e1]
push ebx
push eax
mov edi, ecx
mov byte [esp + 0x8e8], bl
call sub.MSVCR80.dll_memset
mov esi, dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0xc
push edi
lea ecx, [esp + 0x8e0]
push str.http:___s_MSangoArea.cfg
push ecx
call esi
add esp, 0xc
push 0x3fff
lea edx, [esp + 0xce1]
push ebx
push edx
mov dword [esp + 0x20], ebx
mov byte [esp + 0xce8], bl
call sub.MSVCR80.dll_memset
add esp, 0xc
lea eax, [esp + 0x44]
push eax
call fcn.004014b0
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0xce0]
push edx
lea edx, [esp + 0x8e4]
lea ecx, [esp + 0x4c]
mov dword [esp + 0x4cf0], ebx
call fcn.00401590
test eax, eax
je 0x401112
cmp dword [esp + 0xcdc], 0x23509490
jne 0x401112
push 0x40e9d4
push str.._MSangoArea.cfg
call dword [sym.imp.MSVCR80.dll_fopen]
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x401112
mov eax, dword [esp + 0x14]
push ebp
push 1
push eax
lea ecx, [esp + 0xce8]
push ecx
call dword [sym.imp.MSVCR80.dll_fwrite]
push ebp
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 0x14
push 0x3ff
lea edx, [esp + 0x4e1]
push ebx
push edx
mov byte [esp + 0x4e8], bl
call sub.MSVCR80.dll_memset
add esp, 0xc
push edi
lea eax, [esp + 0x4e0]
push str.http:___s_AutoUpdate.atp
push eax
call esi
add esp, 0xc
lea ecx, [esp + 0x14]
xor eax, eax
push ecx
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x4e4]
lea ecx, [esp + 0x4c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], 0x20
call fcn.00401590
test eax, eax
jne 0x401184
lea eax, [esp + 0x44]
push eax
jmp 0x4013c2
push 0x3ff
lea ecx, [esp + 0xe1]
push ebx
push ecx
mov byte [esp + 0xe8], bl
call sub.MSVCR80.dll_memset
add esp, 0xc
lea edx, [esp + 0xdc]
push str.._AutoUpdate.bin
push edx
call esi
add esp, 8
push 0x80
lea eax, [esp + 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
push ebx
push 3
push ebx
push ebx
push connect
lea ecx, [esp + 0xf4]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4012ef
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call fcn.00409410
add esp, 4
push ebx
lea edx, [esp + 0x20]
push edx
mov ebp, eax
push esi
push ebp
push edi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401224
cmp dword [esp + 0x1c], esi
jge 0x4012df
lea ecx, [esp + 0x84]
call fcn.00406640
push esi
push ebp
lea ecx, [esp + 0x8c]
call fcn.00406e70
mov ecx, 0x10
lea edx, [esp + 0x24]
mov esi, dword [eax]
cmp esi, dword [edx]
jne 0x40125f
sub ecx, 4
add edx, 4
add eax, 4
cmp ecx, 4
jae 0x401247
cmp ecx, ebx
je 0x4012c4
movzx ebp, byte [edx]
movzx esi, byte [eax]
sub esi, ebp
jne 0x4012ae
sub ecx, 1
add edx, 1
add eax, 1
cmp ecx, ebx
je 0x4012c0
movzx ebp, byte [edx]
movzx esi, byte [eax]
sub esi, ebp
jne 0x4012ae
sub ecx, 1
add edx, 1
add eax, 1
cmp ecx, ebx
je 0x4012c0
movzx ebp, byte [edx]
movzx esi, byte [eax]
sub esi, ebp
jne 0x4012ae
sub ecx, 1
add edx, 1
add eax, 1
cmp ecx, ebx
je 0x4012c0
movzx ecx, byte [edx]
movzx esi, byte [eax]
sub esi, ecx
je 0x4012c0
cmp esi, ebx
mov ebp, dword [esp + 0x14]
mov eax, 1
jg 0x4012c6
or eax, 0xffffffff
jmp 0x4012c6
mov ebp, dword [esp + 0x14]
xor eax, eax
cmp eax, ebx
jne 0x4012df
push ebp
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4013bd
push ebp
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x34]
add eax, 0x20
push eax
mov dword [esp + 0x18], eax
call fcn.00409410
mov ebp, eax
add esp, 4
lea eax, [esp + 0x14]
push eax
push ebp
lea edx, [esp + 0x4e4]
lea ecx, [esp + 0x4c]
call fcn.00401590
test eax, eax
je 0x4013b4
mov ecx, dword [esp + 0x38]
push ecx
call fcn.00409410
mov edx, dword [esp + 0x3c]
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x34]
push eax
lea ecx, [ebp + 0x20]
mov dword [esp + 0x1c], edx
push ecx
lea edx, [esp + 0x20]
push edx
push edi
call fcn.00401ce0
add esp, 0x10
test eax, eax
je 0x4013ab
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x38]
jne 0x4013ab
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
lea ecx, [esp + 0xf4]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4013ab
mov eax, dword [esp + 0x18]
push ebx
lea edx, [esp + 0x24]
push edx
push eax
push edi
push esi
mov dword [esp + 0x34], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [esp + 0x3c]
push ecx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
push ebp
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
lea edx, [esp + 0x44]
push edx
mov dword [esp + 0x4cec], 0xffffffff
call fcn.00401520
mov ecx, dword [esp + 0x4ce0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4cc8]
xor ecx, esp
call fcn.00409415
add esp, 0x4cd8
ret