Function at 0x402ff0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
xor esi, esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x40300c
mov dword [esp], ebx
call sub.msys_1.0.dll_strlen
mov esi, eax
lea eax, [esi + 0x40]
mov dword [esp], eax
call sub.msys_1.0.dll_malloc
test esi, esi
mov edi, eax
jle 0x403254
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msys_1.0.dll_strcpy
mov dword [esp], edi
mov ecx, 0x5c
mov dword [esp + 4], ecx
call sub.msys_1.0.dll_strchr
jmp 0x403055
mov byte [eax], 0x2f
mov edx, 0x5c
inc eax
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msys_1.0.dll_strchr
test eax, eax
jne 0x403040
movsx eax, byte [ebx + esi - 1]
mov dword [esp], 0x406b9a
mov dword [esp + 4], eax
call sub.msys_1.0.dll_strchr
test eax, eax
je 0x40328d
cmp byte [0x409011], 0
jne 0x40326f
mov dword [ebp - 0x10], 0
lea esi, [edi + esi]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x14], 0x406014
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x4030a5
mov dword [ebp - 0x14], 0x406004
call sub.msys_1.0.dll_getpid
mov ecx, dword [ebp - 0x10]
mov edx, 0x406b9d
test ecx, ecx
je 0x4030bb
mov edx, 0x406ba0
mov dword [esp + 0xc], edx
mov ebx, str.connector__u__s.log
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov esi, dword [ebp - 0x20]
mov dword [esp], esi
call sub.msys_1.0.dll_sprintf
mov dword [esp], edi
mov edx, 0x601
mov eax, 0x180
mov dword [esp + 4], edx
mov dword [esp + 8], eax
call sub.msys_1.0.dll_open
mov edx, dword [ebp - 0x14]
test eax, eax
mov dword [edx], eax
js 0x403200
mov eax, 0x180
mov dword [esp + 4], eax
mov ecx, dword [edx]
mov dword [esp], ecx
call sub.msys_1.0.dll_fchmod
call sub.KERNEL32.dll_GetCommandLineW
test eax, eax
mov esi, eax
je 0x403200
mov dword [esp], eax
xor ebx, ebx
call sub.KERNEL32.dll_lstrlenW
mov dword [ebp - 0x18], eax
sub esp, 4
xor edx, edx
mov dword [esp + 0x1c], ebx
xor ecx, ecx
xor ebx, ebx
mov dword [esp + 0x18], edx
xor edx, edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp], 0xfde9
call sub.KERNEL32.dll_WideCharToMultiByte
sub esp, 0x20
test eax, eax
mov ebx, eax
jle 0x403200
mov dword [esp], eax
call sub.msys_1.0.dll_malloc
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4031eb
mov dword [esp + 0x14], ebx
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], esi
xor esi, esi
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
mov dword [esp], 0xfde9
call sub.KERNEL32.dll_WideCharToMultiByte
sub esp, 0x20
test eax, eax
jle 0x4031eb
mov dword [esp + 8], eax
mov esi, dword [ebp - 0x1c]
mov dword [esp + 4], esi
mov edx, dword [ebp - 0x14]
mov ebx, dword [edx]
mov dword [esp], ebx
call sub.msys_1.0.dll_write
mov ecx, 0xc
mov eax, str._n___________n
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov esi, dword [ebp - 0x14]
mov ebx, dword [esi]
mov dword [esp], ebx
call sub.msys_1.0.dll_write
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msys_1.0.dll_free
lea esi, [esi]
lea edi, [edi]
cmp byte [0x409011], 0
jne 0x403230
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 1
jle 0x403090
mov eax, 1
call fcn.00401050
mov dword [ebp + 8], edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp sub.msys_1.0.dll_free
call sub.msys_1.0.dll_getpid
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ecx]
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp + 0xc], ebx
mov dword [esp], str.PID:_u_fopen___s_____i_r_n
call fcn.004012b0
jmp 0x403209
mov word [eax], 0x2f2e
mov esi, 2
mov byte [eax + 2], 0
cmp byte [0x409011], 0
je 0x403083
call sub.msys_1.0.dll_getpid
mov dword [esp + 4], eax
mov dword [esp + 8], edi
mov dword [esp], str.PID:_u_creating_logs_in:__s_r_n
call fcn.004012b0
jmp 0x403083
mov byte [esi + edi], 0x2f
inc esi
jmp 0x403076