Function at 0x404390
Capabilities:
Delete file
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, str.Fetching_patch_file...
push esi
push ebx
sub esp, 0x63c
call dword [sym.imp.libcurl.dll_curl_easy_init]
mov dword [0x40f468], eax
mov dword [esp + 4], edi
mov dword [esp], 5
call fcn.00403b80
mov dword [esp], 5
call fcn.00403770
mov dword [esp], 3
call fcn.00403770
test eax, eax
mov edx, eax
je 0x40442e
cmp eax, 9
je 0x40469f
jle 0x404414
cmp eax, 0x13
je 0x404755
jg 0x404696
cmp eax, 0xf
je 0x40441c
mov eax, dword [0x40f4f8]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00403a80
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [eax - 5]
cmp eax, 2
ja 0x4043f9
mov eax, dword [0x40f4f8]
mov dword [esp], 4
mov dword [esp + 4], eax
jmp 0x404405
mov eax, dword [0x40f460]
mov esi, str.Patch_file_fetched_successfully.
mov ebx, str.Updating...
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp + 4], esi
mov dword [esp], 0xa
call fcn.00403b80
mov dword [esp + 4], ebx
mov dword [esp], 0xa
call fcn.00403b80
mov dword [esp], str.fmsVer.sys
mov ecx, 0x40e276
mov dword [esp + 4], ecx
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x61c], eax
test eax, eax
je 0x404740
mov dword [esp], str.TEMP
mov edi, 0x200
call sub.msvcrt.dll_getenv
mov dword [esp + 0xc], eax
mov eax, str._s_s
mov edx, str.flowsion.patch
mov dword [esp + 8], eax
lea eax, [ebp - 0x218]
mov dword [esp + 0x10], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.0040a110
mov eax, dword [ebp - 0x61c]
test byte [eax + 0xc], 0x10
jne 0x40463f
mov eax, dword [ebp - 0x61c]
mov esi, 0x200
mov dword [esp + 4], esi
mov dword [esp + 8], eax
lea eax, [ebp - 0x618]
mov dword [esp], eax
call sub.msvcrt.dll_fgets
cmp byte [ebp - 0x618], 0x23
je 0x4044c1
lea ecx, [ebp - 0x618]
jmp 0x404510
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x404510
test edx, 0x8080
jne 0x404535
shr edx, 0x10
add ecx, 2
add dl, dl
lea eax, [ebp - 0x618]
sbb ecx, 3
sub ecx, eax
cmp byte [ecx + ebp - 0x61a], 0xd
je 0x4046f9
lea eax, [ebp - 0x618]
mov dword [esp + 4], eax
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
lea eax, [ebp - 0x218]
mov dword [esp], eax
call fcn.004015b0
test eax, eax
jne 0x40476a
lea eax, [ebp - 0x418]
mov dword [esp], eax
call fcn.004017b0
test eax, eax
je 0x40478d
call fcn.00401b30
mov dword [esp], eax
mov ebx, eax
mov edi, 0x40e304
call fcn.00404c10
mov dword [ebp - 0x620], eax
mov ecx, 1
lea esi, [ebp - 0x418]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.004018f0
call fcn.004018d0
cld
mov ecx, 0xf
repe cmpsb byte [esi], byte es:[edi]
jne 0x4046b4
mov dword [esp], str.FlowsionMS_NEW.exe
mov edx, 0x40e326
mov dword [esp + 4], edx
call sub.msvcrt.dll_fopen
mov dword [esp + 0xc], eax
mov esi, eax
mov eax, 1
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x620]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov byte [0x40f450], 1
mov eax, dword [ebp - 0x620]
mov dword [esp], eax
call fcn.00404cb0
mov eax, dword [ebp - 0x61c]
test byte [eax + 0xc], 0x10
je 0x4044d1
lea eax, [ebp - 0x218]
mov dword [esp], eax
call sub.KERNEL32.dll_DeleteFileA
mov eax, dword [ebp - 0x61c]
sub esp, 4
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov dword [esp], 0xa
mov eax, str.Update_successful_
mov dword [esp + 4], eax
call fcn.00403b80
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [0x40f4f8]
mov dword [esp], eax
call sub.USER32.dll_EndDialog
sub esp, 8
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 0x43
jne 0x4043f9
mov eax, dword [0x40f4f8]
mov dword [esp], 3
mov dword [esp + 4], eax
jmp 0x404405
mov eax, 0x40e326
mov dword [esp + 4], eax
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [esp + 0xc], eax
mov esi, eax
mov eax, 1
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x620]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov dword [esp], esi
call sub.msvcrt.dll_fclose
jmp 0x404621
mov ecx, eax
nop
lea esi, [esi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x404700
test edx, 0x8080
jne 0x404725
shr edx, 0x10
add ecx, 2
add dl, dl
lea eax, [ebp - 0x618]
sbb ecx, 3
sub ecx, eax
xor ebx, ebx
mov byte [ecx + ebp - 0x61a], bl
jmp 0x404550
mov eax, dword [0x40f4f8]
mov dword [esp], 5
mov dword [esp + 4], eax
jmp 0x404405
mov eax, dword [0x40f4f8]
mov dword [esp], 8
mov dword [esp + 4], eax
jmp 0x404405
mov eax, dword [ebp - 0x61c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, dword [0x40f4f8]
mov dword [esp], 6
mov dword [esp + 4], eax
jmp 0x404405
mov eax, dword [ebp - 0x61c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, dword [0x40f4f8]
mov dword [esp], 7
mov dword [esp + 4], eax
jmp 0x404405