Function at 0x1000cb20
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 3
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x1000cb51
cmp dword [ebp - 0x28], 1
je 0x1000cb5a
cmp dword [ebp - 0x28], 2
je 0x1000cb63
jmp 0x1000cb6c
mov dword [ebp - 0x10], connect
jmp 0x1000cb92
mov dword [ebp - 0x10], 0x40000000
jmp 0x1000cb92
mov dword [ebp - 0x10], 0xc0000000
jmp 0x1000cb92
mov ecx, dword [ebp + 0xc]
push ecx
push str.adb_open:_invalid_options__0x_0x__n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
call dword [sym.imp.MSVCR100.dll__errno]
mov dword [eax], 0x16
or eax, 0xffffffff
jmp 0x1000cd8a
push 0x1000f488
mov ecx, dword [ebp - 0x24]
call fcn.1000bd80
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x1000cbbc
call dword [sym.imp.MSVCR100.dll__errno]
mov dword [eax], 0xc
or eax, 0xffffffff
jmp 0x1000cd8a
mov edx, dword [ebp + 8]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
add eax, 1
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x2c]
mov dl, byte [ecx]
mov byte [ebp - 0x31], dl
add dword [ebp - 0x2c], 1
cmp byte [ebp - 0x31], 0
jne 0x1000cbcb
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x30]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 8], ecx
push 0
push 0
push 0xffffffffffffffff
mov edx, dword [ebp + 8]
push edx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
add eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1000d8c5
add esp, 4
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x14]
lea edx, [ecx + ecx + 2]
push edx
push 0
mov eax, dword [ebp - 4]
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 4]
push edx
push 0xffffffffffffffff
mov eax, dword [ebp + 8]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 3
push 0
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 4]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0xffffffff
jne 0x1000cd34
mov edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp - 0x24]
call fcn.1000be70
mov eax, dword [ebp + 8]
push eax
push str.adb_open:_could_not_open__s:
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 2
je 0x1000ccd4
cmp dword [ebp - 0x3c], 3
je 0x1000ccf6
jmp 0x1000cd15
push 0x1000f5b8
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 4
call dword [sym.imp.MSVCR100.dll__errno]
mov dword [eax], 2
or eax, 0xffffffff
jmp 0x1000cd8a
push 0x1000f5c8
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 4
call dword [sym.imp.MSVCR100.dll__errno]
mov dword [eax], 0x14
or eax, 0xffffffff
jmp 0x1000cd8a
push 0x1000f5d8
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 4
call dword [sym.imp.MSVCR100.dll__errno]
mov dword [eax], 2
or eax, 0xffffffff
jmp 0x1000cd8a
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp - 0x24]
call fcn.1000bd10
push eax
push 0x1000f5e8
push 0x200
mov eax, dword [ebp - 0xc]
add eax, 0x18
push eax
call dword [sym.imp.MSVCR100.dll_sprintf_s]
add esp, 0x14
mov ecx, dword [ebp - 0xc]
push ecx
mov ecx, dword [ebp - 0x24]
call fcn.1000bd10
push eax
mov edx, dword [ebp + 8]
push edx
push str.adb_open:__s___fd__d_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 0xc
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x24]
call fcn.1000bd10
mov esp, ebp
pop ebp
ret 8