Function at 0x40c760
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x435961
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x443284]
xor eax, esp
mov dword [esp + 0xc8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x443284]
xor eax, esp
push eax
lea eax, [esp + 0xe4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x16c]
xor edi, edi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], edi
mov dword [esp + 0xec], 4
push edi
mov ebp, 0xf
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], edi
push 0x43a36a
mov byte [ecx + 4], 0
call fcn.00401b50
lea esi, [esp + 0x54]
mov dword [esp + 0x50], 1
call fcn.00413a10
mov byte [esp + 0xec], 5
call fcn.00411b50
mov ebx, eax
mov ecx, dword [ebx + 0x10]
xor eax, eax
cmp dword [esp + 0x12c], 0x10
mov dword [esp + 0xbd], eax
mov dword [esp + 0xc1], eax
mov dword [esp + 0xc5], eax
mov dword [esp + 0xc9], eax
mov dword [esp + 0xcd], eax
mov dword [esp + 0xd1], eax
mov dword [esp + 0xd5], eax
mov word [esp + 0xd9], ax
mov byte [esp + 0xdb], al
mov eax, dword [esp + 0x118]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x44], edi
mov byte [esp + 0xbc], 0
jae 0x40c866
lea eax, [esp + 0x118]
mov edx, dword [ebx + 0x10]
push eax
mov eax, dword [ebx + 8]
push edx
push eax
call fcn.0041fe8c
mov ecx, dword [esp + 0x11c]
add esp, 0xc
push 0xbb8
push ecx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0xffffffffffffffff
push edi
lea edx, [esp + 0x120]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], edi
push edx
mov byte [ecx + 4], 0
call fcn.00401960
lea esi, [esp + 0x4c]
call fcn.004120d0
add esp, 0x1c
mov ebp, 8
mov byte [esp + 0xf4], 6
cmp dword [eax + 0x18], ebp
jb 0x40c8ca
mov eax, dword [eax + 4]
jmp 0x40c8cd
add eax, 4
push eax
lea ecx, [esp + 0x60]
call fcn.00413d90
mov byte [esp + 0xec], 5
cmp dword [esp + 0x40], ebp
mov esi, eax
jb 0x40c8f4
mov eax, dword [esp + 0x2c]
push eax
call fcn.0041f829
add esp, 4
cmp esi, edi
je 0x40d288
mov ecx, dword [ebx + 8]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x40c904
sub eax, esi
mov ebp, eax
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x40c916
push 0xbb8
push ebp
sub eax, esi
push ecx
lea ecx, [esp + 0x60]
mov esi, eax
call fcn.00414070
cmp eax, esi
jne 0x40d1e2
call fcn.00414fa0
push eax
push str.___s__
push 0x104
push 0x104
push 0x445be0
call fcn.0041f84a
mov esi, dword [ebx + 8]
sub esp, 8
mov ecx, esp
mov eax, esi
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], 0
mov dword [esp + 0x34], esp
mov byte [ecx + 4], 0
lea ebp, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x40c980
sub eax, ebp
push eax
push esi
call fcn.00401b50
lea esi, [esp + 0x44]
call fcn.004120d0
add esp, 0x1c
mov byte [esp + 0xec], 7
cmp dword [eax + 0x18], 8
jb 0x40c9b1
mov eax, dword [eax + 4]
jmp 0x40c9b4
add eax, 4
push eax
push str.UpdateCtrl::DownloadFile:_send_http_request__s.
push 4
call fcn.004154c0
add esp, 0xc
mov byte [esp + 0xec], 5
cmp dword [esp + 0x40], 8
jb 0x40c9e0
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.0041f829
add esp, 4
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 8]
push edx
push 0
push eax
call fcn.00424a50
mov esi, dword [esp + 0x28]
add esp, 0xc
mov edx, dword [ebx + 8]
push 0
push 0x3e8
mov ecx, esi
sub ecx, edi
push ecx
add edx, edi
push edx
lea ecx, [esp + 0x64]
call fcn.00414220
cmp eax, 0xffffffff
je 0x40cc02
test eax, eax
jle 0x40ca20
add edi, eax
mov eax, dword [ebx + 8]
push str._r_n_r_n
push eax
call fcn.00420b10
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x40c9f6
mov edx, dword [ebx + 8]
mov esi, ebp
sub esi, edx
mov dword [esp + 0x18], edi
mov ecx, 0
js 0x40ca67
lea esp, [esp]
mov al, byte [ecx + edx]
cmp al, 0x60
jle 0x40ca60
cmp al, 0x7b
jge 0x40ca60
sub al, 0x20
mov byte [ecx + edx], al
add ecx, 1
cmp ecx, esi
jle 0x40ca50
mov edi, dword [esp + 0x20]
xor eax, eax
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], eax
mov dword [esp + 0xd0], eax
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], eax
mov eax, dword [ebx + 8]
mov cx, word [eax + 9]
add eax, 9
mov word [esp + 0xbc], cx
mov dl, byte [eax + 2]
lea eax, [esp + 0xbc]
push eax
mov ecx, edi
mov byte [esp + 0xc2], dl
call fcn.0040f930
mov ecx, 0x43b298
call fcn.004117e0
test al, al
jne 0x40cb0c
mov ecx, 0x43b29c
call fcn.004117e0
test al, al
jne 0x40cafe
mov ecx, 0x43b2a0
call fcn.004117e0
test al, al
je 0x40cba6
cmp byte [esp + 0x168], 0
je 0x40cba6
mov eax, dword [ebx + 8]
push str.CONTENT_LENGTH:
push eax
call fcn.00420b10
add esp, 8
push str.CONTENT_LENGTH:
lea ecx, [esp + 0x2c]
mov esi, eax
call fcn.00401810
add esi, dword [eax + 0x14]
lea ecx, [esp + 0x28]
call fcn.00401850
push 0x43b2b8
push esi
call fcn.00420b10
xor ecx, ecx
sub eax, esi
push eax
mov dword [esp + 0xc8], ecx
mov dword [esp + 0xcc], ecx
mov dword [esp + 0xd0], ecx
mov dword [esp + 0xd4], ecx
mov dword [esp + 0xd8], ecx
mov dword [esp + 0xdc], ecx
mov dword [esp + 0xe0], ecx
mov dword [esp + 0xe4], ecx
lea ecx, [esp + 0xc8]
push esi
push ecx
call fcn.00423740
lea edx, [esp + 0xd0]
add esp, 0x14
push edx
call fcn.0041fe87
add esp, 4
mov dword [esp + 0x44], eax
call fcn.00414fa0
push eax
push str.___s__
push 0x104
push 0x104
push 0x445be0
call fcn.0041f84a
mov eax, dword [esp + 0x58]
add esp, 0x14
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push edi
call fcn.0040f900
lea esi, [esp + 0x48]
call fcn.004120d0
add esp, 0x1c
mov byte [esp + 0xf0], 9
cmp dword [eax + 0x18], 8
jb 0x40ccb5
mov eax, dword [eax + 4]
jmp 0x40ccb8
call fcn.00414fa0
push eax
push str.___s__
push 0x104
push 0x104
push 0x445be0
call fcn.0041f84a
add esp, 0x14
cmp byte [esp + 0x168], 0
mov ebp, str.version
jne 0x40cc38
mov ebp, str.media
mov eax, dword [esp + 0x110]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x6c], esp
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x11c]
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], 0
push edx
mov byte [ecx + 4], 0
call fcn.00401960
lea esi, [esp + 0x48]
call fcn.004120d0
add esp, 0x1c
mov byte [esp + 0xf0], 8
cmp dword [eax + 0x18], 8
jb 0x40cc8b
mov eax, dword [eax + 4]
jmp 0x40cc8e
add eax, 4
push eax
push ebp
push str.recv_data_from__s_server__s:_d__fail_on_step_1.
push 2
call fcn.004154c0
add esp, 0x14
lea ecx, [esp + 0x28]
mov byte [esp + 0xec], 5
call fcn.004018f0
jmp 0x40d344
add eax, 4
push eax
push str.UpdateCtrl::DownloadFile:_recv_http_header___s__Content_Length__d_.
push 4
call fcn.004154c0
add esp, 0x10
lea ecx, [esp + 0x28]
mov byte [esp + 0xec], 5
call fcn.004018f0
cmp dword [esp + 0x44], 0
jle 0x40d344
cmp byte [esp + 0x168], 0
je 0x40cdd3
push 1
push 0x43a678
sub esp, 0x1c
lea edx, [esp + 0x170]
mov ecx, esp
mov dword [esp + 0x40], esp
push edx
call fcn.0040f900
lea esi, [esp + 0x4c]
call fcn.004120d0
add esp, 0x1c
mov ebx, 8
mov byte [esp + 0xf4], 0xa
cmp dword [eax + 0x18], ebx
jb 0x40cd32
mov eax, dword [eax + 4]
jmp 0x40cd35
add eax, 4
push eax
call fcn.00414ff0
add esp, 0xc
lea ecx, [esp + 0x28]
mov byte [esp + 0xec], 5
call fcn.004018f0
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00414fa0
push eax
push str.___s__
push 0x104
push 0x104
push 0x445be0
call fcn.0041f84a
sub esp, 8
lea eax, [esp + 0x168]
mov ecx, esp
mov dword [esp + 0x40], esp
push eax
call fcn.0040f900
lea esi, [esp + 0x44]
call fcn.004120d0
add esp, 0x1c
mov byte [esp + 0xec], 0xb
cmp dword [eax + 0x18], ebx
jb 0x40cdad
mov eax, dword [eax + 4]
jmp 0x40cdb0
add eax, 4
push eax
push str.UpdateCtrl::DownloadFile:_clear_update_file_in__s.
push 4
call fcn.004154c0
add esp, 0xc
lea ecx, [esp + 0x28]
mov byte [esp + 0xec], 5
call fcn.004018f0
jmp 0x40cdd8
mov ebx, 8
push 0x43b3b0
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x44], esp
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x158]
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], 0
push edx
mov byte [ecx + 4], 0
call fcn.00401960
lea esi, [esp + 0x48]
call fcn.004120d0
add esp, 0x1c
cmp dword [eax + 0x18], ebx
jb 0x40ce1f
mov eax, dword [eax + 4]
jmp 0x40ce22
add eax, 4
push eax
lea eax, [esp + 0x24]
push eax
call fcn.0041f92f
add esp, 0xc
test eax, eax
mov edi, 8
sete bl
cmp dword [esp + 0x40], edi
jb 0x40ce4d
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.0041f829
add esp, 4
test bl, bl
je 0x40d134
push str._r_n_r_n
lea ecx, [esp + 0x2c]
call fcn.00401810
mov eax, dword [eax + 0x14]
mov ebx, dword [esp + 0x48]
sub eax, dword [ebx + 8]
lea ecx, [esp + 0x28]
add eax, ebp
mov esi, eax
call fcn.00401850
mov eax, dword [esp + 0x18]
sub eax, esi
test eax, eax
mov ebp, 1
jle 0x40cf5a
mov edx, dword [esp + 0x1c]
mov edi, eax
mov eax, dword [ebx + 8]
push edx
push edi
add eax, esi
push ebp
push eax
mov dword [esp + 0x28], edi
call fcn.00420cf5
add esp, 0x10
cmp eax, edi
je 0x40cf62
mov ecx, dword [esp + 0x20]
push 0x43a36a
call fcn.0040f930
call fcn.00414fa0
push eax
push str.___s__
push 0x104
push 0x104
push 0x445be0
call fcn.0041f84a
add esp, 0x14
cmp byte [esp + 0x168], 0
mov ebp, str.version
jne 0x40cef4
mov ebp, str.media
mov ecx, dword [esp + 0x110]
push ecx
sub esp, 0x1c
lea edx, [esp + 0x114]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
call fcn.0040f900
lea esi, [esp + 0x48]
call fcn.004120d0
add esp, 0x1c
mov byte [esp + 0xf0], 0xc
cmp dword [eax + 0x18], 8
jb 0x40cf31
mov eax, dword [eax + 4]
jmp 0x40cf34
add eax, 4
push eax
push ebp
push str.recv_data_from__s_server__s:_d__fail_on_step_3.
push 2
call fcn.004154c0
add esp, 0x14
lea ecx, [esp + 0x28]
mov byte [esp + 0xec], 5
call fcn.004018f0
xor ebp, ebp
jmp 0x40cf62
mov dword [esp + 0x18], 0
mov edi, dword [esp + 0x44]
mov ecx, dword [esp + 0x18]
cmp ecx, edi
jge 0x40d11b
test ebp, ebp
je 0x40d11b
mov eax, edi
sub eax, ecx
cmp eax, 0x2800
jle 0x40cf8a
mov eax, 0x2800
push 0
push 0x3e8
push eax
mov eax, dword [ebx + 8]
push eax
lea ecx, [esp + 0x64]
call fcn.00414220
mov esi, eax
cmp esi, 0xffffffff
je 0x40cfd7
test esi, esi
jle 0x40cfae
add dword [esp + 0x18], esi
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebx + 8]
push ecx
push esi
push 1
push edx
call fcn.00420cf5
add esp, 0x10
cmp eax, esi
jne 0x40d071
mov ecx, dword [esp + 0x18]
cmp ecx, edi
jl 0x40cf72
jmp 0x40d11b
mov ecx, dword [esp + 0x20]
push 0x43a36a
call fcn.0040f930
call fcn.00414fa0
push eax
push str.___s__
push 0x104
push 0x104
push 0x445be0
call fcn.0041f84a
add esp, 0x14
cmp byte [esp + 0x168], 0
mov ebx, str.version
jne 0x40d01b
mov ebx, str.media
mov eax, dword [esp + 0x110]
push eax
sub esp, 0x1c
lea edx, [esp + 0x114]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
call fcn.0040f900
lea esi, [esp + 0x48]
call fcn.004120d0
add esp, 0x1c
mov byte [esp + 0xf0], 0xd
cmp dword [eax + 0x18], 8
jb 0x40d062
mov eax, dword [eax + 4]
push eax
push ebx
push str.recv_data_from__s_server__s:_d__fail_on_step_4.
jmp 0x40d0fc
add eax, 4
push eax
push ebx
push str.recv_data_from__s_server__s:_d__fail_on_step_4.
jmp 0x40d0fc
mov ecx, dword [esp + 0x20]
push 0x43a36a
call fcn.0040f930
call fcn.00414fa0
push eax
push str.___s__
push 0x104
push 0x104
push 0x445be0
call fcn.0041f84a
add esp, 0x14
cmp byte [esp + 0x168], 0
mov ebx, str.version
jne 0x40d0b5
mov ebx, str.media
mov eax, dword [esp + 0x110]
push eax
sub esp, 0x1c
lea edx, [esp + 0x114]
mov ecx, esp
mov dword [esp + 0x44], esp
push edx
call fcn.0040f900
lea esi, [esp + 0x48]
call fcn.004120d0
add esp, 0x1c
mov byte [esp + 0xf0], 0xe
cmp dword [eax + 0x18], 8
jb 0x40d0f2
mov eax, dword [eax + 4]
jmp 0x40d0f5
add eax, 4
push eax
push ebx
push str.recv_data_from__s_server__s:_d__fail_on_step_5.
push 2
call fcn.004154c0
add esp, 0x14
lea ecx, [esp + 0x28]
mov byte [esp + 0xec], 5
call fcn.004018f0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x4c]
mov dword [eax], ecx
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00420024
mov ebx, dword [esp + 0x4c]
jmp 0x40d341
mov ecx, dword [esp + 0x20]
push 0x43a36a
call fcn.0040f930
call fcn.00414fa0
push eax
push str.___s__
push 0x104
push 0x104
push 0x445be0
call fcn.0041f84a
add esp, 0x14
cmp byte [esp + 0x168], 0
mov ebx, str.version
jne 0x40d178
mov ebx, str.media
mov edx, dword [esp + 0x110]
push edx
sub esp, 0x1c
lea eax, [esp + 0x114]
mov ecx, esp
mov dword [esp + 0x44], esp
push eax
call fcn.0040f900
lea esi, [esp + 0x48]
call fcn.004120d0
add esp, 0x1c
mov byte [esp + 0xf0], 0xf
cmp dword [eax + 0x18], edi
jb 0x40d1b4
mov eax, dword [eax + 4]
jmp 0x40d1b7
add eax, 4
push eax
push ebx
push str.recv_data_from__s_server__s:_d__fail_on_step_2.
push 2
call fcn.004154c0
add esp, 0x14
lea ecx, [esp + 0x28]
mov byte [esp + 0xec], 5
call fcn.004018f0
mov ebx, dword [esp + 0x48]
jmp 0x40d344
call fcn.00414fa0
push eax
push str.___s__
push 0x104
push 0x104
push 0x445be0
call fcn.0041f84a
add esp, 0x14
cmp byte [esp + 0x168], 0
mov ebp, str.version
jne 0x40d218
mov ebp, str.media
mov ecx, dword [esp + 0x110]
push ecx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x44], esp
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x11c]
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], 0
push edx
mov byte [ecx + 4], 0
call fcn.00401960
lea esi, [esp + 0x48]
call fcn.004120d0
add esp, 0x1c
mov esi, 8
mov byte [esp + 0xf0], 0x10
cmp dword [eax + 0x18], esi
jb 0x40d279
mov eax, dword [eax + 4]
push eax
push ebp
push str.send_data_to__s_server__s:_d__fail.
jmp 0x40d31f
add eax, 4
push eax
push ebp
push str.send_data_to__s_server__s:_d__fail.
jmp 0x40d31f
call fcn.00414fa0
push eax
push str.___s__
push 0x104
push 0x104
push 0x445be0
call fcn.0041f84a
add esp, 0x14
cmp byte [esp + 0x168], 0
mov ebp, str.version
jne 0x40d2be
mov ebp, str.media
mov ecx, dword [esp + 0x110]
push ecx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x44], esp
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x11c]
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], 0
push edx
mov byte [ecx + 4], 0
call fcn.00401960
lea esi, [esp + 0x48]
call fcn.004120d0
add esp, 0x1c
mov esi, 8
mov byte [esp + 0xf0], 0x11
cmp dword [eax + 0x18], esi
jb 0x40d315
mov eax, dword [eax + 4]
jmp 0x40d318
add eax, 4
push eax
push ebp
push str.can_NOT_connect_to__s_server__s:_d_.
push 2
call fcn.004154c0
add esp, 0x14
mov byte [esp + 0xec], 5
cmp dword [esp + 0x40], esi
jb 0x40d344
mov eax, dword [esp + 0x2c]
push eax
call fcn.0041f829
add esp, 4
push ebx
call fcn.00411cd0
add esp, 4
lea eax, [esp + 0x54]
call fcn.00413b20
mov esi, 0x10
cmp dword [esp + 0x10c], esi
jb 0x40d374
mov ecx, dword [esp + 0xf8]
push ecx
call fcn.0041f829
add esp, 4
xor ebp, ebp
cmp dword [esp + 0x12c], esi
mov ebx, 0xf
mov dword [esp + 0x10c], ebx
mov dword [esp + 0x108], ebp
mov byte [esp + 0xf8], 0
jb 0x40d3aa
mov edx, dword [esp + 0x118]
push edx
call fcn.0041f829
add esp, 4
cmp dword [esp + 0x148], esi
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x128], ebp
mov byte [esp + 0x118], 0
jb 0x40d3d9
mov eax, dword [esp + 0x134]
push eax
call fcn.0041f829
add esp, 4
cmp dword [esp + 0x164], esi
mov dword [esp + 0x148], ebx
mov dword [esp + 0x144], ebp
mov byte [esp + 0x134], 0
jb 0x40d408
mov ecx, dword [esp + 0x150]
push ecx
call fcn.0041f829
add esp, 4
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xe4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.0041f134
add esp, 0xdc
ret 0x7c