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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1cc
mov eax, dword [0x4105f0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0x24], 0
je 0x404bd5
push 0xffffffffffffffff
push 0
push 0x185
push 0x43
push dword [esi + 0x10]
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
xor ebx, ebx
cmp dword [esi + 0x238], ebx
jle 0x404b63
push edi
mov eax, dword [esi + 0x23c]
push 0
mov edi, dword [eax + ebx*4]
push edi
push 0x19e
push 0x43
push dword [esi + 0x10]
mov dword [ebp - 0x1b0], edi
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push edi
push 1
push 0x185
push 0x43
push dword [esi + 0x10]
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
jmp 0x404a0b
lea eax, [ebp - 0x1cc]
push eax
push dword [esi + 0x10]
call dword [sym.imp.USER32.dll_IsDialogMessageA]
push 1
xor eax, eax
push eax
push eax
push eax
lea eax, [ebp - 0x1cc]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
jne 0x4049fb
lea eax, [ebp - 0x54]
push eax
push edi
push 0x189
push 0x43
push dword [esi + 0x10]
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
cmp dword [esi + 0x24], 0x45
jne 0x404b71
push ecx
lea eax, [ebp - 0x54]
push eax
push ecx
push 0x54
pop edx
lea ecx, [ebp - 0xa8]
call fcn.00403110
test eax, eax
js 0x404b62
lea edi, [ebp - 0xa8]
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x404a67
sub edi, ecx
cmp dword [esi + 0x20], 0
je 0x404a7e
cmp edi, 8
jle 0x404a7e
push 8
pop edi
push 0x402bdc
push 0x54
pop edx
lea ecx, [ebp - 0xa8]
sub edx, edi
add ecx, edi
call fcn.0040302a
test eax, eax
js 0x404bbe
lea eax, [ebp - 0xa8]
push eax
push 0x5c
lea edi, [esi + 0x12c]
push edi
push 0x402be4
lea eax, [ebp - 0x1ac]
push 0x104
push eax
call fcn.004030ae
add esp, 0x18
test eax, eax
js 0x404b62
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404ae8
test al, 1
jne 0x404bf0
lea eax, [ebp - 0xa8]
push eax
push edi
lea eax, [ebp - 0x54]
push eax
push dword [esi + 4]
call dword [sym.imp.msi.dll_MsiDatabaseGetPrimaryKeysA]
test eax, eax
je 0x404b0e
push 0x20
lea eax, [ebp - 0x54]
mov ecx, esi
push eax
call fcn.00403360
mov edi, dword [ebp - 0x1b0]
cmp dword [esi + 0x18], 0
je 0x404b55
push edi
push 0
push 0x185
push 0x43
push dword [esi + 0x10]
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push 1
xor eax, eax
push eax
push eax
push eax
lea eax, [ebp - 0x1cc]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x404b55
lea eax, [ebp - 0x1cc]
push eax
push dword [esi + 0x10]
call dword [sym.imp.USER32.dll_IsDialogMessageA]
inc ebx
cmp ebx, dword [esi + 0x238]
jl 0x4049c4
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00406053
leave
ret
cmp dword [esi + 0x1c], 0
jne 0x404bcd
lea eax, [ebp - 0x54]
mov cl, byte [eax]
test cl, cl
je 0x404b90
cmp cl, 9
jne 0x404b88
mov byte [eax], 0
inc eax
lea ecx, [ebp - 4]
cmp eax, ecx
jb 0x404b7a
lea eax, [ebp - 0x54]
push eax
lea eax, [esi + 0x12c]
push eax
push dword [esi + 4]
call dword [sym.imp.msi.dll_MsiDatabaseOpenViewA]
test eax, eax
je 0x404b14
push 0x1e
lea eax, [ebp - 0x54]
mov ecx, esi
push eax
call fcn.00403360
jmp 0x404b14
cmp edi, 0x54
jae 0x404bfe
mov byte [ebp + edi - 0xa8], 0
jmp 0x404b62
push 0x2e
lea ecx, [esi + 0x28]
pop edx
jmp 0x404bf9
push 0x40fd44
lea eax, [ebp - 0x1b0]
mov dword [ebp - 0x1b0], 3
push eax
call fcn.0040c0cd
push 0x22
pop edx
lea ecx, [ebp - 0xa8]
call fcn.00403242
call fcn.0040619b
int3