Function at 0x495720
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
push edi
mov edi, dword [ebp + 8]
cmp byte [edi + 0x49], 1
jne 0x495786
mov dl, byte [edi + 0x48]
test dl, 2
je 0x495786
mov eax, dword [edi + 0x78]
cmp byte [eax + 2], 0
je 0x495786
mov eax, dword [edi + 0x18]
mov esi, dword [ebp + 0x10]
mov ecx, dword [edi + 0x1c]
cmp eax, esi
jne 0x495765
cmp ecx, dword [ebp + 0x14]
jne 0x495765
mov ecx, dword [ebp + 0x1c]
pop edi
mov dword [ecx], 0
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
test dl, 8
je 0x495786
cmp ecx, dword [ebp + 0x14]
jg 0x495786
jl 0x495775
cmp eax, esi
jae 0x495786
mov edx, dword [ebp + 0x1c]
pop edi
mov dword [edx], 0xffffffff
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x49579d
mov eax, esi
call fcn.00478420
mov dword [ebp - 0x10], eax
mov byte [esi + 7], 0
jmp 0x4957a4
mov dword [ebp - 0x10], 0
mov eax, edi
call fcn.00495490
test eax, eax
jne 0x495bec
cmp byte [edi + 0x49], al
jne 0x4957c9
mov eax, dword [ebp + 0x1c]
pop edi
mov dword [eax], 0xffffffff
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, 1
sub ecx, dword [ebp + 0x18]
push ebx
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 8]
movsx eax, word [edx + 0x4c]
mov ebx, dword [edx + eax*4 + 0x78]
movzx esi, word [ebx + 0x12]
mov edi, dword [ebp - 0x10]
dec esi
mov dword [ebp - 0xc], esi
sar esi, cl
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0
mov word [edx + eax*2 + 0x4e], si
test edi, edi
jne 0x495910
mov ecx, dword [ebx + 0x40]
movzx eax, byte [ecx + esi*2 + 1]
movzx ecx, byte [ecx + esi*2]
shl ecx, 8
or eax, ecx
movzx ecx, word [ebx + 0x14]
and eax, ecx
add eax, dword [ebx + 0x38]
movzx ecx, byte [ebx + 7]
add eax, ecx
cmp byte [ebx + 3], 0
je 0x495841
cmp byte [eax], 0x80
jb 0x495840
mov ecx, dword [ebx + 0x3c]
inc eax
cmp eax, ecx
jae 0x495b47
cmp byte [eax], 0x80
jae 0x495832
inc eax
lea edi, [ebp - 0x28]
call fcn.00445fe0
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x28]
cmp ecx, eax
jg 0x4958c4
jl 0x49585d
cmp edx, dword [ebp + 0x10]
jae 0x4958b9
lea eax, [esi + 1]
mov dword [ebp - 4], eax
cmp eax, dword [ebp - 0xc]
jle 0x4958cf
mov dword [ebp - 8], 0xffffffff
cmp byte [ebx + 5], 0
jne 0x495b92
movzx ecx, word [ebx + 0x12]
mov eax, dword [ebp - 4]
cmp eax, ecx
jl 0x495ae5
movzx edx, byte [ebx + 6]
mov eax, dword [ebx + 0x38]
movzx ebx, byte [edx + eax + 8]
movzx ecx, byte [edx + eax + 9]
lea eax, [edx + eax + 8]
movzx edx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ebx, 8
or ebx, ecx
shl ebx, 8
or ebx, edx
shl ebx, 8
or ebx, eax
jmp 0x495b1f
cmp ecx, eax
jl 0x4958e8
jg 0x4958c4
cmp edx, dword [ebp + 0x10]
jbe 0x4958e8
lea eax, [esi - 1]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 4], eax
jg 0x4958df
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
lea esi, [esi + eax]
sar esi, 1
jmp 0x495804
mov dword [ebp - 8], 1
jmp 0x49586f
mov eax, dword [ebp + 8]
or byte [eax + 0x48], 2
mov dword [eax + 0x1c], ecx
movsx ecx, word [eax + 0x4c]
mov dword [eax + 0x18], edx
mov word [eax + ecx*2 + 0x4e], si
cmp byte [ebx + 5], 0
jne 0x495b6c
mov dword [ebp - 4], esi
jmp 0x495879
mov edx, dword [ebx + 0x40]
movzx eax, byte [edx + esi*2 + 1]
lea ecx, [edx + esi*2]
movzx ecx, byte [ecx]
movzx edx, byte [ebx + 7]
shl ecx, 8
or eax, ecx
movzx ecx, word [ebx + 0x14]
and eax, ecx
add eax, edx
add eax, dword [ebx + 0x38]
movzx edx, byte [ebx + 8]
movzx ecx, byte [eax]
cmp ecx, edx
jg 0x495951
mov edx, dword [ebp + 0xc]
push edx
inc eax
push eax
push ecx
call edi
add esp, 0xc
mov dword [ebp - 8], eax
jmp 0x495aaf
mov dl, byte [eax + 1]
test dl, dl
js 0x495981
and ecx, 0x7f
movzx edx, dl
shl ecx, 7
add ecx, edx
movzx edx, word [ebx + 0xa]
cmp ecx, edx
jg 0x495981
mov edx, dword [ebp + 0xc]
push edx
add eax, 2
push eax
push ecx
call edi
add esp, 0xc
mov dword [ebp - 8], eax
jmp 0x495aaf
movzx ecx, byte [ebx + 7]
mov edi, dword [ebp + 8]
sub eax, ecx
push eax
push ebx
lea eax, [edi + 0x18]
call fcn.0044a0e0
mov edi, dword [edi + 0x18]
mov eax, edi
cdq
mov dword [ebp - 0x1c], edi
add esp, 8
mov edi, eax
or eax, edx
je 0x495b7e
test edx, edx
ja 0x495b7e
jb 0x4959c0
cmp edi, 0x7fffff00
jae 0x495b7e
cmp dword [0x546530], 0
je 0x495a91
mov eax, dword [0x54e878]
test eax, eax
je 0x4959e0
push eax
call dword [0x546584]
add esp, 4
lea ebx, [ebp - 0x14]
mov eax, edi
call fcn.004522b0
mov eax, dword [0x54e878]
test eax, eax
je 0x4959fd
push eax
call dword [0x54658c]
add esp, 4
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x495b7e
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
movsx ecx, word [eax + 0x4c]
push 2
push edi
push edx
push 0
push eax
mov word [eax + ecx*2 + 0x4e], si
call fcn.00490870
add esp, 0x14
mov dword [ebp - 8], eax
test eax, eax
jne 0x495b87
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x1c]
push eax
push edi
push ecx
call dword [ebp - 0x10]
add esp, 0xc
cmp dword [0x546530], 0
mov dword [ebp - 8], eax
je 0x495aa5
mov eax, dword [0x54e878]
test eax, eax
je 0x495a62
push eax
call dword [0x546584]
add esp, 4
push edi
call dword [0x546560]
sub dword [0x54e718], eax
dec dword [0x54e73c]
push edi
call dword [0x546558]
mov eax, dword [0x54e878]
add esp, 8
test eax, eax
je 0x495aaf
push eax
call dword [0x54658c]
jmp 0x495aac
push edi
call dword [0x546554]
mov edi, eax
add esp, 4
mov dword [ebp - 0x14], edi
jmp 0x495a03
push edi
call dword [0x546558]
add esp, 4
mov eax, dword [ebp - 8]
test eax, eax
jns 0x495abe
lea edx, [esi + 1]
mov dword [ebp - 4], edx
jmp 0x495aca
jle 0x495baf
lea eax, [esi - 1]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
cmp ecx, eax
jg 0x49586f
mov edi, dword [ebp - 0x10]
lea esi, [eax + ecx]
sar esi, 1
jmp 0x495910
mov ecx, dword [ebx + 0x40]
movzx edx, byte [ecx + eax*2]
lea ecx, [ecx + eax*2]
movzx eax, byte [ecx + 1]
movzx ecx, word [ebx + 0x14]
shl edx, 8
or eax, edx
and eax, ecx
add eax, dword [ebx + 0x38]
movzx ebx, byte [eax]
movzx edx, byte [eax + 1]
movzx ecx, byte [eax + 2]
shl ebx, 8
or ebx, edx
movzx edx, byte [eax + 3]
shl ebx, 8
or ebx, ecx
shl ebx, 8
or ebx, edx
mov esi, dword [ebp + 8]
movsx eax, word [esi + 0x4c]
mov cx, word [ebp - 4]
mov word [esi + eax*2 + 0x4e], cx
call fcn.004953f0
mov dword [ebp - 8], eax
test eax, eax
jne 0x495bdb
mov ecx, dword [ebp - 0x20]
jmp 0x4957d5
push 0x5246cc
push 0xe257
push str.database_corruption_at_line__d_of___.10s_
push 0xb
call fcn.004681e0
add esp, 0x10
pop ebx
pop edi
mov eax, 0xb
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x1c]
mov dword [edx], 0
mov dword [ebp - 8], 0
jmp 0x495bdb
mov dword [ebp - 8], 7
jmp 0x495bdb
push edi
call fcn.00445260
add esp, 4
jmp 0x495bdb
mov eax, dword [ebp + 8]
movsx ecx, word [eax + 0x4c]
mov edx, dword [ebp + 0x1c]
mov word [eax + ecx*2 + 0x4e], si
mov eax, dword [ebp - 8]
mov dword [edx], eax
mov dword [ebp - 8], 0
jmp 0x495bdb
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], 0
movsx edx, word [eax + 0x4c]
mov word [eax + edx*2 + 0x4e], si
mov eax, dword [ebp + 0xc]
cmp byte [eax + 7], 0
mov dword [ebp - 8], 0
je 0x495bdb
mov dword [ebp - 8], 0xb
mov eax, dword [ebp + 8]
xor ecx, ecx
and byte [eax + 0x48], 0xf9
mov word [eax + 0x2c], cx
mov eax, dword [ebp - 8]
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret