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

Disassembly:
sub esp, 0x110
mov eax, dword [0x445750]
xor eax, esp
mov dword [esp + 0x10c], eax
push esi
xor esi, esi
mov dword [0x447a38], esi
call fcn.00402cc0
push 0x447a14
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [0x447a10], esi
cmp dword [0x44843c], esi
jne 0x40aa93
cmp dword [0x447a34], esi
jle 0x40aa93
xor eax, eax
lea ecx, [ecx]
mov cl, byte [eax + 0x446ff0]
mov byte [esp + eax + 0x10], cl
inc eax
test cl, cl
jne 0x40a1b0
mov eax, dword [0x447264]
push ebx
dec eax
push ebp
push edi
cmp eax, 1
ja 0x40a417
mov edi, dword [0x447278]
fld qword [0x438978]
imul edi, dword [0x447274]
mov ebx, dword [0x447a2c]
xor esi, esi
mov dword [esp + 0x18], edi
mov ebp, ebx
test edi, edi
jle 0x40a216
fild dword [ebp + esi*4]
fidiv dword [0x447a34]
fadd st(1)
call fcn.0041fb00
mov word [ebx + esi*2], ax
mov ebx, dword [0x447a2c]
inc esi
cmp esi, edi
jl 0x40a1f6
mov ebp, 1
cmp dword [0x447264], ebp
jne 0x40a25e
lea eax, [esp + 0x1c]
fstp st(0)
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a230
mov ecx, dword [0x447278]
sub eax, edx
mov edx, dword [0x447274]
push ecx
push edx
lea eax, [esp + eax + 0x24]
push str.CAL_dx_dd.raw
push eax
call fcn.0041e808
add esp, 0x10
jmp 0x40a37d
fldz
xor edx, edx
cmp edi, 4
fstp dword [esp + 0x14]
jl 0x40a2da
lea ecx, [edi - 4]
shr ecx, 2
add ecx, ebp
lea eax, [ebx + 4]
lea edx, [ecx*4]
movsx esi, word [eax - 4]
mov dword [esp + 0x10], esi
movsx esi, word [eax - 2]
fild dword [esp + 0x10]
add eax, 8
sub ecx, ebp
fadd dword [esp + 0x14]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
mov dword [esp + 0x10], esi
fild dword [esp + 0x10]
movsx esi, word [eax - 8]
faddp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
mov dword [esp + 0x10], esi
fild dword [esp + 0x10]
movsx esi, word [eax - 6]
faddp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
mov dword [esp + 0x10], esi
fild dword [esp + 0x10]
faddp st(1)
fstp dword [esp + 0x14]
jne 0x40a27d
cmp edx, edi
jge 0x40a2f8
movsx ecx, word [ebx + edx*2]
mov dword [esp + 0x10], ecx
add edx, ebp
cmp edx, edi
fild dword [esp + 0x10]
fadd dword [esp + 0x14]
fstp dword [esp + 0x14]
jl 0x40a2de
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a2ff
fld dword [esp + 0x14]
sub eax, edx
fidiv dword [esp + 0x18]
mov esi, eax
faddp st(1)
call fcn.0041fb00
mov edx, dword [0x447278]
push eax
mov eax, dword [0x447274]
push edx
push eax
lea ecx, [esp + esi + 0x28]
push str.CAL_dx_db_5.5dA.raw
push ecx
call fcn.0041e808
lea edx, [esp + 0x30]
push 0x2e
push edx
call fcn.0041f4f4
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov esi, eax
add esp, 0x1c
lea eax, [esp + 0x1c]
push eax
sub esi, ebp
call ebx
cmp eax, 0xffffffff
je 0x40a37d
jmp 0x40a360
mov al, byte [esi]
movsx ecx, al
cmp ecx, 0xff
jge 0x40a37d
lea edx, [esp + 0x1c]
inc al
push edx
mov byte [esi], al
call ebx
cmp eax, 0xffffffff
jne 0x40a360
mov eax, dword [0x447a2c]
push eax
lea ecx, [edi + edi]
push ecx
lea edx, [esp + 0x24]
push edx
push ebp
call fcn.0040e6d0
add esp, 0x10
cmp dword [0x447264], 2
jne 0x40a3a4
add dword [0x447a58], ebp
mov eax, dword [0x447288]
test eax, eax
je 0x40a3cf
mov ecx, dword [0x447274]
mov edx, dword [0x447278]
push ecx
push edx
push ecx
mov ecx, dword [0x447a2c]
push ecx
xor eax, 3
push eax
call fcn.0040f7f0
add esp, 0x14
mov eax, dword [0x447284]
test eax, eax
je 0x40a3fd
mov edx, dword [0x447274]
mov ecx, dword [0x447278]
push edx
mov edx, dword [0x447a2c]
push ecx
mov ecx, 3
push edx
sub ecx, eax
push ecx
call fcn.0040f6a0
add esp, 0x10
mov edx, dword [0x447a58]
mov eax, dword [0x447a2c]
push edx
push eax
call fcn.00408fa0
add esp, 8
jmp 0x40a9c9
lea eax, [esp + 0x1c]
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40a420
mov ecx, dword [str.PAN_]
mov dl, byte [0x4388c0]
mov ebx, dword [0x447354]
mov dword [eax], ecx
mov ecx, dword [0x447a34]
mov byte [eax + 4], dl
mov eax, dword [0x44739c]
cmp ecx, eax
jle 0x40a455
mov dword [0x447a34], eax
jmp 0x40a462
mov eax, ecx
cdq
idiv ebx
sub ecx, edx
mov dword [0x447a34], ecx
cmp dword [0x447278], 0
mov esi, dword [0x447a2c]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 0
jle 0x40a56b
mov ebp, dword [0x447350]
cmp dword [esp + 0x14], 0
je 0x40a4c1
mov ecx, dword [0x447a34]
cmp ecx, dword [0x44739c]
je 0x40a4c1
mov eax, ebp
imul eax, ecx
cdq
idiv ebx
add eax, eax
push eax
mov eax, dword [esp + 0x14]
push eax
push esi
call fcn.0041ea30
mov ebx, dword [0x447354]
mov ebp, dword [0x447350]
add esp, 0xc
cmp dword [0x4472e4], 0
jne 0x40a530
mov eax, ebp
imul eax, dword [0x447a34]
cdq
idiv ebx
xor ecx, ecx
mov edi, eax
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x40a530
movzx ebx, word [esi + ecx*2]
sub edi, ecx
mov dx, word [esi + edi*2 - 2]
mov word [esi + ecx*2], dx
mov eax, dword [0x447350]
imul eax, dword [0x447a34]
cdq
idiv dword [0x447354]
sub eax, ecx
mov word [esi + eax*2 - 2], bx
mov ebp, dword [0x447350]
mov ebx, dword [0x447354]
mov eax, ebp
imul eax, dword [0x447a34]
cdq
idiv ebx
inc ecx
mov edi, eax
cdq
sub eax, edx
sar eax, 1
cmp ecx, eax
jl 0x40a4e3
mov eax, ebp
imul eax, dword [0x447a34]
cdq
idiv ebx
mov ecx, dword [esp + 0x10]
lea esi, [esi + eax*2]
mov eax, ebp
imul eax, dword [0x44739c]
cdq
idiv ebx
lea edx, [ecx + eax*2]
mov eax, dword [esp + 0x14]
inc eax
cmp eax, dword [0x447278]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
jl 0x40a487
call fcn.00402e00
mov esi, dword [0x447278]
imul esi, dword [0x447a34]
mov ebx, dword [0x447264]
mov dword [esp + 0x10], esi
test ebx, ebx
jne 0x40a616
push 0x3a
push 0x4470f0
call fcn.0041f324
add esp, 8
test eax, eax
jne 0x40a5da
cmp byte [0x4470f0], 0x5c
je 0x40a5da
mov eax, 0x4470f0
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a5b2
lea edi, [esp + 0x1c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40a5c0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40a5ef
xor eax, eax
lea esp, [esp]
mov cl, byte [eax + 0x4470f0]
mov byte [esp + eax + 0x1c], cl
inc eax
test cl, cl
jne 0x40a5e0
mov eax, dword [0x447350]
mov ecx, dword [0x447278]
imul eax, ecx
imul eax, dword [0x447a34]
cdq
idiv dword [0x447354]
mov edi, eax
mov dword [esp + 0x10], edi
jmp 0x40a740
fldz
mov edi, dword [0x447a2c]
xor edx, edx
fstp dword [esp + 0x14]
cmp esi, 4
jl 0x40a69e
lea ecx, [esi - 4]
shr ecx, 2
inc ecx
lea eax, [edi + 4]
lea edx, [ecx*4]
lea ebx, [ebx]
movsx ebp, word [eax - 4]
mov dword [esp + 0x18], ebp
movsx ebp, word [eax - 2]
fild dword [esp + 0x18]
add eax, 8
sub ecx, 1
fadd dword [esp + 0x14]
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
mov dword [esp + 0x18], ebp
fild dword [esp + 0x18]
movsx ebp, word [eax - 8]
faddp st(1)
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
mov dword [esp + 0x18], ebp
fild dword [esp + 0x18]
movsx ebp, word [eax - 6]
faddp st(1)
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
mov dword [esp + 0x18], ebp
fild dword [esp + 0x18]
faddp st(1)
fstp dword [esp + 0x14]
jne 0x40a640
cmp edx, esi
jge 0x40a6bb
movsx eax, word [edi + edx*2]
mov dword [esp + 0x18], eax
inc edx
cmp edx, esi
fild dword [esp + 0x18]
fadd dword [esp + 0x14]
fstp dword [esp + 0x14]
jl 0x40a6a2
fld dword [esp + 0x14]
fidiv dword [esp + 0x10]
fadd qword [0x438978]
call fcn.0041fb00
mov ecx, eax
cdq
xor eax, edx
sub eax, edx
xor edx, edx
test ecx, ecx
setl dl
push eax
xor eax, eax
dec edx
and edx, 3
add edx, 0x6d
cmp ebx, 3
sete al
push edx
lea eax, [eax + eax + 0x62]
push eax
push 0x4471f0
push str.cm_s__c__c_5.5d.raw
push 0x4470f0
call fcn.0041e808
mov eax, 0x4470f0
add esp, 0x18
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40a710
lea edi, [esp + 0x1c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40a720
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x447278]
mov edi, dword [esp + 0x10]
mov eax, dword [0x4472f0]
test eax, eax
jne 0x40a777
mov eax, dword [0x447350]
imul eax, dword [0x447a34]
cdq
idiv dword [0x447354]
mov ecx, dword [0x447a2c]
push eax
push ecx
call fcn.0040ce70
mov eax, dword [0x4472f0]
mov ecx, dword [0x447278]
add esp, 8
cmp dword [0x447268], 0
je 0x40a911
test eax, eax
jne 0x40a8db
lea edx, [edi + edi]
push 2
push edx
call fcn.0041e8c4
mov ecx, dword [0x447a34]
xor esi, esi
add esp, 8
cmp dword [0x447278], esi
mov ebx, eax
jle 0x40a87b
mov ebp, 1
mov dword [esp + 0x14], ebp
lea esp, [esp]
mov edx, dword [0x447a2c]
mov eax, ecx
imul eax, esi
add ecx, ecx
push ecx
lea ecx, [edx + eax*2]
push ecx
lea edx, [ebx + eax*4]
push edx
call fcn.0041ea30
mov eax, dword [0x447278]
dec eax
add esp, 0xc
cmp esi, eax
jne 0x40a819
mov eax, dword [0x447a34]
mov edx, eax
imul edx, esi
lea ecx, [eax + eax]
push ecx
mov ecx, dword [0x447a2c]
lea edx, [ecx + edx*2]
mov ecx, ebp
imul ecx, eax
push edx
lea edx, [ebx + ecx*2]
push edx
call fcn.0041ea30
mov ecx, dword [0x447a34]
add esp, 0xc
jmp 0x40a863
mov ecx, dword [0x447a34]
mov edi, dword [0x447a2c]
mov eax, ebp
imul eax, ecx
lea edx, [ebx + eax*2]
mov eax, ecx
imul eax, esi
lea eax, [edi + eax*2]
xor edi, edi
test ecx, ecx
jle 0x40a863
jmp 0x40a840
movzx ecx, word [eax + ecx*2]
movzx ebp, word [eax]
add ecx, ebp
sar ecx, 1
mov word [edx], cx
mov ecx, dword [0x447a34]
inc edi
add edx, 2
add eax, 2
cmp edi, ecx
jl 0x40a840
mov ebp, dword [esp + 0x14]
inc esi
add ebp, 2
cmp esi, dword [0x447278]
mov dword [esp + 0x14], ebp
jl 0x40a7c0
mov edi, dword [esp + 0x10]
cmp dword [0x4472d4], 0
je 0x40a8b7
fld dword [0x4472dc]
mov edx, dword [0x4472d8]
mov eax, dword [0x447278]
push ecx
fstp dword [esp]
push edx
lea edx, [eax + eax]
mov eax, dword [0x447350]
imul eax, ecx
push edx
cdq
idiv dword [0x447354]
push eax
push ebx
call fcn.0040f140
add esp, 0x14
push ebx
lea eax, [edi*4]
push eax
lea ecx, [esp + 0x24]
push ecx
push 1
call fcn.0040e6d0
push ebx
call fcn.0041e77a
mov ecx, dword [0x447278]
add esp, 0x14
cmp dword [0x447320], 9
lea edx, [ecx + ecx]
push edx
jne 0x40a9ab
push 7
push 0
push 0x1f
call fcn.00404510
mov eax, dword [0x442018]
movsx ecx, word [eax*2 + 0x44200c]
push 0xaaaa
push ecx
push 2
jmp 0x40a9bf
test eax, eax
jne 0x40a976
cmp dword [0x4472d4], eax
je 0x40a951
fld dword [0x4472dc]
mov eax, dword [0x4472d8]
push ecx
fstp dword [esp]
push eax
mov eax, dword [0x447350]
imul eax, dword [0x447a34]
cdq
idiv dword [0x447354]
push ecx
mov ecx, dword [0x447a2c]
push eax
push ecx
call fcn.0040f140
add esp, 0x14
mov edx, dword [0x447a2c]
push edx
lea eax, [edi + edi]
push eax
lea ecx, [esp + 0x24]
push ecx
push 1
call fcn.0040e6d0
mov eax, dword [0x4472f0]
mov ecx, dword [0x447278]
add esp, 0x10
cmp dword [0x447320], 9
push ecx
jne 0x40a9ab
test eax, eax
je 0x40a988
push 2
jmp 0x40a9ad
push 7
push 0
push 0x1f
call fcn.00404510
mov edx, dword [0x442018]
movsx eax, word [edx*2 + 0x44200c]
push 0xaaaa
push eax
push 2
jmp 0x40a9bf
push 1
push 0
push 0x1f
call fcn.00404510
push 0xaaaa
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x23
call fcn.00404510
add esp, 0x20
cmp dword [0x4472ec], 0
pop edi
pop ebp
pop ebx
je 0x40aa93
xor eax, eax
jmp 0x40a9e0
mov cl, byte [eax + 0x446ff0]
mov byte [esp + eax + 0x10], cl
inc eax
test cl, cl
jne 0x40a9e0
lea eax, [esp + 0x10]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x40a9f4
mov ecx, dword [str.PANPROJ_recpar.txt]
mov edx, dword [0x4395a8]
mov dword [eax], ecx
mov ecx, dword [0x4395ac]
mov dword [eax + 4], edx
mov edx, dword [0x4395b0]
mov dword [eax + 8], ecx
mov ecx, dword [0x4395b4]
mov dword [eax + 0xc], edx
mov dl, byte [0x4395b8]
mov dword [eax + 0x10], ecx
mov byte [eax + 0x14], dl
lea eax, [esp + 0x10]
push 0x4395a0
push eax
call fcn.004203ff
mov esi, eax
add esp, 8
test esi, esi
je 0x40aa93
fld dword [0x4472b4]
mov ecx, dword [0x447278]
mov edx, dword [0x447274]
mov eax, dword [0x447a34]
push 0xffffffffffffffff
push 0xffffffffffffffff
sub esp, 8
fstp qword [esp]
push ecx
fld qword [0x439598]
push edx
push eax
sub esp, 0x10
fstp qword [esp + 8]
fldz
fstp qword [esp]
push str._g_n_g_n_d_n_d_n_d_n_g_n_d_n_d
push esi
call fcn.00420c9b
push esi
call fcn.0041fc22
add esp, 0x38
mov eax, dword [0x447a2c]
xor esi, esi
cmp eax, esi
je 0x40aaad
push eax
call fcn.0041e77a
add esp, 4
mov dword [0x447a2c], esi
mov eax, dword [0x447a30]
cmp eax, esi
je 0x40aac5
push eax
call fcn.0041e77a
add esp, 4
mov dword [0x447a30], esi
mov ecx, dword [esp + 0x110]
pop esi
xor ecx, esp
call fcn.0041e904
add esp, 0x110
ret