Function at 0x409449
Capabilities:
Check if file exists
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
xor esi, esi
xor ebx, ebx
mov dword [ebp - 0xc], esi
mov eax, dword [0x41fd0c]
push eax
call fcn.004056e5
add esp, 4
mov eax, dword [0x41fd0c]
push eax
call fcn.0040570a
add esp, 4
test eax, eax
jne 0x409725
mov eax, dword [0x41fd0c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40972f
test al, 0x10
jne 0x409739
call fcn.00409fe1
test eax, eax
jne 0x409743
cmp dword [0x41fd38], ebx
jle 0x4094c2
mov eax, dword [0x41fd5c]
sub eax, dword [0x41fd38]
inc eax
mov dword [0x41fd1c], eax
jmp 0x4094dd
push ebx
mov eax, dword [0x41fd04]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x41fd1c], eax
cmp eax, 0xffffffff
je 0x40974d
mov eax, dword [0x41fcb0]
mov dword [0x430590], ebx
mov dword [0x41fd24], eax
cmp dword [0x4159b4], ebx
jne 0x4095c6
push ebx
mov eax, dword [0x41fd38]
push eax
push dword [0x41fd04]
call dword [sym.imp.KERNEL32.dll__llseek]
push 4
call fcn.0040eb30
add esp, 4
mov edi, eax
push ebx
push 4
push edi
call fcn.0040b0a9
add esp, 0xc
cmp eax, 4
jne 0x4097a1
push 4
push 0x430580
push edi
call fcn.0040f6f0
add esp, 0xc
test eax, eax
je 0x4095aa
push 4
push 0x41fcc0
push edi
call fcn.0040f6f0
add esp, 0xc
test eax, eax
je 0x409757
push 4
push 0x4305d0
push edi
call fcn.0040f6f0
add esp, 0xc
test eax, eax
je 0x40976a
lea eax, [ebp - 4]
mov dword [ebp - 4], ebx
push eax
push dword [0x41fd5c]
push dword [0x41fd38]
push 4
push 0x430580
push 0x41fd04
call fcn.0040af31
add esp, 0x18
cmp eax, 0xffffffff
je 0x40977d
cmp dword [ebp - 4], ebx
jne 0x409790
push edi
call fcn.0040eb10
add esp, 4
mov eax, dword [0x41fd38]
push ebx
push eax
push dword [0x41fd04]
call dword [sym.imp.KERNEL32.dll__llseek]
mov eax, dword [0x41fd38]
push eax
mov eax, dword [0x41fd1c]
cmp eax, 0x101d0
jl 0x4095dd
mov eax, 0x101d0
push eax
call fcn.0040a5e8
add esp, 8
mov edi, eax
mov edx, dword [0x4159b4]
mov ecx, dword [0x41fcfc]
test edi, edi
jne 0x4096a8
call fcn.00409d29
cmp eax, 0xa
mov edi, eax
mov edx, dword [0x4159b4]
mov ecx, dword [0x41fcfc]
jg 0x4096a8
movzx eax, word [0x4305a0]
lea edi, [eax + 1]
mov dword [0x41fd2c], edi
movzx edi, word [0x4305a2]
inc edi
test edx, edx
mov dword [0x41fcc8], edi
jne 0x40964f
cmp word [0x4305a0], bx
jne 0x4097b4
test edx, edx
je 0x4097df
sub eax, dword [0x41fd2c]
cmp eax, 0xffffffff
je 0x4097df
test ecx, ecx
je 0x409674
mov eax, dword [0x41fd04]
mov dword [0x41fcfc], ebx
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
movzx eax, word [0x4305a0]
inc eax
push eax
mov dword [0x41fd2c], eax
call fcn.0040aea7
add esp, 4
test eax, eax
je 0x4097d5
cmp byte [0x41fd34], bl
je 0x409459
mov eax, 0xbe
jmp 0x409d22
test ecx, ecx
je 0x4096c4
mov eax, dword [0x41fd04]
mov dword [0x41fcfc], ebx
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
mov edx, dword [0x4159b4]
cmp dword [ebp + 8], ebx
jne 0x409cf9
cmp edi, 0x6e
je 0x409cfd
cmp edi, 0xaa
jne 0x409d0f
test edx, edx
je 0x409d0f
cmp esi, 3
je 0x409d01
lea eax, [ebp - 8]
mov dword [ebp - 8], ebx
push eax
push 0x6e
call fcn.00408bc9
add esp, 8
cmp byte [0x41fd34], bl
jne 0x409d08
mov eax, 0x3e80
inc esi
mov dword [0x41fd2c], eax
mov dword [0x41fcc8], eax
jmp 0x409459
mov eax, 0x64
jmp 0x409d22
mov eax, 0x64
jmp 0x409d22
mov eax, 0x4c
jmp 0x409d22
mov eax, 0x64
jmp 0x409d22
mov eax, 0x64
jmp 0x409d22
push edi
call fcn.0040eb10
add esp, 4
mov eax, 0x19a
jmp 0x409d22
push edi
call fcn.0040eb10
add esp, 4
mov eax, 0x32
jmp 0x409d22
push edi
call fcn.0040eb10
add esp, 4
mov eax, 0x6e
jmp 0x409d22
push edi
call fcn.0040eb10
add esp, 4
mov eax, dword [ebp - 4]
jmp 0x409d22
push edi
call fcn.0040eb10
add esp, 4
mov eax, 0x6e
jmp 0x409d22
xor eax, eax
test ecx, ecx
je 0x4097cb
mov dword [0x41fcfc], eax
mov eax, dword [0x41fd04]
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, 0x19a
jmp 0x409d22
mov eax, 0x1a4
jmp 0x409d22
mov eax, dword [0x41fd28]
mov esi, dword [0x417b18]
sub eax, esi
mov dword [0x4159f4], eax
jns 0x4097fe
test edx, edx
jne 0x409835
mov ebx, 0x6e
jmp 0x409835
xor eax, eax
cmp dword [0x4159f4], eax
jle 0x409835
cmp dword [0x4305ac], eax
jne 0x409830
cmp dword [0x4305a8], eax
je 0x409830
mov edi, dword [0x4159f4]
mov ebx, 0x6e
mov dword [0x4305ac], edi
mov dword [0x4159f4], eax
jmp 0x409835
mov ebx, 0xa
xor eax, eax
test esi, esi
jne 0x40986d
cmp dword [0x4305a8], eax
jne 0x40986d
test ecx, ecx
je 0x409858
mov dword [0x41fcfc], eax
mov eax, dword [0x41fd04]
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
cmp ebx, 0xa
mov eax, ebx
jg 0x409d22
mov eax, 0xa
jmp 0x409d22
xor eax, eax
test edx, edx
je 0x4098dc
mov edi, dword [0x41fd2c]
cmp dword [0x41fcc8], edi
je 0x4098dc
test ecx, ecx
je 0x409896
mov dword [0x41fcfc], eax
mov eax, dword [0x41fd04]
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, dword [0x41fcc8]
push eax
mov dword [0x41fd2c], eax
call fcn.0040aea7
add esp, 4
test eax, eax
jne 0x4098b7
mov eax, 0x1a4
jmp 0x409d22
cmp byte [0x41fd34], 0
jne 0x4098d2
test eax, eax
je 0x4098c9
call fcn.00409fe1
cmp byte [0x41fd34], 0
je 0x4098dc
mov eax, 0xbe
jmp 0x409d22
xor eax, eax
cmp dword [0x4159f4], eax
jge 0x4098eb
mov dword [0x4159f4], eax
mov ecx, dword [0x4305ac]
add ecx, dword [0x4159f4]
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
and eax, 0x1fff
xor eax, edx
sub eax, edx
mov esi, eax
mov eax, ecx
sub eax, esi
test ecx, ecx
jge 0x40991b
mov eax, 3
jmp 0x409d22
cmp eax, dword [0x430590]
je 0x409978
xor edi, edi
push edi
push eax
push dword [0x41fd04]
call dword [sym.imp.KERNEL32.dll__llseek]
push edi
mov dword [0x430590], eax
push 0x2000
push dword [0x41fcb0]
call fcn.0040b0a9
add esp, 0xc
mov dword [0x41fcb4], eax
cmp eax, 0xffffffff
je 0x40996e
cmp eax, edi
je 0x40996e
mov eax, dword [0x41fcb0]
sub dword [0x41fcb4], esi
add eax, esi
mov dword [0x41fd24], eax
jmp 0x409994
mov eax, 0x6e
jmp 0x409d22
mov ecx, dword [0x41fd24]
mov eax, dword [0x41fcb0]
sub ecx, eax
add eax, esi
sub ecx, esi
mov dword [0x41fd24], eax
add dword [0x41fcb4], ecx
push 4
mov esi, 0x417b78
push esi
call fcn.0040a102
add esp, 8
test eax, eax
je 0x4099c0
push 4
push 0x41fca8
push esi
call fcn.0040f6f0
add esp, 0xc
test eax, eax
je 0x409aa5
mov dword [0x4159f4], 0
mov ecx, dword [0x4305ac]
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
and eax, 0x1fff
xor eax, edx
sub eax, edx
mov esi, eax
mov eax, ecx
sub eax, esi
test ecx, ecx
jge 0x4099f4
mov eax, 3
jmp 0x409d22
cmp dword [0x430590], eax
je 0x409a51
xor edi, edi
push edi
push eax
push dword [0x41fd04]
call dword [sym.imp.KERNEL32.dll__llseek]
push edi
mov dword [0x430590], eax
push 0x2000
push dword [0x41fcb0]
call fcn.0040b0a9
add esp, 0xc
mov dword [0x41fcb4], eax
cmp eax, 0xffffffff
je 0x409a47
cmp eax, edi
je 0x409a47
mov eax, dword [0x41fcb0]
sub dword [0x41fcb4], esi
add eax, esi
mov dword [0x41fd24], eax
jmp 0x409a70
mov eax, 0x6e
jmp 0x409d22
mov eax, dword [0x41fd24]
sub eax, esi
sub eax, dword [0x41fcb0]
add dword [0x41fcb4], eax
mov eax, dword [0x41fcb0]
add eax, esi
mov dword [0x41fd24], eax
push 4
mov esi, 0x417b78
push esi
call fcn.0040a102
add esp, 8
test eax, eax
je 0x409cd7
push 4
push 0x41fca8
push esi
call fcn.0040f6f0
add esp, 0xc
test eax, eax
jne 0x409cd7
mov ebx, 0x6e
xor ecx, ecx
cmp dword [0x4159b4], ecx
je 0x409b1c
mov eax, dword [0x41fd2c]
cmp dword [0x41fcc8], eax
je 0x409b1c
cmp dword [0x41fcfc], ecx
je 0x409ad6
mov eax, dword [0x41fd04]
mov dword [0x41fcfc], ecx
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, dword [0x41fcc8]
push eax
mov dword [0x41fd2c], eax
call fcn.0040aea7
add esp, 4
test eax, eax
jne 0x409af7
mov eax, 0x1a4
jmp 0x409d22
cmp byte [0x41fd34], 0
jne 0x409b12
test eax, eax
je 0x409b09
call fcn.00409fe1
cmp byte [0x41fd34], 0
je 0x409b1c
mov eax, 0xbe
jmp 0x409d22
cmp dword [0x417b40], 0
jne 0x409ca2
mov ecx, dword [0x4305ac]
add ecx, dword [0x4159f4]
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
and eax, 0x1fff
xor eax, edx
sub eax, edx
mov esi, eax
mov eax, ecx
sub eax, esi
test ecx, ecx
jge 0x409b59
mov eax, 3
jmp 0x409d22
cmp eax, dword [0x430590]
je 0x409bb6
xor edi, edi
push edi
push eax
push dword [0x41fd04]
call dword [sym.imp.KERNEL32.dll__llseek]
push edi
mov dword [0x430590], eax
push 0x2000
push dword [0x41fcb0]
call fcn.0040b0a9
add esp, 0xc
mov dword [0x41fcb4], eax
cmp eax, 0xffffffff
je 0x409bac
cmp eax, edi
je 0x409bac
mov eax, dword [0x41fcb0]
sub dword [0x41fcb4], esi
add eax, esi
mov dword [0x41fd24], eax
jmp 0x409bd9
mov eax, 0x6e
jmp 0x409d22
mov eax, dword [0x41fd24]
sub dword [0x41fcb4], esi
sub eax, dword [0x41fcb0]
add dword [0x41fcb4], eax
mov eax, dword [0x41fcb0]
add eax, esi
mov dword [0x41fd24], eax
xor ecx, ecx
cmp byte [0x41fd54], cl
jne 0x409c87
mov word [ebp - 2], cx
cmp dword [0x417b3c], ecx
je 0x409c15
cmp dword [0x41fd50], ecx
jne 0x409c15
lea eax, [ebp - 2]
lea edx, [ebp - 0x10]
push eax
lea esi, [ebp - 8]
push edx
push esi
push ecx
call fcn.004061c5
add esp, 0x10
mov dword [ebp - 0xc], eax
jmp 0x409c7a
lea eax, [ebp - 2]
lea ecx, [ebp - 0x10]
push eax
lea edx, [ebp - 8]
push ecx
push edx
push 1
call fcn.004061c5
add esp, 0x10
xor eax, eax
mov dword [0x417b08], eax
mov byte [0x417b10], al
push 0x417b00
mov dword [0x417b0c], eax
push 0x96
mov byte [0x417b11], al
mov dword [0x417b14], eax
call fcn.00408bc9
add esp, 8
push dword [ebp - 2]
push dword [ebp - 0x10]
push dword [ebp - 8]
call fcn.004043ee
add esp, 0xc
mov dword [ebp - 0xc], eax
push dword [ebp - 0x10]
push dword [ebp - 8]
call fcn.00404e9c
add esp, 8
push dword [ebp - 8]
call fcn.0040eb10
add esp, 4
jmp 0x409ca2
movzx eax, word [0x4305a6]
push 0x417b1c
mov dword [0x417b1c], eax
push 0x46
call fcn.00408bc9
add esp, 8
cmp ebx, dword [ebp - 0xc]
jge 0x409caa
mov ebx, dword [ebp - 0xc]
xor eax, eax
cmp dword [0x41fcfc], eax
je 0x409cc5
mov dword [0x41fcfc], eax
mov eax, dword [0x41fd04]
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
cmp byte [0x41fd34], 0
mov eax, 0xbe
jne 0x409d22
mov eax, ebx
jmp 0x409d22
xor eax, eax
cmp dword [0x41fcfc], eax
je 0x409cf2
mov dword [0x41fcfc], eax
mov eax, dword [0x41fd04]
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
mov eax, 0x6e
jmp 0x409d22
mov eax, edi
jmp 0x409d22
mov eax, edi
jmp 0x409d22
mov eax, 0x6e
jmp 0x409d22
mov eax, 0xbe
jmp 0x409d22
sub edi, 0xaa
cmp edi, 1
sbb eax, eax
and eax, 0x136
add eax, 0x64
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret