Function at 0x1003af90
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, eax
xor eax, eax
xor esi, esi
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
cmp dword [edi], eax
jle 0x1003b045
mov ecx, dword [edi + 4]
mov ebx, dword [edi]
add ecx, 4
mov edx, dword [ecx]
test edx, edx
je 0x1003afcd
cmp byte [edx + 8], 2
jne 0x1003afcd
mov esi, 1
cmp eax, esi
je 0x1003afcd
inc dword [ebp - 0xc]
inc eax
add ecx, 0x18
cmp eax, ebx
jl 0x1003afb5
test esi, esi
je 0x1003b045
mov ecx, dword [edi + 0x64]
test ecx, ecx
je 0x1003b045
mov eax, dword [edi + 0x30]
mov esi, 0xb5357930
cmp eax, 0xf03b7906
jne 0x1003aff8
mov dword [edi + 0x30], 0xa029a697
jmp 0x1003b006
cmp eax, 0xa029a697
jne 0x1003b006
or dword [edi + 8], 4
mov dword [edi + 0x30], esi
mov eax, dword [edi + 0x60]
push eax
call ecx
mov ecx, dword [edi + 0x30]
add esp, 4
mov dword [ebp - 8], eax
cmp ecx, 0xa029a697
jne 0x1003b026
mov dword [edi + 0x30], 0xf03b7906
jmp 0x1003b035
cmp ecx, 0xf03b7906
jne 0x1003b035
or dword [edi + 8], 4
mov dword [edi + 0x30], esi
test eax, eax
je 0x1003b045
mov eax, 0x13
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 4]
mov ecx, dword [edx + 4]
mov eax, dword [ecx + 4]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x4c]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003b056
sub eax, esi
je 0x1003b34c
cmp dword [ebp - 0xc], 1
jle 0x1003b34c
mov edx, dword [edx + 4]
mov ecx, dword [edx + 4]
mov edx, dword [ecx]
mov ecx, dword [edx + 0x4c]
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], eax
test eax, eax
je 0x1003b092
push eax
call fcn.1009cc76
add esp, 4
lea edx, [ebp - 0x14]
push edx
mov ecx, 4
call fcn.10053040
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
add esp, 4
and eax, 0x7fffffff
push eax
push ecx
push str._s_mj_08X
call fcn.10046b10
add esp, 0xc
mov dword [ebp - 8], eax
test eax, eax
je 0x1003b10c
mov ecx, eax
call fcn.1003c340
mov esi, eax
test esi, esi
je 0x1003b0ee
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ebx, ebx
cmp eax, 0xffffffff
push esi
setne bl
call fcn.1009cc76
mov esi, dword [ebp - 8]
add esp, 4
jmp 0x1003b100
mov esi, dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ebx, ebx
cmp eax, 0xffffffff
setne bl
test ebx, ebx
je 0x1003b118
mov eax, dword [ebp - 8]
jmp 0x1003b085
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea edx, [ebp - 4]
push edx
push esi
call fcn.1003c6f0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x1003b33a
cmp dword [edi], ebx
jle 0x1003b1a6
mov dword [ebp - 0xc], ebx
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + eax + 4]
cmp ebx, 1
je 0x1003b19a
test eax, eax
je 0x1003b19a
cmp byte [eax + 8], 2
jne 0x1003b19a
mov edx, dword [eax + 4]
mov eax, dword [edx]
mov edx, dword [eax + 0x50]
cmp byte [edx], 0
je 0x1003b19a
cmp dword [ebp - 0x10], 0
jne 0x1003b171
cmp byte [eax + 7], 0
jne 0x1003b171
mov dword [ebp - 0x10], 1
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1003b176
mov ecx, dword [ebp - 4]
sub eax, esi
mov esi, dword [ecx]
inc eax
push eax
mov eax, dword [esi + 0xc]
push edx
push ecx
call eax
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1003b2c6
add dword [ebp - 0xc], 0x18
inc ebx
cmp ebx, dword [edi]
jl 0x1003b138
mov esi, dword [ebp - 8]
mov ecx, dword [edi + 4]
mov edx, dword [ecx + 4]
mov eax, dword [edx + 4]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x54]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
push ecx
call eax
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1003b31f
cmp dword [ebp - 0x10], eax
je 0x1003b1eb
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
push ebx
push eax
call edx
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1003b31f
xor eax, eax
mov dword [ebp - 0xc], eax
cmp dword [edi], eax
jle 0x1003b265
mov dword [ebp - 0x10], eax
jmp 0x1003b200
mov eax, dword [edi + 4]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + eax + 4]
test eax, eax
je 0x1003b256
cmp byte [eax + 8], 2
jne 0x1003b256
mov ebx, dword [eax + 4]
cmp byte [ebx + 0x12], 0
mov dword [ebp - 0x14], 0
je 0x1003b23a
lea edx, [ebp - 0x14]
push edx
call fcn.10030a00
mov esi, eax
add esp, 4
test esi, esi
jne 0x1003b2f6
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
push eax
mov eax, dword [ebx]
push ecx
call fcn.10050540
mov esi, eax
add esp, 8
test esi, esi
jne 0x1003b2f6
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x10], 0x18
inc eax
mov dword [ebp - 0xc], eax
cmp eax, dword [edi]
jl 0x1003b200
mov eax, dword [ebp - 4]
xor ebx, ebx
cmp eax, ebx
je 0x1003b27b
mov eax, dword [eax]
mov edx, dword [eax]
lea ecx, [ebp - 4]
push ecx
call edx
add esp, 4
mov esi, dword [ebp - 8]
mov eax, esi
call fcn.1003c500
push esi
call fcn.1009cc76
add esp, 4
xor esi, esi
mov dword [ebp - 8], ebx
cmp dword [edi], ebx
jle 0x1003b3e7
jmp 0x1003b2a0
mov eax, dword [edi + 4]
mov eax, dword [ebx + eax + 4]
test eax, eax
je 0x1003b2b4
push eax
call fcn.10030cf0
add esp, 4
inc esi
add ebx, 0x18
cmp esi, dword [edi]
jl 0x1003b2a0
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
test eax, eax
je 0x1003b2da
mov ecx, dword [eax]
mov eax, dword [ecx]
lea edx, [ebp - 4]
push edx
call eax
add esp, 4
mov edi, dword [ebp - 8]
mov eax, edi
call fcn.1003c500
push edi
call fcn.1009cc76
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
test eax, eax
je 0x1003b30a
mov edx, dword [eax]
mov ecx, dword [edx]
lea eax, [ebp - 4]
push eax
call ecx
add esp, 4
mov edx, dword [ebp - 8]
push edx
call fcn.1009cc76
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
test eax, eax
je 0x1003b333
mov ecx, dword [eax]
mov eax, dword [ecx]
lea edx, [ebp - 4]
push edx
call eax
add esp, 4
mov eax, esi
call fcn.1003c500
push esi
call fcn.1009cc76
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
jne 0x1003b3e7
xor esi, esi
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [edi]
jge 0x1003b3bd
mov edx, dword [edi + 4]
mov ecx, dword [esi + edx + 4]
test ecx, ecx
je 0x1003b3a7
xor eax, eax
cmp byte [ecx + 8], 2
jne 0x1003b3a4
mov ebx, dword [ecx + 4]
mov dword [ebp - 0x14], eax
cmp byte [ebx + 0x12], al
je 0x1003b394
lea eax, [ebp - 0x14]
push eax
call fcn.10030a00
add esp, 4
test eax, eax
jne 0x1003b3a4
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebx]
push ecx
push 0
call fcn.10050540
add esp, 8
mov dword [ebp - 8], eax
inc dword [ebp - 0xc]
add esi, 0x18
cmp dword [ebp - 8], 0
je 0x1003b35f
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 8], 0
jne 0x1003b3e7
xor ebx, ebx
cmp dword [edi], ebx
jle 0x1003b3e7
xor esi, esi
mov edx, dword [edi + 4]
mov eax, dword [esi + edx + 4]
test eax, eax
je 0x1003b3df
push eax
call fcn.10030cf0
add esp, 4
inc ebx
add esi, 0x18
cmp ebx, dword [edi]
jl 0x1003b3cb
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret