Function at 0x406475
Capabilities:
Create directory
Move file

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov eax, 0x1070
call fcn.00597adc
sub esp, eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00431daa
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x44], 0x61d2e4
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x50], 0x61d2e4
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [esp + 4], 0xb28
mov dword [esp], 1
call fcn.004baa20
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
add eax, 4
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00491c81
mov eax, dword [ebp - 0x20]
lea edx, [eax + 0x11c]
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00401637
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x10], 0xffffffff
mov eax, dword [0x61cf40]
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
lea edx, [ebp - 0x4c]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00438b6d
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x20]
add edx, 4
mov dword [esp + 8], eax
mov dword [esp + 4], str._s.temp
mov dword [esp], edx
call fcn.00492911
mov eax, dword [ebp - 0x44]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s.prev
lea eax, [ebp - 0x58]
mov dword [esp], eax
call fcn.00492911
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call fcn.004bb651
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygwin1.dll_rename
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call fcn.004bb651
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call fcn.00491cd8
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x10]
cmp eax, 0xffffffff
je 0x4065e1
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x10]
mov dword [esp + 4], eax
mov dword [esp], str.fd_leakage_in_start:__d
call fcn.004b5782
call fcn.00401170
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x1b6
mov dword [esp + 4], 0xa01
mov dword [esp], eax
call sub.cygwin1.dll__open64
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x10]
test eax, eax
jns 0x406680
call sub.cygwin1.dll___errno
mov eax, dword [eax]
cmp eax, 2
jne 0x406680
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], 0x2f
mov dword [esp], eax
call sub.cygwin1.dll_strrchr
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x40665c
mov eax, dword [ebp - 0x24]
mov byte [eax], 0
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], 0x1ff
mov dword [esp], eax
call sub.cygwin1.dll_mkdir
mov eax, dword [ebp - 0x24]
mov byte [eax], 0x2f
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov dword [esp + 8], 0x1b6
mov dword [esp + 4], 0xa01
mov dword [esp], eax
call sub.cygwin1.dll__open64
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x10]
test eax, eax
jns 0x4066aa
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.Couldnt_create_temporary_file__s
call fcn.004b572d
call fcn.00401170
jmp 0x4069f0
mov eax, dword [ebp - 0x20]
add eax, 0xac8
mov dword [esp], eax
call fcn.004c403e
mov eax, dword [0x61cf40]
mov eax, dword [eax + 0x8c]
mov eax, dword [eax + 0x14]
mov edx, dword [ebp - 0x20]
add edx, 0x168
mov dword [esp], edx
call eax
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00404959
mov edx, dword [ebp - 0x20]
mov dword [edx], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.cygwin1.dll__open64
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
je 0x406786
mov dword [esp + 8], 0x1000
lea eax, [ebp - 0x1058]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call fcn.004bac5c
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x406775
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x20]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
lea eax, [ebp - 0x1058]
mov dword [esp], eax
call fcn.004062ce
mov edx, dword [ebp - 0xc]
cmp eax, edx
jne 0x40676e
mov eax, dword [ebp - 0xc]
cdq
add dword [ebp - 0x18], eax
adc dword [ebp - 0x14], edx
jmp 0x406775
mov dword [ebp - 0xc], 0xffffffff
cmp dword [ebp - 0xc], 0
jg 0x406711
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call fcn.004bb651
lea eax, [ebp - 0x58]
mov dword [esp], eax
call fcn.00491cd8
cmp dword [ebp - 0xc], 0xffffffff
jne 0x40687a
mov eax, dword [ebp - 0x20]
add eax, 0xac8
mov dword [esp + 8], 0x50
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.cygwin1.dll_memset
mov eax, dword [ebp - 0x20]
add eax, 0xac8
mov dword [esp], eax
call fcn.004c403e
mov eax, dword [0x61cf40]
mov eax, dword [eax + 0x8c]
mov eax, dword [eax + 0x14]
mov edx, dword [ebp - 0x20]
add edx, 0x168
mov dword [esp], edx
call eax
mov edx, 0
mov eax, 0
cmp edx, dword [ebp - 0x18]
sbb eax, dword [ebp - 0x14]
jge 0x40687a
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x10]
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call sub.cygwin1.dll__lseek64
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x10]
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call sub.cygwin1.dll__ftruncate64
test eax, eax
jns 0x40687a
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.Couldnt_truncate_temporary_file__s
call fcn.004b572d
call fcn.00401170
jmp 0x4069f0
call fcn.00404058
mov edx, dword [ebp - 0x20]
mov dword [edx + 0xb20], eax
mov dword [ebp - 0x2c], 0x2711
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xb20]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x20]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygcurl_4.dll_curl_easy_setopt
mov dword [ebp - 0x30], 0x2d
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xb20]
mov eax, dword [eax]
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygcurl_4.dll_curl_easy_setopt
mov dword [ebp - 0x34], 0x4e2b
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xb20]
mov eax, dword [eax]
mov dword [esp + 8], fcn.004062ce
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygcurl_4.dll_curl_easy_setopt
mov dword [ebp - 0x38], 0x271a
mov eax, dword [ebp - 0x20]
lea ecx, [eax + 0x18]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xb20]
mov eax, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygcurl_4.dll_curl_easy_setopt
mov dword [ebp - 0x3c], 0x2712
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xb20]
mov eax, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygcurl_4.dll_curl_easy_setopt
mov dword [ebp - 0x40], 0x2727
mov ecx, dword [0x61c1b4]
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xb20]
mov eax, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygcurl_4.dll_curl_easy_setopt
mov edx, 0
mov eax, 0
cmp edx, dword [ebp - 0x18]
sbb eax, dword [ebp - 0x14]
jge 0x4069eb
mov eax, dword [0x61c028]
test eax, eax
je 0x4069ca
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
call sub.cygwin1.dll___getreent
mov eax, dword [eax + 0xc]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
mov edx, dword [ebp - 0x1c]
mov dword [esp + 8], edx
mov dword [esp + 4], str.Resuming_fetch_of_object__s_at_byte__llu_n
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xb20]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], ecx
call fcn.004051f2
mov eax, dword [ebp - 0x20]
jmp 0x406a18
lea eax, [ebp - 0x58]
mov dword [esp], eax
call fcn.00491cd8
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov dword [esp], eax
call sub.cygwin1.dll_free
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.cygwin1.dll_free
mov eax, 0
add esp, 0x1070
pop esi
pop edi
pop ebp
ret