Function at 0x40f860
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x454126
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x640
mov eax, dword [0x464738]
xor eax, ebp
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, ecx
mov edx, dword [esi]
mov dword [ebp - 0x620], eax
xor eax, eax
xor ebx, ebx
mov byte [ebp - 0x414], bl
mov ecx, 0xff
lea edi, [ebp - 0x413]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, esi
mov dword [ebp - 0x10], esp
stosb byte es:[edi], al
call dword [edx + 0x10]
test eax, eax
je 0x40fb18
mov eax, dword [ebp + 0xc]
cmp eax, 0xffffffff
jne 0x40f8e1
lea eax, [ebp - 0x414]
push str.SELECT_filesize__dwmagic__crc32_head__crc32_tail__crc32_misc__filename__version_FROM_siglib
push eax
call dword [sym.imp.MSVCR71.dll_sprintf]
add esp, 8
jmp 0x40f8f7
push eax
lea ecx, [ebp - 0x414]
push str.SELECT_filesize__dwmagic__crc32_head__crc32_tail__crc32_misc__filename__version_FROM_siglib_WHERE_appid_u
push ecx
call dword [sym.imp.MSVCR71.dll_sprintf]
add esp, 0xc
push 0x46499c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea edx, [ebp - 0x414]
push edx
lea eax, [ebp - 0x640]
push eax
lea ecx, [esi + 8]
mov dword [ebp - 4], ebx
call fcn.00416a50
mov byte [ebp - 4], 1
nop
lea ecx, [ebp - 0x640]
call fcn.004168c0
cmp al, bl
jne 0x40fac0
push ebx
xor eax, eax
mov ecx, 0x82
lea edi, [ebp - 0x61c]
push ebx
rep stosd dword es:[edi], eax
push str.filesize
lea ecx, [ebp - 0x640]
call fcn.00416b40
push ebx
push ebx
push str.dwmagic
lea ecx, [ebp - 0x640]
mov dword [ebp - 0x624], edx
mov dword [ebp - 0x60c], eax
mov dword [ebp - 0x608], ebx
call fcn.00416b40
push ebx
push ebx
push str.crc32_head
lea ecx, [ebp - 0x640]
mov dword [ebp - 0x624], edx
mov dword [ebp - 0x604], eax
mov dword [ebp - 0x600], ebx
call fcn.00416b40
push ebx
push ebx
push str.crc32_tail
lea ecx, [ebp - 0x640]
mov dword [ebp - 0x624], edx
mov dword [ebp - 0x5fc], eax
mov dword [ebp - 0x5f8], ebx
call fcn.00416b40
push ebx
push ebx
push str.crc32_misc
lea ecx, [ebp - 0x640]
mov dword [ebp - 0x624], edx
mov dword [ebp - 0x5f4], eax
mov dword [ebp - 0x5f0], ebx
call fcn.00416b40
push 0x457f19
push str.filename
lea ecx, [ebp - 0x640]
mov dword [ebp - 0x624], edx
mov dword [ebp - 0x5ec], eax
mov dword [ebp - 0x5e8], ebx
call fcn.00416b80
mov ecx, eax
lea edx, [ebp - 0x5a0]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp al, bl
jne 0x40fa13
push 0x457f19
push str.version
lea ecx, [ebp - 0x640]
call fcn.00416b80
mov ecx, eax
lea edx, [ebp - 0x498]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp al, bl
jne 0x40fa40
mov edi, dword [ebp - 0x620]
mov ecx, dword [edi + 0x10]
mov eax, dword [edi + 8]
inc ecx
cmp eax, ecx
ja 0x40fa64
push 1
mov ecx, edi
call fcn.0040e3b0
mov esi, dword [edi + 0xc]
mov edx, dword [edi + 0x10]
mov eax, dword [edi + 8]
add esi, edx
cmp eax, esi
ja 0x40fa75
sub esi, eax
mov edx, dword [edi + 4]
cmp dword [edx + esi*4], ebx
jne 0x40fa90
push 0x208
call sub.MFC71U.DLL_CWordArray::CWordArray
mov ecx, dword [edi + 4]
add esp, 4
mov dword [ecx + esi*4], eax
mov edx, dword [edi + 4]
mov edi, dword [edx + esi*4]
cmp edi, ebx
je 0x40faa7
mov ecx, 0x82
lea esi, [ebp - 0x61c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x620]
inc dword [eax + 0x10]
lea ecx, [ebp - 0x640]
call fcn.004168d0
jmp 0x40f920
lea ecx, [ebp - 0x640]
mov byte [ebp - 4], bl
call fcn.00416740
push 0x46499c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
jmp 0x40fb1a
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415ae8
mov esp, ebp
pop ebp
ret 8