Function at 0x4037a0
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x4a9fa7
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
mov eax, dword [0x4c8630]
xor eax, esp
mov dword [esp + 0xb0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4c8630]
xor eax, esp
push eax
lea eax, [esp + 0xcc]
mov dword fs:[0], eax
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40386e
mov eax, dword [ecx + 0x2c]
mov eax, dword [eax]
mov esi, dword [ecx + 0x18]
xor ebp, ebp
mov ebx, eax
mov edi, edi
mov edi, dword [ecx + 0x2c]
mov eax, dword [ecx + 0x18]
test esi, esi
je 0x40380e
cmp esi, eax
je 0x403813
call fcn.004897c3
cmp ebx, edi
je 0x40386e
test esi, esi
jne 0x403866
call fcn.004897c3
xor eax, eax
cmp ebx, dword [eax + 0x14]
jne 0x40382c
call fcn.004897c3
mov eax, dword [ebx + 8]
test eax, eax
je 0x403849
mov ecx, dword [eax + 0xcc]
test ecx, ecx
je 0x403849
mov ecx, dword [ecx]
cmp ecx, ebp
jbe 0x403849
mov ebp, ecx
mov dword [esp + 0x1c], eax
test esi, esi
jne 0x40386a
call fcn.004897c3
xor eax, eax
cmp ebx, dword [eax + 0x14]
jne 0x40385e
call fcn.004897c3
mov ebx, dword [ebx]
mov ecx, dword [esp + 0x20]
jmp 0x403800
mov eax, dword [esi]
jmp 0x403822
mov eax, dword [esi]
jmp 0x403854
push 0x6c
call fcn.00489136
add esp, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0xd4], 0
test eax, eax
je 0x403893
push eax
call fcn.00407420
jmp 0x403895
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0xd4], 0xffffffff
test eax, eax
je 0x403cf0
call fcn.004076d0
push eax
call fcn.00407b20
mov esi, eax
lea eax, [esp + 0x64]
push eax
mov dword [esp + 0x18], esi
call fcn.0041ff40
push esi
push str.Note_d.json
lea edi, [esp + 0x6c]
mov dword [esp + 0xdc], 1
call fcn.004206c0
add esp, 8
lea ecx, [esp + 0x94]
push ecx
call fcn.0041ff40
lea esi, [esp + 0x94]
mov byte [esp + 0xd4], 2
call fcn.00406750
cmp byte [esp + 0xbe], 0
lea eax, [esp + 0x98]
jne 0x40391d
mov eax, dword [esp + 0xb8]
add eax, 4
push eax
lea edx, [esp + 0x38]
push edx
call fcn.004200b0
mov byte [esp + 0xd4], 3
cmp byte [esp + 0x8e], 0
lea eax, [esp + 0x68]
jne 0x403948
mov eax, dword [esp + 0x88]
add eax, 4
je 0x403968
cmp word [eax], 0x2e
jne 0x40395f
push eax
lea eax, [esp + 0x38]
call fcn.004202a0
jmp 0x403968
lea esi, [esp + 0x34]
call fcn.004209a0
mov ebp, 2
lea ecx, [ecx]
cmp byte [esp + 0x5e], 0
lea eax, [esp + 0x38]
jne 0x40397f
mov eax, dword [esp + 0x58]
add eax, 4
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403a81
cmp byte [esp + 0xbe], 0
lea ebx, [esp + 0x98]
jne 0x4039a9
mov ebx, dword [esp + 0xb8]
add ebx, 4
jne 0x4039b3
mov ebx, 0x4b3154
mov eax, ebx
lea edx, [eax + 2]
jmp 0x4039c0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4039c0
sub eax, edx
sar eax, 1
lea edi, [eax + 1]
mov dword [esp + 0x34], eax
mov eax, edi
lea esi, [esp + 0x38]
call fcn.004208d0
cmp byte [esp + 0x5e], 0
mov eax, esi
jne 0x4039ee
mov eax, dword [esp + 0x58]
lea ecx, [edi + edi]
push ecx
add eax, 4
push ebx
push eax
call fcn.0048b710
mov edx, dword [esp + 0x20]
add esp, 0xc
push ebp
push edx
push str.Note_d___d_.json
lea edi, [esp + 0x70]
call fcn.004206c0
add esp, 0xc
cmp byte [esp + 0x8e], 0
lea eax, [esp + 0x68]
jne 0x403a2b
mov eax, dword [esp + 0x88]
lea esi, [eax + 4]
test esi, esi
je 0x403a7b
cmp word [esi], 0x2e
je 0x403a71
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x403a5a
cmp byte [esp + 0x5e], 0
lea eax, [esp + 0x38]
jne 0x403a4f
mov eax, dword [esp + 0x58]
movzx eax, word [eax + ecx*2 + 2]
cmp ax, 0x5c
je 0x403a68
push 0x4b94f8
lea eax, [esp + 0x38]
call fcn.004202a0
cmp word [esi], 0x5c
jne 0x403a71
add esi, 2
push esi
lea eax, [esp + 0x38]
call fcn.004202a0
inc ebp
jmp 0x403970
mov ebp, dword [esp + 0x20]
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
push ebp
lea esi, [esp + 0x28]
mov dword [esp + 0x28], 0
call fcn.00403530
cmp byte [esp + 0x5e], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
lea eax, [esp + 0x38]
jne 0x403ac2
mov eax, dword [esp + 0x58]
lea ebx, [eax + 4]
test ebx, ebx
jne 0x403ace
mov ebx, 0x4b3154
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403ad3
mov esi, dword [esp + 0x18]
sub eax, edx
sar eax, 1
mov dword [esi + 0x3c], eax
lea edi, [eax + 1]
add esi, 0x40
mov eax, edi
call fcn.004208d0
cmp byte [esi + 0x26], 0
jne 0x403aff
mov esi, dword [esi + 0x20]
lea edx, [edi + edi]
push edx
lea eax, [esi + 4]
push ebx
push eax
call fcn.0048b710
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
add esp, 0xc
push 0xf4
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
call fcn.00489136
add esp, 4
mov dword [esp + 0x14], eax
mov byte [esp + 0xd4], 4
test eax, eax
je 0x403b4a
mov esi, eax
call fcn.00404f50
mov ebx, eax
jmp 0x403b4c
xor ebx, ebx
mov byte [esp + 0xd4], 3
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x403c4e
mov edi, dword [ebp + 0x34]
mov eax, dword [esp + 0x18]
call fcn.00405070
push 1
test eax, eax
je 0x403c46
call fcn.00403110
mov ecx, dword [esp + 0x18]
call fcn.004075d0
mov esi, dword [ebp + 0x2c]
mov ecx, dword [esi + 4]
lea ebx, [ebp + 0x18]
lea eax, [esp + 0x14]
push eax
push ecx
push esi
call fcn.00407cd0
mov ecx, ebx
mov edi, eax
call fcn.00414790
mov eax, dword [esp + 0x18]
mov dword [esi + 4], edi
mov edx, dword [edi + 4]
mov dword [edx], edi
mov dword [esp + 0x14], eax
call fcn.004076d0
mov ebx, eax
mov esi, dword [ebx + 0x14]
mov edx, dword [esi + 4]
lea ecx, [esp + 0x14]
push ecx
push edx
push esi
call fcn.00407cd0
mov ecx, ebx
mov edi, eax
call fcn.00414790
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
cmp byte [esp + 0x5e], 0
jne 0x403bf8
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x38]
cmp eax, ecx
je 0x403bf8
push eax
call fcn.0048a268
add esp, 4
cmp byte [esp + 0xbe], 0
jne 0x403c1d
mov eax, dword [esp + 0xb8]
lea edx, [esp + 0x98]
cmp eax, edx
je 0x403c1d
push eax
call fcn.0048a268
add esp, 4
cmp byte [esp + 0x8e], 0
jne 0x403c3f
mov eax, dword [esp + 0x88]
lea ecx, [esp + 0x68]
cmp eax, ecx
je 0x403c3f
push eax
call fcn.0048a268
add esp, 4
mov al, 1
jmp 0x403cf2
mov edx, dword [ebx]
mov eax, dword [edx]
mov ecx, ebx
call eax
mov esi, dword [esp + 0x18]
cmp byte [esi + 0x66], 0
lea eax, [esi + 0x40]
jne 0x403c6b
mov ecx, dword [eax + 0x20]
cmp ecx, eax
je 0x403c6b
push ecx
call fcn.0048a268
add esp, 4
cmp byte [esi + 0x36], 0
lea eax, [esi + 0x10]
jne 0x403c84
mov ecx, dword [eax + 0x20]
cmp ecx, eax
je 0x403c84
push ecx
call fcn.0048a268
add esp, 4
push esi
call fcn.00488f48
add esp, 4
cmp byte [esp + 0x5e], 0
jne 0x403ca9
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x38]
cmp eax, ecx
je 0x403ca9
push eax
call fcn.0048a268
add esp, 4
cmp byte [esp + 0xbe], 0
jne 0x403cce
mov eax, dword [esp + 0xb8]
lea edx, [esp + 0x98]
cmp eax, edx
je 0x403cce
push eax
call fcn.0048a268
add esp, 4
cmp byte [esp + 0x8e], 0
jne 0x403cf0
mov eax, dword [esp + 0x88]
lea ecx, [esp + 0x68]
cmp eax, ecx
je 0x403cf0
push eax
call fcn.0048a268
add esp, 4
xor al, al
mov ecx, dword [esp + 0xcc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.00488f53
add esp, 0xc4
ret 4