Function at 0x403840
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 0x403882
push 0x146
push str.nobuild.c
push str.argc___1
call fcn.0040b9e3
add esp, 0xc
mov esi, dword [ebx]
push esi
push 0x4260b0
call fcn.00402f10
add esp, 8
push 0
test eax, eax
jne 0x403f01
push str..obj
push dword [ebx]
call fcn.00402800
add esp, 4
push eax
call fcn.00402770
push edx
push eax
push 0x4256fe
call fcn.00402620
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40396b
mov ebp, dword [ebx]
mov esi, ebp
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4038d7
sub esi, ecx
je 0x4038f2
cmp byte [esi + ebp - 1], 0x2e
je 0x403af6
sub esi, 1
jne 0x4038e2
mov edi, ebp
push 0
push str..obj
push edi
call fcn.00402770
push edx
push eax
push 0x4256fe
call fcn.00402620
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 0x403922
sub esi, ecx
je 0x403940
nop dword [eax]
cmp byte [esi + ebp - 1], 0x2e
je 0x403b13
sub esi, 1
jne 0x403930
mov edi, ebp
push 0
push str..obj
push edi
call fcn.00402770
push edx
push eax
push 0x4256fe
call fcn.00402620
push eax
call fcn.00403530
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], 0x426108
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], 0x426114
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], 0x42611c
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], 0x426124
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], 0x426128
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], 0x42612c
mov dword [0x430290], eax
test ebp, ebp
jg 0x403a9d
push 0x804
push 0x425658
push str.argc___0
call fcn.0040b9e3
add esp, 0xc
dec ebp
lea esi, [ebx + 4]
test ebp, ebp
jle 0x403b68
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 0x403fb2
mov ebp, 0x42fa78
nop dword [eax]
mov ecx, dword [ebp + esi*8]
mov eax, ebx
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x403b30
test dl, dl
je 0x403af2
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x403b30
add ecx, 2
add eax, 2
test dl, dl
jne 0x403ad6
xor eax, eax
jmp 0x403b35
push esi
call fcn.0040ab6a
push esi
mov edi, eax
push ebp
push edi
call fcn.00408510
add esp, 0x10
mov byte [edi + esi - 1], 0
jmp 0x4038f4
push esi
call fcn.0040ab6a
push esi
mov edi, eax
push ebp
push edi
call fcn.00408510
add esp, 0x10
mov byte [edi + esi - 1], 0
jmp 0x403942
sbb eax, eax
or eax, 1
test eax, eax
jne 0x403b47
mov dword [esi*8 + 0x42fa7c], 1
lea edi, [eax + 1]
inc esi
cmp esi, dword [0x430278]
jb 0x403ad0
mov ebp, dword [esp + 0x14]
test edi, edi
je 0x403fb2
mov esi, dword [esp + 0x10]
test ebp, ebp
jg 0x403aa9
mov eax, dword [0x430284]
cmp dword [eax], 0
je 0x403cc7
push 0x4257fc
call fcn.00403360
add esp, 4
mov esi, eax
call fcn.0040a8bd
test esi, esi
je 0x403f98
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov dword [eax], 0
nop
cmp dword [esi + 0x144], 0
jne 0x403bc0
push 0x105
push 1
call fcn.0040ab44
add esp, 8
mov dword [esi + 0x144], eax
jmp 0x403bd0
lea eax, [esi + 4]
push eax
push dword [esi]
call ebx
test eax, eax
je 0x403c6e
push 0x105
push 0
push dword [esi + 0x144]
call fcn.00408a90
push 0x104
lea eax, [esi + 0x30]
push eax
push dword [esi + 0x144]
call fcn.0040aa20
mov edi, dword [esi + 0x144]
add esp, 0x18
test edi, edi
je 0x403c84
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403c10
sub ecx, edx
cmp ecx, 4
jb 0x403ba0
lea eax, [edi - 4]
mov edx, str..obj
add eax, ecx
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x403c48
test cl, cl
je 0x403c44
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x403c48
add eax, 2
add edx, 2
test cl, cl
jne 0x403c28
xor eax, eax
jmp 0x403c4d
sbb eax, eax
or eax, 1
test eax, eax
jne 0x403ba0
push edi
push str.RM:__s
call fcn.004010a0
push edi
call fcn.00403530
add esp, 0xc
jmp 0x403ba0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x403c84
call fcn.0040a8bd
mov dword [eax], 0x28
call fcn.0040a8bd
cmp dword [eax], 0
jg 0x403fc7
push dword [esi]
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
jne 0x403cab
call fcn.0040a8bd
mov dword [eax], 0x28
jmp 0x403cc7
mov eax, dword [esi + 0x144]
test eax, eax
je 0x403cbe
push eax
call fcn.0040ab4f
add esp, 4
push esi
call fcn.0040ab4f
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 [0x425f4c]
movups xmm0, xmmword [str.git_rev_parse___short_HEAD]
mov word [esp + 0xa8], ax
mov al, byte [0x425f4e]
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 [0x425f44]
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 0x403e5e
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 0x403e5e
lea eax, [esp + 0x80]
push eax
push str._DGIT_COMMIT_HASH_s
push 0x20
push 0x430298
call fcn.004056e0
add esp, 0x10
mov eax, dword [0x43028c]
cmp dword [eax], 0
je 0x403e74
call fcn.00401b00
call fcn.004020a0
jmp 0x403e8a
mov eax, dword [0x43027c]
cmp dword [eax], 0
je 0x403e85
call fcn.004020a0
jmp 0x403e8a
call fcn.00401b00
mov eax, dword [0x430288]
cmp dword [eax], 0
je 0x403ee8
mov eax, dword [0x43027c]
cmp dword [eax], 0
je 0x403edb
push 0
push str.._freedom_standalone.exe
call fcn.00402770
mov esi, edx
mov edi, eax
push esi
push edi
push 0x425788
call fcn.00402620
push eax
push str.CMD:__s
call fcn.004010a0
push 0
push 0
push esi
push edi
call fcn.004024f0
push eax
call fcn.004037a0
add esp, 0x30
jmp 0x403ee8
push 0x4302b8
call fcn.00402fe0
add esp, 4
mov ecx, dword [esp + 0xac]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004076d6
add esp, 0xa0
ret
push str..old
push esi
call fcn.00402770
push edx
push eax
push 0x4256fe
call fcn.00402620
push eax
push esi
push str.RENAME:__s_____s
call fcn.004010a0
push 0
push str..old
push esi
call fcn.00402770
push edx
push eax
push 0x4256fe
call fcn.00402620
push eax
push esi
call fcn.00403500
add esp, 0x44
push 0
push 0x4260b0
push str.cl.exe
call fcn.00402770
mov esi, edx
mov edi, eax
push esi
push edi
call fcn.00402600
push eax
push str.CMD:__s
call fcn.004010a0
push esi
push edi
call fcn.004025e0
push ebp
push ebx
call fcn.00402600
push eax
push str.CMD:__s
call fcn.004010a0
push ebp
push ebx
call fcn.004025e0
add esp, 0x3c
push 0
call fcn.0040afd6
push dword [eax]
call fcn.0040aa0a
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.0040afd6
call fcn.0040a8bd
push dword [eax]
call fcn.0040aa0a
add esp, 4
push eax
push 0x4257fc
push str.could_not_read_directory__s:__s
call fcn.004010f0
int3