Function at 0x40f1e0
Capabilities:
Check if file exists
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x49bed6
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x4be0a0]
xor eax, esp
mov dword [esp + 0x118], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4be0a0]
xor eax, esp
push eax
lea eax, [esp + 0x134]
mov dword fs:[0], eax
mov eax, dword [esp + 0x144]
mov esi, dword [eax + 0x4d4]
lea edi, [eax + 0x4c8]
mov dword [esp + 0xb8], edi
cmp esi, dword [edi + 0x10]
jbe 0x40f23f
call fcn.0047db04
mov ebp, dword [edi]
mov dword [esp + 0x1c], esi
xor ebx, ebx
mov esi, dword [edi + 0x10]
cmp dword [edi + 0xc], esi
jbe 0x40f254
call fcn.0047db04
mov eax, dword [edi]
cmp ebp, ebx
je 0x40f25e
cmp ebp, eax
je 0x40f263
call fcn.0047db04
cmp dword [esp + 0x1c], esi
je 0x40f2c4
cmp ebp, ebx
jne 0x40f2ba
call fcn.0047db04
xor eax, eax
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [eax + 0x10]
jb 0x40f282
call fcn.0047db04
mov edx, dword [esp + 0x1c]
mov esi, dword [edx]
cmp esi, ebx
je 0x40f29a
call fcn.0040fc90
push esi
call fcn.0047d710
add esp, 4
cmp ebp, ebx
jne 0x40f2bf
call fcn.0047db04
xor eax, eax
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [eax + 0x10]
jb 0x40f2b3
call fcn.0047db04
add dword [esp + 0x1c], 4
jmp 0x40f247
mov eax, dword [ebp]
jmp 0x40f274
mov eax, dword [ebp]
jmp 0x40f2a5
mov eax, dword [edi + 0x10]
mov dword [esp + 0x20], eax
cmp dword [edi + 0xc], eax
jbe 0x40f2d5
call fcn.0047db04
mov esi, dword [edi + 0xc]
mov ebp, dword [edi]
cmp esi, dword [edi + 0x10]
jbe 0x40f2e4
call fcn.0047db04
mov edx, dword [esp + 0x20]
mov eax, dword [edi]
push edx
push ebp
push esi
push eax
lea eax, [esp + 0xa4]
push eax
mov esi, edi
call fcn.00411ad0
push 6
mov ebp, 0xf
push str.common
lea ecx, [esp + 0xc8]
mov dword [esp + 0xe0], ebp
mov dword [esp + 0xdc], ebx
mov byte [esp + 0xcc], bl
call fcn.00404770
lea ecx, [esp + 0xdc]
push ecx
lea ecx, [esp + 0xc4]
mov dword [esp + 0x140], ebx
call fcn.004084f0
add esp, 4
mov esi, 0x10
mov byte [esp + 0x13c], 2
cmp dword [esp + 0xd8], esi
jb 0x40f36e
mov edx, dword [esp + 0xc4]
push edx
call fcn.0047d710
add esp, 4
push 0xe
push str.AddCustomTools
lea ecx, [esp + 0x80]
mov dword [esp + 0xe0], ebp
mov dword [esp + 0xdc], ebx
mov byte [esp + 0xcc], bl
mov dword [esp + 0x98], ebp
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], bl
call fcn.00404770
lea eax, [esp + 0x17]
push eax
lea ecx, [esp + 0x7c]
push ecx
mov byte [esp + 0x144], 3
lea ecx, [esp + 0xe4]
mov byte [esp + 0x1f], bl
call fcn.00408980
add esp, 8
test al, al
je 0x40f3e1
cmp byte [esp + 0x17], bl
je 0x40f3e1
mov eax, 1
jmp 0x40f3e3
xor eax, eax
cmp al, bl
sete byte [esp + 0x17]
cmp dword [esp + 0x90], esi
jb 0x40f400
mov edx, dword [esp + 0x7c]
push edx
call fcn.0047d710
add esp, 4
cmp byte [esp + 0x17], bl
jne 0x40fc21
and dword [esp + 0xa4], 0xfffffe00
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xac], ebx
mov dword [esp + 0xb0], ebx
mov byte [esp + 0x13c], 5
push 0xb
push str.CustomTools
lea ecx, [esp + 0x80]
mov dword [esp + 0x98], ebp
mov dword [esp + 0x94], ebx
mov byte [esp + 0x84], bl
call fcn.00404770
lea eax, [esp + 0x78]
push eax
lea edi, [esp + 0xa0]
lea ecx, [esp + 0xe0]
mov byte [esp + 0x140], 6
call fcn.00408a70
add esp, 4
test al, al
sete byte [esp + 0x17]
mov byte [esp + 0x13c], 5
cmp dword [esp + 0x90], esi
jb 0x40f4a2
mov ecx, dword [esp + 0x7c]
push ecx
call fcn.0047d710
add esp, 4
cmp byte [esp + 0x17], bl
jne 0x40fc0d
cmp byte [esp + 0xa4], 6
jne 0x40fc0d
push 4
xor edx, edx
mov edi, 7
push 0x4a24f0
lea esi, [esp + 0x80]
mov dword [esp + 0x98], edi
mov dword [esp + 0x94], ebx
mov word [esp + 0x84], dx
call fcn.004028e0
mov eax, esi
push eax
lea ecx, [esp + 0x114]
push ecx
mov byte [esp + 0x144], 7
call fcn.004059b0
add esp, 8
mov byte [esp + 0x13c], 9
cmp dword [esp + 0x90], 8
jb 0x40f524
mov edx, dword [esp + 0x7c]
push edx
call fcn.0047d710
add esp, 4
xor eax, eax
mov dword [esp + 0x90], edi
mov dword [esp + 0x8c], ebx
mov word [esp + 0x7c], ax
xor edi, edi
movsx eax, byte [esp + 0xa4]
mov dword [esp + 0x20], edi
cmp eax, 7
ja case.0x40f550.0
jmp dword [eax*4 + 0x40fc64]
mov eax, dword [esp + 0x9c]
cmp dword [eax + 0x1c], ebx
je case.0x40f550.0
mov ecx, dword [eax + 0x18]
mov eax, dword [eax]
lea esi, [esp + 0x94]
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], ecx
call fcn.0046c847
mov eax, dword [esp + 0x94]
cmp eax, ebx
jne 0x40f5af
call fcn.0047db04
xor eax, eax
mov esi, dword [esp + 0x98]
cmp esi, dword [eax + 0x18]
jne 0x40f5a9
call fcn.0047db04
mov eax, dword [esi + 0x14]
inc eax
jmp 0x40f5bd
mov eax, dword [eax]
jmp 0x40f598
mov ecx, dword [esp + 0x9c]
mov eax, dword [ecx + 0x1c]
cmp edi, eax
jae case.0x40f550.0
push edi
lea edx, [esp + 0xa0]
push edx
call fcn.00469e2e
push 0xb0
mov edi, eax
call fcn.0047d804
add esp, 4
cmp eax, ebx
je 0x40f643
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov dword [eax + 0x1c], ebx
mov ecx, 7
mov dword [eax + 0x20], ecx
xor edx, edx
mov word [eax + 0xc], dx
mov dword [eax + 0x3c], ecx
mov dword [eax + 0x38], ebx
mov word [eax + 0x28], dx
mov dword [eax + 0x58], ecx
mov dword [eax + 0x54], ebx
mov word [eax + 0x44], dx
mov dword [eax + 0x74], ecx
mov dword [eax + 0x70], ebx
mov word [eax + 0x60], dx
mov dword [eax + 0x90], ecx
mov dword [eax + 0x8c], ebx
mov word [eax + 0x7c], dx
mov dword [eax + 0xac], ecx
xor ecx, ecx
mov dword [eax + 0xa8], ebx
mov word [eax + 0x98], cx
mov ebp, eax
jmp 0x40f645
xor ebp, ebp
push 4
mov esi, 0xf
push str.type
lea ecx, [esp + 0x2c]
mov dword [esp + 0xc4], ebp
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], ebx
mov byte [esp + 0x30], bl
call fcn.00404770
sub esp, 0x1c
mov byte [esp + 0x158], 0xa
mov ecx, esp
mov dword [esp + 0x34], esp
push ebx
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push 0x4a16c8
mov byte [ecx + 4], bl
call fcn.00404770
lea edx, [esp + 0x5c]
push edx
lea esi, [esp + 0x44]
call fcn.00405c50
add esp, 0x20
cmp dword [esp + 0x128], 0x10
mov ecx, dword [esp + 0x114]
jae 0x40f6bb
lea ecx, [esp + 0x114]
mov esi, dword [eax + 0x14]
mov edx, esi
cmp edx, esi
jae 0x40f6c4
mov edx, dword [esp + 0x124]
cmp esi, edx
jae 0x40f6d1
mov edx, esi
cmp dword [eax + 0x18], 0x10
jb 0x40f6dc
mov eax, dword [eax + 4]
jmp 0x40f6df
add eax, 4
push edx
mov edx, eax
call fcn.004075d0
add esp, 4
cmp eax, ebx
jne 0x40f707
mov eax, dword [esp + 0x124]
cmp esi, eax
jae 0x40f6fe
or eax, 0xffffffff
jmp 0x40f707
xor ecx, ecx
cmp esi, eax
setne cl
mov eax, ecx
xor edx, edx
cmp eax, ebx
sete dl
mov esi, 0x10
mov dword [ebp + 4], edx
cmp dword [esp + 0x58], esi
jb 0x40f729
mov eax, dword [esp + 0x44]
push eax
call fcn.0047d710
add esp, 4
mov byte [esp + 0x13c], 9
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
cmp dword [esp + 0x3c], esi
jb 0x40f754
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0047d710
add esp, 4
push 4
mov esi, 0xf
push str.desc
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], ebx
mov byte [esp + 0x30], bl
call fcn.00404770
sub esp, 0x1c
mov byte [esp + 0x158], 0xc
mov ecx, esp
mov dword [esp + 0x34], esp
push ebx
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push 0x4a16c8
mov byte [ecx + 4], bl
call fcn.00404770
lea edx, [esp + 0x78]
push edx
lea esi, [esp + 0x44]
call fcn.00405c50
push eax
lea ecx, [esp + 0x64]
mov byte [esp + 0x160], 0xd
call fcn.00403040
add esp, 0x24
push 0xffffffffffffffff
push ebx
lea ecx, [ebp + 0x78]
push eax
mov eax, ecx
mov byte [esp + 0x148], 0xe
call fcn.00402830
cmp dword [esp + 0x58], 8
jb 0x40f7e7
mov eax, dword [esp + 0x44]
push eax
call fcn.0047d710
add esp, 4
xor ecx, ecx
mov esi, 0x10
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], ebx
mov word [esp + 0x44], cx
cmp dword [esp + 0x74], esi
jb 0x40f812
mov edx, dword [esp + 0x60]
push edx
call fcn.0047d710
add esp, 4
mov byte [esp + 0x13c], 9
mov dword [esp + 0x74], 0xf
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
cmp dword [esp + 0x3c], esi
jb 0x40f83d
mov eax, dword [esp + 0x28]
push eax
call fcn.0047d710
add esp, 4
push 4
mov esi, 0xf
push 0x4a2058
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], ebx
mov byte [esp + 0x30], bl
call fcn.00404770
sub esp, 0x1c
mov byte [esp + 0x158], 0xf
mov ecx, esp
mov dword [esp + 0x34], esp
push ebx
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push 0x4a16c8
mov byte [ecx + 4], bl
call fcn.00404770
lea ecx, [esp + 0x5c]
push ecx
lea esi, [esp + 0x44]
call fcn.00405c50
push eax
lea ecx, [esp + 0x80]
mov byte [esp + 0x160], 0x10
call fcn.00403040
add esp, 0x24
push 0xffffffffffffffff
push ebx
lea ecx, [ebp + 8]
push eax
mov eax, ecx
mov byte [esp + 0x148], 0x11
call fcn.00402830
cmp dword [esp + 0x74], 8
jb 0x40f8d3
mov edx, dword [esp + 0x60]
push edx
call fcn.0047d710
add esp, 4
xor eax, eax
mov esi, 0x10
mov dword [esp + 0x74], 7
mov dword [esp + 0x70], ebx
mov word [esp + 0x60], ax
cmp dword [esp + 0x58], esi
jb 0x40f8fe
mov ecx, dword [esp + 0x44]
push ecx
call fcn.0047d710
add esp, 4
mov byte [esp + 0x13c], 9
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
cmp dword [esp + 0x3c], esi
jb 0x40f929
mov edx, dword [esp + 0x28]
push edx
call fcn.0047d710
add esp, 4
push 3
mov esi, 0xf
push 0x4a24fc
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], ebx
mov byte [esp + 0x30], bl
call fcn.00404770
sub esp, 0x1c
mov byte [esp + 0x158], 0x12
mov ecx, esp
mov dword [esp + 0x34], esp
push ebx
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push 0x4a16c8
mov byte [ecx + 4], bl
call fcn.00404770
lea eax, [esp + 0x5c]
push eax
lea esi, [esp + 0x44]
call fcn.00405c50
push eax
lea ecx, [esp + 0x80]
mov byte [esp + 0x160], 0x13
call fcn.00403040
add esp, 0x24
push 0xffffffffffffffff
push ebx
lea ecx, [ebp + 0x40]
push eax
mov eax, ecx
mov byte [esp + 0x148], 0x14
call fcn.00402830
cmp dword [esp + 0x74], 8
jb 0x40f9bf
mov ecx, dword [esp + 0x60]
push ecx
call fcn.0047d710
add esp, 4
xor edx, edx
mov esi, 0x10
mov dword [esp + 0x74], 7
mov dword [esp + 0x70], ebx
mov word [esp + 0x60], dx
cmp dword [esp + 0x58], esi
jb 0x40f9ea
mov eax, dword [esp + 0x44]
push eax
call fcn.0047d710
add esp, 4
mov byte [esp + 0x13c], 9
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
cmp dword [esp + 0x3c], esi
jb 0x40fa15
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0047d710
add esp, 4
push 5
mov esi, 0xf
push str.param
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], ebx
mov byte [esp + 0x30], bl
call fcn.00404770
sub esp, 0x1c
mov byte [esp + 0x158], 0x15
mov ecx, esp
mov dword [esp + 0x34], esp
push ebx
mov dword [ecx + 0x18], esi
mov dword [ecx + 0x14], ebx
push 0x4a16c8
mov byte [ecx + 4], bl
call fcn.00404770
lea edx, [esp + 0x5c]
push edx
lea esi, [esp + 0x44]
call fcn.00405c50
push eax
lea ecx, [esp + 0x80]
mov byte [esp + 0x160], 0x16
call fcn.00403040
add esp, 0x24
push 0xffffffffffffffff
push ebx
lea ecx, [ebp + 0x94]
push eax
mov eax, ecx
mov byte [esp + 0x148], 0x17
call fcn.00402830
cmp dword [esp + 0x74], 8
jb 0x40faae
mov eax, dword [esp + 0x60]
push eax
call fcn.0047d710
add esp, 4
xor ecx, ecx
mov esi, 0x10
mov dword [esp + 0x74], 7
mov dword [esp + 0x70], ebx
mov word [esp + 0x60], cx
cmp dword [esp + 0x58], esi
jb 0x40fad9
mov edx, dword [esp + 0x44]
push edx
call fcn.0047d710
add esp, 4
mov byte [esp + 0x13c], 9
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
cmp dword [esp + 0x3c], esi
jb 0x40fb04
mov eax, dword [esp + 0x28]
push eax
call fcn.0047d710
add esp, 4
push 0xffffffffffffffff
push ebx
lea edi, [ebp + 8]
lea eax, [ebp + 0x24]
push edi
call fcn.00402830
cmp dword [ebp + 4], 1
jne 0x40fb25
push 0xb
push 0x4a2500
jmp 0x40fbb3
cmp dword [ebp + 0x58], 8
lea esi, [ebp + 0x40]
jb 0x40fb33
mov eax, dword [esi + 4]
jmp 0x40fb36
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40fba7
push esi
mov edx, edi
lea ecx, [esp + 0xf8]
call fcn.00407360
add esp, 4
push 0xffffffffffffffff
push ebx
lea ecx, [ebp + 0x5c]
push eax
mov eax, ecx
mov byte [esp + 0x148], 0x18
call fcn.00402830
mov byte [esp + 0x13c], 9
cmp dword [esp + 0x10c], 8
jb 0x40fb8b
mov ecx, dword [esp + 0xf8]
push ecx
call fcn.0047d710
add esp, 4
xor edx, edx
mov dword [esp + 0x10c], 7
mov dword [esp + 0x108], ebx
mov word [esp + 0xf8], dx
cmp dword [ebp + 0x70], ebx
jne 0x40fbbb
push 0xd
push str.localtool.png
lea esi, [ebp + 0x5c]
call fcn.004028e0
mov edi, dword [esp + 0xb8]
lea eax, [esp + 0xbc]
push eax
call fcn.00411780
mov edi, dword [esp + 0x20]
inc edi
mov ebp, 0xf
jmp 0x40f53b
cmp dword [esp + 0x128], 0x10
jb 0x40fbf8
mov ecx, dword [esp + 0x114]
push ecx
call fcn.0047d710
add esp, 4
mov dword [esp + 0x128], ebp
mov dword [esp + 0x124], ebx
mov byte [esp + 0x114], bl
lea esi, [esp + 0x9c]
mov byte [esp + 0x13c], 2
call fcn.0046941b
lea esi, [esp + 0xdc]
mov dword [esp + 0x13c], 0xffffffff
call fcn.0046941b
mov ecx, dword [esp + 0x134]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.0047d444
add esp, 0x12c
ret 4