Function at 0x40cf60
Capabilities:
Check if file exists
Create thread
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a845e
mov eax, dword fs:[0]
push eax
sub esp, 0x95c
mov eax, dword [0x61cff8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [esi + 0x170]
call fcn.0040f560
xor eax, eax
mov dword [ebp - 0x82c], 7
mov ebx, 2
mov dword [ebp - 0x830], 0
mov word [ebp - 0x840], ax
mov dword [ebp - 4], eax
xor ecx, ecx
mov dword [ebp - 0x814], 7
mov dword [ebp - 0x818], eax
mov word [ebp - 0x828], cx
mov byte [ebp - 4], 1
mov ecx, dword [esi + 0x88]
test cl, 7
je 0x40d100
test cl, 1
je 0x40d009
push 8
push str.Standard
lea ecx, [ebp - 0x828]
call fcn.0040eb90
mov eax, dword [ebp - 0x818]
test byte [esi + 0x88], 2
je 0x40d040
test eax, eax
je 0x40d028
push 1
push 0x5f4074
lea ecx, [ebp - 0x828]
call fcn.0040eb90
push 5
push 0x5f4078
lea ecx, [ebp - 0x828]
call fcn.0040eb90
mov eax, dword [ebp - 0x818]
test byte [esi + 0x88], 4
je 0x40d071
test eax, eax
je 0x40d05f
push 1
push 0x5f4074
lea ecx, [ebp - 0x828]
call fcn.0040eb90
push 7
push str.Split2G
lea ecx, [ebp - 0x828]
call fcn.0040eb90
lea eax, [ebp - 0x828]
mov edx, str.___variant
push eax
lea ecx, [ebp - 0x860]
call fcn.0040ee40
add esp, 4
mov edi, eax
lea eax, [ebp - 0x828]
cmp eax, edi
je 0x40d0de
mov eax, dword [ebp - 0x814]
cmp eax, 8
jb 0x40d0b5
inc eax
lea ecx, [ebp - 0x828]
push eax
push dword [ebp - 0x828]
call fcn.0040b950
xor eax, eax
mov dword [ebp - 0x814], 7
push edi
lea ecx, [ebp - 0x828]
mov dword [ebp - 0x818], 0
mov word [ebp - 0x828], ax
call fcn.004100a0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x84c]
cmp eax, 8
jb 0x40d100
inc eax
lea ecx, [ebp - 0x860]
push eax
push dword [ebp - 0x860]
call fcn.0040b950
cmp dword [esi + 0x1bc], 8
lea edi, [esi + 0x1a8]
jb 0x40d113
mov eax, dword [edi]
jmp 0x40d115
mov eax, edi
push 0x5f4058
push eax
call fcn.005868fb
add esp, 8
test eax, eax
jne 0x40d1df
mov ecx, dword [esi + 0xf4]
test ecx, ecx
je 0x40d13e
mov eax, dword [ecx]
push 0x5f40ac
call dword [eax]
cmp dword [esi + 0x64], 8
lea eax, [esi + 0x50]
jb 0x40d149
mov eax, dword [eax]
push 0
push 0x8000080
push 1
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x68], eax
cmp eax, 0xffffffff
jne 0x40d1d0
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x804
movzx eax, ax
cmp ax, cx
mov ecx, 9
jne 0x40d189
call fcn.00410110
jmp 0x40d18e
call fcn.004102c0
mov edx, eax
cmp word [edx], 0
jne 0x40d19a
xor ecx, ecx
jmp 0x40d1af
mov ecx, edx
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d1a0
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x190]
call fcn.0040f000
lea ecx, [ebp - 0x860]
call fcn.00410470
mov byte [ebp - 4], 3
jmp 0x40d59b
mov dword [esi + 0x1dc], 1
jmp 0x40d4fb
cmp dword [esi + 0xf8], 0
mov dword [esi + 0x8c], 1
jne 0x40d1f8
cmp dword [esi + 0x1c], 0
jne 0x40d206
call fcn.00411510
movzx eax, al
mov dword [esi + 0xf8], eax
cmp dword [edi + 0x14], 8
xorps xmm0, xmm0
movlpd qword [ebp - 0x848], xmm0
jb 0x40d21b
mov eax, dword [edi]
jmp 0x40d21d
mov eax, edi
push 0x5f4050
push eax
call fcn.005868fb
add esp, 8
test eax, eax
jne 0x40d264
mov ebx, dword [esi + 0x40]
mov edx, ebx
and edx, 0x1fffff
mov eax, edx
or eax, 0
je 0x40d264
mov eax, dword [esi + 0x44]
mov ecx, 0x200000
sub ecx, edx
mov edx, 0
sbb edx, edx
add ebx, ecx
mov dword [esi + 0x80], ebx
adc eax, edx
mov dword [esi + 0x84], eax
jmp 0x40d270
mov edx, dword [ebp - 0x844]
mov ecx, dword [ebp - 0x848]
mov eax, ecx
mov dword [ebp - 0x844], 0xa
or eax, edx
je 0x40d2ab
sub esp, 8
push edx
push ecx
lea ecx, [esi + 0x170]
call fcn.0040f350
test al, al
jne 0x40d2ab
push str.extend_range_error
lea ecx, [esi + 0x190]
call fcn.0040ea10
xor esi, esi
jmp 0x40d660
cmp dword [esi + 0xf8], 0
je 0x40d3a8
mov ecx, dword [esi + 0xf4]
test ecx, ecx
je 0x40d2cb
mov eax, dword [ecx]
push str.ck_WeR
call dword [eax]
cmp dword [esi + 0x64], 8
lea eax, [esi + 0x50]
jb 0x40d2d6
mov eax, dword [eax]
lea ecx, [ebp - 0x964]
push 0xfde9
mov dword [ebp - 0x968], ecx
lea ecx, [ebp - 0x968]
push eax
call fcn.00406eb0
mov byte [ebp - 4], 4
cmp dword [edi + 0x14], 8
jb 0x40d2ff
mov edi, dword [edi]
push 0xfde9
lea eax, [ebp - 0x8e0]
push edi
lea ecx, [ebp - 0x8e4]
mov dword [ebp - 0x8e4], eax
call fcn.00406eb0
mov byte [ebp - 4], 5
lea ecx, [esi + 0xfc]
push dword [esi + 0x84]
push dword [esi + 0x80]
push dword [ebp - 0x968]
push dword [ebp - 0x8e4]
call fcn.00411710
test al, al
lea ecx, [ebp - 0x8e0]
mov eax, dword [ebp - 0x8e4]
sete bl
cmp eax, ecx
je 0x40d361
push eax
call fcn.00586a7b
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x964]
mov eax, dword [ebp - 0x968]
cmp eax, ecx
je 0x40d37e
push eax
call fcn.00586a7b
add esp, 4
test bl, bl
je 0x40d399
push str.VBox::CreateImage_Error
lea ecx, [esi + 0x190]
call fcn.0040ea10
xor esi, esi
jmp 0x40d660
mov dword [esi + 0x1dc], 3
jmp 0x40d4f5
cmp dword [esi + 0x20], 8
lea ebx, [esi + 0xc]
jb 0x40d3b5
mov eax, dword [ebx]
jmp 0x40d3b7
mov eax, ebx
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40d407
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x804
cmp ax, cx
mov ecx, 7
jne 0x40d3ef
call fcn.00410110
push eax
lea ecx, [esi + 0x190]
call fcn.0040ea10
xor esi, esi
jmp 0x40d660
call fcn.004102c0
push eax
lea ecx, [esi + 0x190]
call fcn.0040ea10
xor esi, esi
jmp 0x40d660
cmp dword [edi + 0x14], 8
jb 0x40d40f
mov edi, dword [edi]
cmp dword [esi + 0x64], 8
lea eax, [esi + 0x50]
jb 0x40d41a
mov eax, dword [eax]
cmp dword [ebx + 0x14], 8
jb 0x40d422
mov ebx, dword [ebx]
push dword [esi + 0x84]
push dword [esi + 0x80]
push edi
push eax
push ebx
lea eax, [ebp - 0x810]
push str.__s__convertfromraw_stdin___s____format__s__I64d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x1c
lea eax, [ebp - 0x810]
lea ecx, [ebp - 0x840]
push eax
call fcn.0040ea10
cmp dword [ebp - 0x818], 0
je 0x40d477
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x828]
push eax
lea ecx, [ebp - 0x840]
call fcn.0040ecc0
cmp dword [ebp - 0x82c], 8
lea eax, [ebp - 0x840]
push ecx
cmovae eax, dword [ebp - 0x840]
lea ecx, [esi + 0x90]
push eax
call fcn.00410b40
test al, al
jne 0x40d4e0
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x804
movzx eax, ax
cmp ax, cx
mov ecx, 0xa
jne 0x40d4bb
call fcn.00410110
jmp 0x40d4c0
call fcn.004102c0
push eax
lea ecx, [esi + 0x190]
call fcn.0040ea10
lea ecx, [ebp - 0x860]
call fcn.00410470
mov byte [ebp - 4], 6
jmp 0x40d63c
lea ecx, [esi + 0x90]
call fcn.00410ee0
mov dword [esi + 0x1dc], 2
mov ebx, dword [ebp - 0x844]
lea edi, [esi + 0x48]
push edi
lea ecx, [esi + 0x170]
call fcn.0040f260
test al, al
jne 0x40d519
mov eax, dword [esi + 0x40]
mov dword [edi], eax
mov eax, dword [esi + 0x44]
mov dword [edi + 4], eax
push ebx
push dword [esi + 0x130]
lea ecx, [esi + 0x104]
call fcn.0040bfb0
test al, al
jne 0x40d5d4
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x804
movzx eax, ax
cmp ax, cx
mov ecx, 8
jne 0x40d552
call fcn.00410110
jmp 0x40d557
call fcn.004102c0
mov edx, eax
cmp word [edx], 0
jne 0x40d563
xor ecx, ecx
jmp 0x40d57f
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d570
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x190]
call fcn.0040f000
lea ecx, [ebp - 0x860]
call fcn.00410470
mov byte [ebp - 4], 7
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esi + 0x190]
call fcn.0040ecc0
mov eax, dword [ebp - 0x84c]
cmp eax, 8
jb 0x40d657
inc eax
lea ecx, [ebp - 0x860]
push eax
push dword [ebp - 0x860]
call fcn.0040b950
xor esi, esi
jmp 0x40d660
mov eax, dword [0x628b7c]
test eax, eax
mov ecx, dword [sym.imp.KERNEL32.dll_CreateThread]
cmovne ecx, eax
lea eax, [esi + 8]
push eax
push 0
push esi
push 0x4111a0
push 0
push 0
call ecx
mov dword [esi + 4], eax
test eax, eax
jne 0x40d65b
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x804
movzx eax, ax
cmp ax, cx
mov ecx, 0xb
jne 0x40d61c
call fcn.00410110
jmp 0x40d621
call fcn.004102c0
push eax
lea ecx, [esi + 0x190]
call fcn.0040ea10
lea ecx, [ebp - 0x860]
call fcn.00410470
mov byte [ebp - 4], 8
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esi + 0x190]
call fcn.0040ecc0
lea ecx, [ebp - 0x860]
call fcn.0040ba20
xor esi, esi
jmp 0x40d660
mov esi, 1
mov eax, dword [ebp - 0x814]
cmp eax, 8
jb 0x40d67e
inc eax
lea ecx, [ebp - 0x828]
push eax
push dword [ebp - 0x828]
call fcn.0040b950
mov ecx, dword [ebp - 0x82c]
xor eax, eax
mov dword [ebp - 0x814], 7
mov dword [ebp - 0x818], 0
mov word [ebp - 0x828], ax
cmp ecx, 8
jb 0x40d6b9
inc ecx
push ecx
push dword [ebp - 0x840]
lea ecx, [ebp - 0x840]
call fcn.0040b950
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0057e2f0
mov esp, ebp
pop ebp
ret