Function at 0x4946b0
Capabilities:
Access peb ldr_data
Check os version
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x4da7e0
mov eax, dword fs:[0]
push eax
sub esp, 0x898
mov eax, dword [0x5181f4]
xor eax, esp
mov dword [esp + 0x894], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5181f4]
xor eax, esp
push eax
lea eax, [esp + 0x8ac]
mov dword fs:[0], eax
mov eax, dword [esp + 0x8c0]
mov ebx, ecx
xor esi, esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], eax
mov dword [ebx + 4], esi
lea edi, [ebx + 0x10]
mov dword [ebx], vtable.CMN::ODBCException.0
mov dword [ebx + 8], esi
mov word [ebx + 0xc], si
mov ecx, 7
mov dword [edi + 0x18], ecx
mov dword [edi + 0x14], esi
mov dword [esp + 0x8b4], esi
mov word [edi + 4], si
mov dword [ebx + 0x44], ecx
mov dword [ebx + 0x40], esi
mov word [ebx + 0x30], si
mov dword [ebx + 0x60], ecx
mov dword [ebx + 0x5c], esi
mov word [ebx + 0x4c], si
lea ecx, [esp + 0x1c]
push ecx
push 0x200
lea edx, [esp + 0x4ac]
push edx
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0xa4]
push edx
mov ebp, 1
push ebp
push eax
mov eax, dword [esp + 0x8d8]
push eax
mov byte [esp + 0x8d4], 3
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x48], ebp
call sub.ODBC32.dll_SQLGetDiagRecW
test ax, ax
jne 0x494a84
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x8bc]
push esi
push 0xfffffffffffffff9
lea ecx, [esp + 0x20]
push ecx
push 0xfffffb7e
push ebp
push edx
push eax
mov dword [esp + 0x34], esi
mov word [esp + 0xbc], si
call sub.ODBC32.dll_SQLGetDiagFieldW
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x8c0]
push 0x402
lea edx, [esp + 0xa8]
push edx
push 0xfffffb7f
push ebp
push eax
push ecx
call sub.ODBC32.dll_SQLGetDiagFieldW
cmp bp, 1
jne 0x4948df
movsx eax, word [esp + 0x1c]
mov edx, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x4a8]
push ecx
lea ecx, [ebx + 0x2c]
mov dword [ebx + 8], edx
call fcn.00404373
mov eax, dword [edi + 0x18]
cmp eax, 8
lea ebp, [edi + 4]
jb 0x494820
mov ecx, dword [ebp]
jmp 0x494822
mov ecx, ebp
lea edx, [esp + 0x94]
cmp edx, ecx
jb 0x49486a
cmp eax, 8
jb 0x494837
mov ecx, dword [ebp]
jmp 0x494839
mov ecx, ebp
mov edx, dword [edi + 0x14]
lea ecx, [ecx + edx*2]
lea edx, [esp + 0x94]
cmp ecx, edx
jbe 0x49486a
cmp eax, 8
jb 0x494852
mov ebp, dword [ebp]
lea eax, [esp + 0x94]
sub eax, ebp
push 5
sar eax, 1
push eax
push edi
mov ecx, edi
call fcn.00404c75
jmp 0x4948b5
cmp eax, 5
jae 0x49487c
mov ecx, dword [edi + 0x14]
push ecx
push 5
mov ecx, edi
call fcn.00405840
mov ecx, dword [edi + 0x18]
cmp ecx, 8
jb 0x494889
mov eax, dword [ebp]
jmp 0x49488b
mov eax, ebp
push 0xa
lea edx, [esp + 0x98]
push edx
add ecx, ecx
push ecx
push eax
call fcn.0044203f
add esp, 0x10
cmp dword [edi + 0x18], 8
mov dword [edi + 0x14], 5
jb 0x4948b1
mov ebp, dword [ebp]
mov word [ebp + 0xa], si
movsx eax, word [esp + 0x20]
mov dx, word [esp + 0x18]
shr eax, 1
push eax
lea ecx, [esp + 0xa4]
push ecx
lea ecx, [ebx + 0x48]
mov word [ebx + 0xc], dx
call fcn.00404373
mov ebp, dword [esp + 0x28]
jmp 0x494a42
mov eax, 7
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], vtable.CMN::ODBCException.0
mov dword [esp + 0x58], eax
mov dword [esp + 0x54], esi
mov word [esp + 0x44], si
mov dword [esp + 0x74], eax
mov dword [esp + 0x70], esi
mov word [esp + 0x60], si
mov dword [esp + 0x90], eax
mov dword [esp + 0x8c], esi
mov word [esp + 0x7c], si
movsx eax, word [esp + 0x1c]
mov edx, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x4a8]
push ecx
lea ecx, [esp + 0x64]
mov byte [esp + 0x8bc], 4
mov dword [esp + 0x40], edx
call fcn.00404373
mov eax, dword [esp + 0x58]
cmp eax, 8
mov ecx, dword [esp + 0x44]
jae 0x494955
lea ecx, [esp + 0x44]
lea edx, [esp + 0x94]
cmp edx, ecx
jb 0x4949a8
cmp eax, 8
mov ecx, dword [esp + 0x44]
jae 0x49496d
lea ecx, [esp + 0x44]
mov edx, dword [esp + 0x54]
lea ecx, [ecx + edx*2]
lea edx, [esp + 0x94]
cmp ecx, edx
jbe 0x4949a8
cmp eax, 8
mov eax, dword [esp + 0x44]
jae 0x49498c
lea eax, [esp + 0x44]
lea ecx, [esp + 0x94]
sub ecx, eax
push 5
sar ecx, 1
push ecx
lea edx, [esp + 0x48]
push edx
mov ecx, edx
call fcn.00404c75
jmp 0x4949ff
cmp eax, 5
jae 0x4949c1
mov eax, dword [esp + 0x54]
push eax
push 5
lea ecx, [esp + 0x48]
call fcn.00405840
mov eax, dword [esp + 0x58]
cmp eax, 8
mov ecx, dword [esp + 0x44]
jae 0x4949ce
lea ecx, [esp + 0x44]
push 0xa
lea edx, [esp + 0x98]
push edx
add eax, eax
push eax
push ecx
call fcn.0044203f
mov eax, dword [esp + 0x54]
add esp, 0x10
cmp dword [esp + 0x58], 8
mov dword [esp + 0x54], 5
jae 0x4949fb
lea eax, [esp + 0x44]
mov word [eax + 0xa], si
movsx edx, word [esp + 0x20]
mov cx, word [esp + 0x18]
shr edx, 1
push edx
lea eax, [esp + 0xa4]
mov word [esp + 0x40], cx
push eax
lea ecx, [esp + 0x80]
call fcn.00404373
lea ecx, [esp + 0x30]
push ecx
mov ecx, ebx
call fcn.0048a9d0
lea ecx, [esp + 0x30]
mov byte [esp + 0x8b4], 3
call fcn.0040af9f
lea edx, [esp + 0x1c]
push edx
push 0x200
lea eax, [esp + 0x4ac]
push eax
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x8cc]
lea edx, [esp + 0xa4]
push edx
add ebp, 1
push ebp
push eax
push ecx
mov dword [esp + 0x48], ebp
call sub.ODBC32.dll_SQLGetDiagRecW
test ax, ax
je 0x494793
mov eax, ebx
mov ecx, dword [esp + 0x8ac]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x894]
xor ecx, esp
call fcn.00441cbb
add esp, 0x8a4
ret 8