Function at 0x403660
Capabilities:
Check if file exists
Create pipe
Create process on windows
Get file attributes
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xa0
mov eax, dword [0x42f140]
xor eax, esp
mov dword [esp + 0x9c], eax
push ebx
mov ebx, dword [esp + 0xac]
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
cmp ebp, 1
jge 0x4036a2
push 0x97
push str.nobuild.c
push str.argc___1
call fcn.0040b813
add esp, 0xc
mov esi, dword [ebx]
push esi
push 0x425f24
call fcn.00402d30
add esp, 8
push 0
test eax, eax
jne 0x403d21
push str..obj
push dword [ebx]
call fcn.00402620
add esp, 4
push eax
call fcn.00402590
push edx
push eax
push 0x4256fe
call fcn.00402440
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40378b
mov ebp, dword [ebx]
mov esi, ebp
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4036f7
sub esi, ecx
je 0x403712
cmp byte [esi + ebp - 1], 0x2e
je 0x403916
sub esi, 1
jne 0x403702
mov edi, ebp
push 0
push str..obj
push edi
call fcn.00402590
push edx
push eax
push 0x4256fe
call fcn.00402440
push eax
push str.RM:__s
call fcn.004010a0
mov ebp, dword [ebx]
add esp, 0x20
mov esi, ebp
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x403742
sub esi, ecx
je 0x403760
nop dword [eax]
cmp byte [esi + ebp - 1], 0x2e
je 0x403933
sub esi, 1
jne 0x403750
mov edi, ebp
push 0
push str..obj
push edi
call fcn.00402590
push edx
push eax
push 0x4256fe
call fcn.00402440
push eax
call fcn.00403350
mov ebp, dword [esp + 0xd0]
add esp, 0x1c
mov ecx, dword [0x430278]
xorps xmm0, xmm0
lea eax, [ecx + 1]
mov dword [0x430278], eax
lea eax, [ecx*8 + 0x42fa7c]
movq qword [ecx*8 + 0x42fa78], xmm0
mov dword [ecx*8 + 0x42fa78], 0x425f84
mov ecx, dword [0x430278]
mov dword [0x43027c], eax
lea eax, [ecx + 1]
mov dword [0x430278], eax
lea eax, [ecx*8 + 0x42fa7c]
movq qword [ecx*8 + 0x42fa78], xmm0
mov dword [ecx*8 + 0x42fa78], 0x425f90
mov ecx, dword [0x430278]
mov dword [0x430280], eax
lea eax, [ecx + 1]
mov dword [0x430278], eax
lea eax, [ecx*8 + 0x42fa7c]
movq qword [ecx*8 + 0x42fa78], xmm0
mov dword [ecx*8 + 0x42fa78], 0x425f98
mov ecx, dword [0x430278]
mov dword [0x430284], eax
lea eax, [ecx + 1]
mov dword [0x430278], eax
lea eax, [ecx*8 + 0x42fa7c]
movq qword [ecx*8 + 0x42fa78], xmm0
mov dword [ecx*8 + 0x42fa78], 0x425fa0
mov ecx, dword [0x430278]
mov dword [0x430288], eax
lea eax, [ecx + 1]
mov dword [0x430278], eax
lea eax, [ecx*8 + 0x42fa7c]
movq qword [ecx*8 + 0x42fa78], xmm0
mov dword [ecx*8 + 0x42fa78], 0x425fa4
mov ecx, dword [0x430278]
mov dword [0x43028c], eax
lea eax, [ecx + 1]
mov dword [0x430278], eax
lea eax, [ecx*8 + 0x42fa7c]
movq qword [ecx*8 + 0x42fa78], xmm0
mov dword [ecx*8 + 0x42fa78], 0x425fa8
mov dword [0x430290], eax
test ebp, ebp
jg 0x4038bd
push 0x804
push 0x425658
push str.argc___0
call fcn.0040b813
add esp, 0xc
dec ebp
lea esi, [ebx + 4]
test ebp, ebp
jle 0x403988
mov ebx, dword [esi]
dec ebp
add esi, 4
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], esi
xor edi, edi
xor esi, esi
cmp dword [0x430278], esi
jbe 0x403dd2
mov ebp, 0x42fa78
nop dword [eax]
mov ecx, dword [ebp + esi*8]
mov eax, ebx
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x403950
test dl, dl
je 0x403912
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x403950
add ecx, 2
add eax, 2
test dl, dl
jne 0x4038f6
xor eax, eax
jmp 0x403955
push esi
call fcn.0040a99a
push esi
mov edi, eax
push ebp
push edi
call fcn.00408340
add esp, 0x10
mov byte [edi + esi - 1], 0
jmp 0x403714
push esi
call fcn.0040a99a
push esi
mov edi, eax
push ebp
push edi
call fcn.00408340
add esp, 0x10
mov byte [edi + esi - 1], 0
jmp 0x403762
sbb eax, eax
or eax, 1
test eax, eax
jne 0x403967
mov dword [esi*8 + 0x42fa7c], 1
lea edi, [eax + 1]
inc esi
cmp esi, dword [0x430278]
jb 0x4038f0
mov ebp, dword [esp + 0x14]
test edi, edi
je 0x403dd2
mov esi, dword [esp + 0x10]
test ebp, ebp
jg 0x4038c9
mov eax, dword [0x430284]
cmp dword [eax], 0
je 0x403ae7
push 0x4257fc
call fcn.00403180
add esp, 4
mov esi, eax
call fcn.0040a6ed
test esi, esi
je 0x403db8
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov dword [eax], 0
nop
cmp dword [esi + 0x144], 0
jne 0x4039e0
push 0x105
push 1
call fcn.0040a974
add esp, 8
mov dword [esi + 0x144], eax
jmp 0x4039f0
lea eax, [esi + 4]
push eax
push dword [esi]
call ebx
test eax, eax
je 0x403a8e
push 0x105
push 0
push dword [esi + 0x144]
call fcn.004088c0
push 0x104
lea eax, [esi + 0x30]
push eax
push dword [esi + 0x144]
call fcn.0040a850
mov edi, dword [esi + 0x144]
add esp, 0x18
test edi, edi
je 0x403aa4
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403a30
sub ecx, edx
cmp ecx, 4
jb 0x4039c0
lea eax, [edi - 4]
mov edx, str..obj
add eax, ecx
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x403a68
test cl, cl
je 0x403a64
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x403a68
add eax, 2
add edx, 2
test cl, cl
jne 0x403a48
xor eax, eax
jmp 0x403a6d
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4039c0
push edi
push str.RM:__s
call fcn.004010a0
push edi
call fcn.00403350
add esp, 0xc
jmp 0x4039c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x403aa4
call fcn.0040a6ed
mov dword [eax], 0x28
call fcn.0040a6ed
cmp dword [eax], 0
jg 0x403de7
push dword [esi]
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
jne 0x403acb
call fcn.0040a6ed
mov dword [eax], 0x28
jmp 0x403ae7
mov eax, dword [esi + 0x144]
test eax, eax
je 0x403ade
push eax
call fcn.0040a97f
add esp, 4
push esi
call fcn.0040a97f
add esp, 4
push 0
lea eax, [esp + 0x34]
mov dword [esp + 0x18], 0
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x3c], 0xc
push eax
mov dword [esp + 0x48], 1
mov dword [esp + 0x44], 0
call dword [sym.imp.KERNEL32.dll_CreatePipe]
push 0
push 1
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov ax, word [0x42614c]
movups xmm0, xmmword [str.git_rev_parse___short_HEAD]
mov word [esp + 0xa8], ax
mov al, byte [0x42614e]
mov byte [esp + 0xaa], al
mov eax, dword [esp + 0x10]
mov dword [esp + 0x7c], eax
mov dword [esp + 0x78], eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x40]
mov dword [esp + 0x74], 0
push eax
push 0
push 0
push 0
push 1
push 0
movups xmmword [esp + 0xac], xmm0
lea eax, [esp + 0xac]
mov dword [esp + 0x58], 0x44
movq xmm0, qword [0x426144]
push 0
movq qword [esp + 0xc0], xmm0
xorps xmm0, xmm0
push eax
movlpd qword [esp + 0x8c], xmm0
or dword [esp + 0x8c], 0x100
push 0
movups xmmword [esp + 0x48], xmm0
mov dword [esp + 0x9c], 0
movlpd qword [esp + 0x68], xmm0
movlpd qword [esp + 0x70], xmm0
movlpd qword [esp + 0x78], xmm0
movlpd qword [esp + 0x80], xmm0
movlpd qword [esp + 0x88], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push 0xffffffffffffffff
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [esp + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x24]
call esi
push dword [esp + 0x10]
call esi
cmp dword [esp + 0x18], 0
jne 0x403c7e
push 0
lea eax, [esp + 0x20]
xorps xmm0, xmm0
push eax
push 7
lea eax, [esp + 0x8c]
push eax
push dword [esp + 0x24]
movups xmmword [esp + 0x94], xmm0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x1c], 0
jbe 0x403c7e
lea eax, [esp + 0x80]
push eax
push str._DGIT_COMMIT_HASH_s
push 0x20
push 0x430298
call fcn.00405510
add esp, 0x10
mov eax, dword [0x43028c]
cmp dword [eax], 0
je 0x403c94
call fcn.00401af0
call fcn.00401fb0
jmp 0x403caa
mov eax, dword [0x43027c]
cmp dword [eax], 0
je 0x403ca5
call fcn.00401fb0
jmp 0x403caa
call fcn.00401af0
mov eax, dword [0x430288]
cmp dword [eax], 0
je 0x403d08
mov eax, dword [0x43027c]
cmp dword [eax], 0
je 0x403cfb
push 0
push str.._freedom_standalone.exe
call fcn.00402590
mov esi, edx
mov edi, eax
push esi
push edi
push 0x425788
call fcn.00402440
push eax
push str.CMD:__s
call fcn.004010a0
push 0
push 0
push esi
push edi
call fcn.00402310
push eax
call fcn.004035c0
add esp, 0x30
jmp 0x403d08
push 0x4302b8
call fcn.00402e00
add esp, 4
mov ecx, dword [esp + 0xac]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00407506
add esp, 0xa0
ret
push str..old
push esi
call fcn.00402590
push edx
push eax
push 0x4256fe
call fcn.00402440
push eax
push esi
push str.RENAME:__s_____s
call fcn.004010a0
push 0
push str..old
push esi
call fcn.00402590
push edx
push eax
push 0x4256fe
call fcn.00402440
push eax
push esi
call fcn.00403320
add esp, 0x44
push 0
push 0x425f24
push str.cl.exe
call fcn.00402590
mov esi, edx
mov edi, eax
push esi
push edi
call fcn.00402420
push eax
push str.CMD:__s
call fcn.004010a0
push esi
push edi
call fcn.00402400
push ebp
push ebx
call fcn.00402420
push eax
push str.CMD:__s
call fcn.004010a0
push ebp
push ebx
call fcn.00402400
add esp, 0x3c
push 0
call fcn.0040ae06
push dword [eax]
call fcn.0040a83a
add esp, 4
push eax
push 0x4257fc
push str.could_not_open_directory__s:__s
call fcn.004010f0
push ebx
push str.unknown_flag__s
call fcn.00401000
add esp, 8
push 1
call fcn.0040ae06
call fcn.0040a6ed
push dword [eax]
call fcn.0040a83a
add esp, 4
push eax
push 0x4257fc
push str.could_not_read_directory__s:__s
call fcn.004010f0
int3