Function at 0x40a4cd
Capabilities:
Create directory
Move file

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov eax, 0x1070
call fcn.0059946c
sub esp, eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.0042bbe2
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x44], 0x62f624
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x50], 0x62f624
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.004b4484
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
add eax, 4
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0048a7c9
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.0040568f
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x10], 0xffffffff
mov eax, dword [0x62f280]
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.00431195
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.0048b459
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.0048b459
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call fcn.004b50b5
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.004b50b5
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call fcn.0048a820
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x10]
cmp eax, 0xffffffff
je 0x40a639
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.004ae2ca
call fcn.004051c8
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 0x40a6d8
call sub.cygwin1.dll___errno
mov eax, dword [eax]
cmp eax, 2
jne 0x40a6d8
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 0x40a6b4
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 0x40a702
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.004ae275
call fcn.004051c8
jmp 0x40aa48
mov eax, dword [ebp - 0x20]
add eax, 0xac8
mov dword [esp], eax
call fcn.004bdaa2
mov eax, dword [0x62f280]
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.004089b1
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 0x40a7de
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.004b46c0
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jle 0x40a7cd
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.0040a326
mov edx, dword [ebp - 0xc]
cmp eax, edx
jne 0x40a7c6
mov eax, dword [ebp - 0xc]
cdq
add dword [ebp - 0x18], eax
adc dword [ebp - 0x14], edx
jmp 0x40a7cd
mov dword [ebp - 0xc], 0xffffffff
cmp dword [ebp - 0xc], 0
jg 0x40a769
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.004b50b5
lea eax, [ebp - 0x58]
mov dword [esp], eax
call fcn.0048a820
cmp dword [ebp - 0xc], 0xffffffff
jne 0x40a8d2
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.004bdaa2
mov eax, dword [0x62f280]
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 0x40a8d2
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 0x40a8d2
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.004ae275
call fcn.004051c8
jmp 0x40aa48
call fcn.004080b0
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.0040a326
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 [0x61e234]
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 0x40aa43
mov eax, dword [0x61e0a8]
test eax, eax
je 0x40aa22
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.0040924a
mov eax, dword [ebp - 0x20]
jmp 0x40aa70
lea eax, [ebp - 0x58]
mov dword [esp], eax
call fcn.0048a820
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