Function at 0x401000
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43995e
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x449260]
xor eax, esp
mov dword [esp + 0x268], eax
push ebx
push esi
push edi
mov eax, dword [0x449260]
xor eax, esp
push eax
lea eax, [esp + 0x280]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x288], ebx
mov edi, 7
xor ecx, ecx
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], ebx
mov word [esp + 0x50], cx
mov ecx, dword [ebp + 8]
mov byte [esp + 0x288], 1
cmp ecx, 1
jne 0x401295
push 0x206
lea eax, [esp + 0x72]
xor edx, edx
push ebx
push eax
mov word [esp + 0x78], dx
call fcn.00427c90
add esp, 0xc
push 0x104
lea ecx, [esp + 0x70]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x6c]
push 0x5c
push edx
call fcn.0042109c
add esp, 8
cmp eax, ebx
jne 0x401119
push str.not_a_valid_directory_n
call fcn.004210ca
add esp, 4
cmp dword [esp + 0x64], 8
jb 0x4010eb
mov eax, dword [esp + 0x50]
push eax
call fcn.00420fa6
add esp, 4
lea edx, [esp + 0x30]
xor ecx, ecx
push edx
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov word [esp + 0x54], cx
mov dword [esp + 0x28c], 0xffffffff
call fcn.00401aa0
mov eax, 0xfffffffe
jmp 0x40131e
push str._replays
lea edx, [esp + 0x70]
xor ecx, ecx
push edx
mov word [eax], cx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov dword [esp + 0x2c], vtable.CFileHelper.0
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
push ebx
lea eax, [esp + 0x1c]
push eax
push str..mlr
lea ecx, [esp + 0x78]
push ecx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x298], 3
call fcn.00412e30
push str.select_a_replay_file:__n
call fcn.004210ca
add esp, 4
push str.index_t_tfile_n
call fcn.004210ca
mov ecx, dword [esp + 0x20]
sub ecx, dword [esp + 0x1c]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
add esp, 4
xor edi, edi
cmp esi, ebx
jle 0x4011d6
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x18]
cmp dword [eax + 0x14], 8
jb 0x4011b2
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.00401960
push eax
push edi
push str._d_t_t_s_n
call fcn.004210ca
add dword [esp + 0x20], 0x1c
inc edi
add esp, 0xc
cmp edi, esi
jl 0x4011a2
push str.input_index:
call fcn.004210ca
add esp, 4
lea edx, [esp + 0x28]
push edx
push 0x43fcd0
mov dword [esp + 0x30], ebx
call fcn.004216e4
mov eax, dword [esp + 0x30]
add esp, 8
cmp eax, esi
jge 0x401247
mov edx, dword [esp + 0x18]
lea ecx, [eax*8]
sub ecx, eax
lea eax, [edx + ecx*4]
push ebx
push eax
or eax, 0xffffffff
lea edi, [esp + 0x58]
call fcn.00401440
cmp dword [esp + 0x64], 8
mov eax, dword [esp + 0x50]
jae 0x40122c
mov eax, edi
push eax
lea eax, [esp + 0x34]
push eax
call fcn.00401960
push eax
push str.replay_file:__s_n
call fcn.004210ca
add esp, 8
jmp 0x401254
push str.input_index_err_n
call fcn.004210ca
add esp, 4
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x401272
mov edi, dword [esp + 0x1c]
call fcn.00401380
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00420fa6
add esp, 4
mov byte [esp + 0x288], 1
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x2c], vtable.CFileHelper.0
mov edi, 7
jmp 0x4012bb
cmp ecx, 2
jne 0x4012d7
mov eax, dword [eax + 4]
mov ecx, eax
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x4012a2
sub ecx, esi
sar ecx, 1
push ecx
lea ecx, [esp + 0x54]
call fcn.00401700
cmp dword [esp + 0x60], ebx
je 0x4012d7
cmp dword [esp + 0x64], 8
mov eax, dword [esp + 0x50]
jae 0x4012d0
lea eax, [esp + 0x50]
call fcn.00402810
jmp 0x4012e4
push str.file_path_is_empty_n
call fcn.004210ca
add esp, 4
cmp dword [esp + 0x64], 8
jb 0x4012f8
mov edx, dword [esp + 0x50]
push edx
call fcn.00420fa6
add esp, 4
lea ecx, [esp + 0x30]
xor eax, eax
push ecx
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov word [esp + 0x54], ax
mov dword [esp + 0x28c], 0xffffffff
call fcn.00401aa0
xor eax, eax
mov ecx, dword [esp + 0x280]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.00420fb1
mov esp, ebp
pop ebp
ret