Function at 0x40b490
Capabilities:
Get file size

Disassembly:
sub esp, 0x254
push ebx
mov bl, byte [esp + 0x264]
push ebp
or ebp, 0xffffffff
push esi
push edi
test bl, 1
mov dword [esp + 0x10], ebp
je 0x40b56d
mov edi, dword [esp + 0x268]
mov ecx, ebp
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x26c]
lea ecx, [esp + 0x20]
push edi
push ecx
call fcn.00406c90
add esp, 8
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.USER32.dll_CharLowerA]
mov eax, dword [esp + 0x274]
test eax, eax
je 0x40b53b
push 0
push 0
push 3
push 0
push 1
lea eax, [esp + 0x34]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, ebp
mov dword [esp + 0x10], eax
je 0x40b574
mov ecx, eax
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [esp + 0x27c]
mov dword [edx], eax
jmp 0x40b574
lea eax, [esp + 0x124]
lea ecx, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, ebp
je 0x40b574
test byte [esp + 0x124], 0x10
jne 0x40b564
mov dword [esp + 0x10], 0
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x40b574
mov edi, dword [esp + 0x26c]
cmp dword [esp + 0x10], ebp
jne 0x40b707
test bl, 6
je 0x40b707
mov ebp, 0x4238b8
test bl, 4
mov dword [esp + 0x14], ebp
je 0x40b5a1
mov dword [esp + 0x14], 0x4238c8
mov ebp, dword [esp + 0x14]
xor edx, edx
mov esi, str..sym
mov dword [esp + 0x18], edx
mov eax, edi
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x40b5d2
test cl, cl
je 0x40b5ce
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x40b5d2
add eax, 2
add esi, 2
test cl, cl
jne 0x40b5ae
xor eax, eax
jmp 0x40b5d7
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40b5e5
mov dword [esp + 0x18], 0x2aa2
jmp 0x40b621
mov esi, str..sch
mov eax, edi
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x40b610
test cl, cl
je 0x40b60c
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x40b610
add eax, 2
add esi, 2
test cl, cl
jne 0x40b5ec
xor eax, eax
jmp 0x40b615
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40b625
mov dword [esp + 0x18], 0x2bb2
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 4]
xor ebx, ebx
test eax, eax
jle 0x40b707
jmp 0x40b638
mov edx, dword [esp + 0x18]
cmp dword [esp + 0x10], 0xffffffff
jne 0x40b707
test edx, edx
je 0x40b7a4
push edx
mov edx, dword [ebp]
mov eax, dword [edx + ebx*8 + 4]
push eax
call fcn.0040b3b0
add esp, 8
test eax, eax
je 0x40b7a4
mov ecx, dword [ebp]
push 0
push 0
push 3
mov edx, dword [ecx + ebx*8 + 4]
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40b6f7
mov edi, dword [esp + 0x268]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x20]
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 [esp + 0x26c]
push ecx
push edx
call fcn.00406c90
add esp, 8
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_CharLowerA]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x20]
push ecx
push edx
push ebp
call fcn.0040b890
mov ecx, dword [esp + 0x288]
add esp, 0xc
test eax, eax
mov dword [ecx], eax
jg 0x40b748
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x14]
mov eax, dword [ebp + 4]
inc ebx
cmp ebx, eax
jl 0x40b634
mov edx, dword [esp + 0x10]
cmp edx, 0xffffffff
jne 0x40b715
mov byte [esp + 0x20], 0
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x278]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x254
ret
mov edx, dword [esp + 0x274]
mov dword [esp + 0x10], ebp
test edx, edx
jne 0x40b75f
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x14]
lea esi, [esp + 0x20]
mov dword [esp + 0x1c], esi
mov ecx, dword [eax]
xor eax, eax
mov edi, dword [ecx + ebx*8 + 4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test edx, edx
rep movsb byte es:[edi], byte [esi]
jne 0x40b6f7
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40b6f7
mov ecx, dword [ebp]
xor eax, eax
mov edx, dword [ecx + ebx*8 + 4]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [ecx + edx - 1]
cmp al, 0x5c
mov eax, dword [esp + 0x268]
push eax
push edx
jne 0x40b7cf
push 0x41e568
jmp 0x40b7d4
push str._s_s
lea ecx, [esp + 0x2c]
push ecx
call fcn.00410c20
mov edx, dword [esp + 0x27c]
add esp, 0x10
lea eax, [esp + 0x20]
push edx
push eax
call fcn.00406c90
add esp, 8
lea ecx, [esp + 0x20]
push ecx
call fcn.00406d10
add esp, 4
push eax
call dword [sym.imp.USER32.dll_CharLowerA]
mov eax, dword [esp + 0x274]
test eax, eax
je 0x40b853
push 0
push 0
push 3
push 0
push 1
lea edx, [esp + 0x34]
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x40b6fb
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x27c]
mov dword [ecx], eax
jmp 0x40b6fb
lea edx, [esp + 0x124]
lea eax, [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x40b6fb
test byte [esp + 0x124], 0x10
jne 0x40b881
mov dword [esp + 0x10], 0
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x40b6fb