Function at 0x401000
Capabilities:
Accept command line arguments
Encode data using base64
Get hostname
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1b8c
call fcn.00408d20
push edi
mov dword [ebp - 0xf54], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0xf60], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0xf4c], 0
mov word [ebp - 0x14], 8
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xf20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xf5c], 0
mov dword [ebp - 0xf58], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x850], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 4], 0x400
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 4]
push eax
lea ecx, [ebp - 0x84c]
push ecx
push str.OSQLCMD
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x4c], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov ecx, dword [ebp - 0x4c]
add ecx, eax
lea edx, [ecx + ecx + 4]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
cmp dword [ebp - 0x4c], 0
je 0x401144
push 0x40a034
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
lea ecx, [ebp - 0x84c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00406afc
add esp, 8
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x1c]
mov dword [ebp + 8], edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [ebp - 0x18], 0
call fcn.00406290
push 0x40a038
push 0
call dword [sym.imp.MSVCRT.dll__wsetlocale]
add esp, 8
test eax, eax
je 0x40119a
push 0xfffffffffffffffe
call dword [sym.imp.MSVCRT.dll__setmbcp]
add esp, 4
cmp eax, 0xffffffff
jne 0x4011ae
push 0x2e
call fcn.00406123
add esp, 4
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
push 0x40a9a4
push 0
push 1
call sub.ODBC32.dll_SQLAllocHandle
movsx ecx, ax
cmp ecx, 0xffffffff
jne 0x4011d8
push 0x28
call fcn.00406123
add esp, 4
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
push 0
push 3
push 0xc8
mov edx, dword [0x40a9a4]
push edx
call sub.ODBC32.dll_SQLSetEnvAttr
mov word [ebp - 0xc], ax
movsx eax, word [ebp - 0xc]
test eax, eax
je 0x40121d
mov ecx, dword [0x40a9a4]
push ecx
push 1
call fcn.00405dce
add esp, 8
movsx edx, word [ebp - 0xc]
cmp edx, 0xffffffff
jne 0x40121d
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
push 0x40a9a8
mov eax, dword [0x40a9a4]
push eax
push 2
call sub.ODBC32.dll_SQLAllocHandle
mov word [ebp - 0xc], ax
movsx ecx, word [ebp - 0xc]
test ecx, ecx
je 0x40125f
mov edx, dword [0x40a9a4]
push edx
push 1
call fcn.00405dce
add esp, 8
movsx eax, word [ebp - 0xc]
cmp eax, 0xffffffff
jne 0x40125f
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
mov word [0x40bb20], 0
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 0
jle 0x40217c
mov edx, dword [ebp - 0x40]
add edx, 4
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2d
je 0x4012a6
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2f
jne 0x40217c
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x40]
mov dword [edx], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
mov dword [ebp - 0x1b70], edx
mov eax, dword [ebp - 0x1b70]
sub eax, 0x3f
mov dword [ebp - 0x1b70], eax
cmp dword [ebp - 0x1b70], 0x39
ja case.0x4012ed.36
mov edx, dword [ebp - 0x1b70]
xor ecx, ecx
mov cl, byte [edx + 0x403b87]
jmp dword [ecx*4 + 0x403af3]
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x40]
mov dword [edx], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
test edx, edx
jne 0x40134b
mov eax, dword [ebp - 0x1c]
sub eax, 1
test eax, eax
je 0x40134b
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2d
je 0x40134b
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2f
je 0x40134b
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x40]
add edx, 4
mov dword [ebp - 0x40], edx
push 0x80
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push ecx
push 0x40bd80
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40be80], 0
push 0x40bd80
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
jne 0x401398
push 0x40a044
push 0x33
call fcn.004060b8
add esp, 8
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
jmp 0x402177
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x40]
mov dword [ecx], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
test ecx, ecx
jne 0x4013f4
mov edx, dword [ebp - 0x1c]
sub edx, 1
test edx, edx
je 0x4013f4
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2d
je 0x4013f4
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2f
je 0x4013f4
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x40]
add ecx, 4
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0xf54], 1
push 0x80
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
push 0x40bb20
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40bc20], 0
jmp 0x402177
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x40]
mov dword [eax], edx
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
xor eax, eax
mov ax, word [edx]
test eax, eax
jne 0x40147c
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
test ecx, ecx
je 0x40147c
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2d
je 0x40147c
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2f
je 0x40147c
mov edx, dword [ebp - 0x1c]
sub edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x40]
add eax, 4
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x48], 1
jmp 0x402177
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x40]
mov dword [eax], edx
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
xor eax, eax
mov ax, word [edx]
test eax, eax
jne 0x4014df
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
test ecx, ecx
je 0x4014df
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2d
je 0x4014df
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2f
je 0x4014df
mov edx, dword [ebp - 0x1c]
sub edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x40]
add eax, 4
mov dword [ebp - 0x40], eax
push 0x20
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
push 0x40aca0
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40ace0], 0
push 0x40aca0
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
jne 0x401529
push 0x40a04c
push 0x33
call fcn.004060b8
add esp, 8
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
jmp 0x402177
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x40]
mov dword [edx], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
test edx, edx
jne 0x401585
mov eax, dword [ebp - 0x1c]
sub eax, 1
test eax, eax
je 0x401585
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2d
je 0x401585
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2f
je 0x401585
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x40]
add edx, 4
mov dword [ebp - 0x40], edx
push 0x80
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push ecx
push 0x40ab60
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40ac60], 0
push 0x40ab60
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
jne 0x4015d2
push 0x40a054
push 0x33
call fcn.004060b8
add esp, 8
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
jmp 0x402177
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x40]
mov dword [ecx], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
test ecx, ecx
jne 0x40162e
mov edx, dword [ebp - 0x1c]
sub edx, 1
test edx, edx
je 0x40162e
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2d
je 0x40162e
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2f
je 0x40162e
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x40]
add ecx, 4
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCRT.dll__wtol]
add esp, 4
mov dword [ebp - 0xf5c], eax
cmp dword [ebp - 0xf5c], 0x200
jb 0x40165b
cmp dword [ebp - 0xf5c], 0xffff
jbe 0x40166f
push 0x29
call fcn.00406123
add esp, 4
mov dword [ebp - 0xf5c], 0
jmp 0x402177
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x40]
mov dword [eax], edx
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
xor eax, eax
mov ax, word [edx]
test eax, eax
jne 0x4016cb
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
test ecx, ecx
je 0x4016cb
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2d
je 0x4016cb
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2f
je 0x4016cb
mov edx, dword [ebp - 0x1c]
sub edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x40]
add eax, 4
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
call dword [sym.imp.MSVCRT.dll__wtol]
add esp, 4
mov dword [ebp - 0x44], eax
jmp 0x402177
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x40]
mov dword [edx], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
test edx, edx
jne 0x401739
mov eax, dword [ebp - 0x1c]
sub eax, 1
test eax, eax
je 0x401739
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2d
je 0x401739
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2f
je 0x401739
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x40]
add edx, 4
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll__wtol]
add esp, 4
mov dword [0x40a9c4], eax
jmp 0x402177
mov dword [0x40a948], 1
jmp 0x402177
mov dword [0x40a950], 1
jmp 0x402177
cmp dword [ebp + 8], 2
jne 0x40179b
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [0x40bc24], eax
push 0
push 0
call fcn.00403da4
add esp, 8
push 0
call fcn.004057e8
add esp, 4
jmp 0x4017af
push 0x31
call fcn.00406123
add esp, 4
push 0
call fcn.004057e8
add esp, 4
jmp 0x402177
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x40]
mov dword [ecx], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
test ecx, ecx
jne 0x40180b
mov edx, dword [ebp - 0x1c]
sub edx, 1
test edx, edx
je 0x40180b
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2d
je 0x40180b
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2f
je 0x40180b
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x40]
add ecx, 4
mov dword [ebp - 0x40], ecx
push 0x3d
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
push 0x40c0c0
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40c13a], 0
push 0x40c0c0
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
je 0x401853
push 0x40a05c
push 0x40c0c0
call dword [sym.imp.MSVCRT.dll_wcscmp]
add esp, 8
test eax, eax
jne 0x401866
push 0x40a060
push 0x40c0c0
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
jmp 0x402177
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x40]
mov dword [eax], edx
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
xor eax, eax
mov ax, word [edx]
test eax, eax
jne 0x4018c2
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
test ecx, ecx
je 0x4018c2
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2d
je 0x4018c2
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2f
je 0x4018c2
mov edx, dword [ebp - 0x1c]
sub edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x40]
add eax, 4
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
call dword [sym.imp.MSVCRT.dll__wtoi]
add esp, 4
mov dword [ebp - 0xf4c], eax
jmp 0x402177
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x40]
mov dword [edx], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
test edx, edx
jne 0x401913
mov eax, dword [ebp - 0x1c]
sub eax, 1
test eax, eax
je 0x401913
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x40]
add edx, 4
mov dword [ebp - 0x40], edx
push 0xa
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push ecx
push 0x40bc40
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40bc54], 0
push 0x40bc40
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov word [0x40a960], ax
jmp 0x402177
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x40]
mov dword [ecx], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
test ecx, ecx
jne 0x4019a2
mov edx, dword [ebp - 0x1c]
sub edx, 1
test edx, edx
je 0x4019a2
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2d
je 0x4019a2
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2f
je 0x4019a2
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x40]
add ecx, 4
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCRT.dll__wtoi]
add esp, 4
mov word [ebp - 0x14], ax
jmp 0x402177
mov dword [ebp - 0xf20], 1
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x40]
mov dword [eax], edx
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
xor eax, eax
mov ax, word [edx]
test eax, eax
jne 0x401a1b
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
test ecx, ecx
je 0x401a1b
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2d
je 0x401a1b
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2f
je 0x401a1b
mov edx, dword [ebp - 0x1c]
sub edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x40]
add eax, 4
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
push 0x40b140
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
mov dword [ebp - 0x10], 1
jmp 0x402177
mov dword [0x40a010], 0
jmp 0x402177
mov dword [0x40a990], 1
jmp 0x402177
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x40]
mov dword [edx], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
test edx, edx
jne 0x401ab0
mov eax, dword [ebp - 0x1c]
sub eax, 1
test eax, eax
je 0x401ab0
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2d
je 0x401ab0
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2f
je 0x401ab0
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x40]
add edx, 4
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll__wtol]
add esp, 4
mov dword [0x40a958], eax
jmp 0x402177
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x40]
mov dword [ecx], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
test ecx, ecx
jne 0x401b20
mov edx, dword [ebp - 0x1c]
sub edx, 1
test edx, edx
je 0x401b20
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2d
je 0x401b20
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2f
je 0x401b20
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x40]
add ecx, 4
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
cmp eax, 0x13
jbe 0x401b55
push 0x14
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
push 0x40ab20
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40ab48], 0
jmp 0x401b69
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push ecx
push 0x40ab20
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
jmp 0x402177
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x40]
mov dword [ecx], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
test ecx, ecx
jne 0x401bc5
mov edx, dword [ebp - 0x1c]
sub edx, 1
test edx, edx
je 0x401bc5
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2d
je 0x401bc5
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2f
je 0x401bc5
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x40]
add ecx, 4
mov dword [ebp - 0x40], ecx
mov dword [0x40a018], 0
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
test ecx, ecx
je 0x401c0f
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2d
je 0x401c0f
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2f
je 0x401c0f
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCRT.dll__wtoi]
add esp, 4
mov dword [0x40a018], eax
jmp 0x402177
mov dword [ebp - 0x30], 1
jmp 0x402177
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x40]
mov dword [eax], edx
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
xor eax, eax
mov ax, word [edx]
test eax, eax
jne 0x401c77
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
test ecx, ecx
je 0x401c77
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2d
je 0x401c77
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2f
je 0x401c77
mov edx, dword [ebp - 0x1c]
sub edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x40]
add eax, 4
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
call dword [sym.imp.MSVCRT.dll__wtoi]
add esp, 4
mov word [0x40a962], ax
mov dword [0x40a964], 1
jmp 0x402177
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x40]
mov dword [edx], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
test edx, edx
jne 0x401cf2
mov eax, dword [ebp - 0x1c]
sub eax, 1
test eax, eax
je 0x401cf2
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2d
je 0x401cf2
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2f
je 0x401cf2
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x40]
add edx, 4
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll__wtoi]
add esp, 4
mov dword [0x40a7dc], eax
mov dword [0x40a974], 1
cmp dword [0x40a7dc], 8
jle 0x401d25
cmp dword [0x40a7dc], 0x10000
jle 0x401d39
push 0x23
call fcn.00406123
add esp, 4
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
jmp 0x402177
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x40]
mov dword [ecx], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
test ecx, ecx
jne 0x401d95
mov edx, dword [ebp - 0x1c]
sub edx, 1
test edx, edx
je 0x401d95
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2d
je 0x401d95
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2f
je 0x401d95
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x40]
add ecx, 4
mov dword [ebp - 0x40], ecx
push 0x80
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
push 0x40bc60
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40bd60], 0
jmp 0x402177
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x40]
mov dword [eax], edx
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
xor eax, eax
mov ax, word [edx]
test eax, eax
jne 0x401e13
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
test ecx, ecx
je 0x401e13
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2d
je 0x401e13
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2f
je 0x401e13
mov edx, dword [ebp - 0x1c]
sub edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x40]
add eax, 4
mov dword [ebp - 0x40], eax
push 6
push 0
lea ecx, [ebp - 0xf68]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
push 1
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0xf68]
push ecx
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
lea edx, [ebp - 0xf68]
push edx
push 0x40a7e0
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
jmp 0x402177
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x40]
mov dword [edx], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
test edx, edx
jne 0x401eaf
mov eax, dword [ebp - 0x1c]
sub eax, 1
test eax, eax
je 0x401eaf
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2d
je 0x401eaf
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2f
je 0x401eaf
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x40]
add edx, 4
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll__wtoi]
add esp, 4
mov dword [0x40a9d8], eax
jmp 0x402177
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x40]
mov dword [ecx], eax
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
xor ecx, ecx
mov cx, word [eax]
test ecx, ecx
jne 0x401f1f
mov edx, dword [ebp - 0x1c]
sub edx, 1
test edx, edx
je 0x401f1f
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2d
je 0x401f1f
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 4]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x2f
je 0x401f1f
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x40]
add ecx, 4
mov dword [ebp - 0x40], ecx
push 0x104
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
push 0x40af20
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40b128], 0
push 0x40af20
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
jne 0x401f6c
push 0x40a070
push 0x33
call fcn.004060b8
add esp, 8
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
jmp 0x402177
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x40]
mov dword [eax], edx
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
xor eax, eax
mov ax, word [edx]
test eax, eax
jne 0x401fc8
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
test ecx, ecx
je 0x401fc8
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2d
je 0x401fc8
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + 4]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 0x2f
je 0x401fc8
mov edx, dword [ebp - 0x1c]
sub edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x40]
add eax, 4
mov dword [ebp - 0x40], eax
push 0x104
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
push 0x40c360
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40c568], 0
push 0x40c360
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
jne 0x402017
push 0x40a078
push 0x33
call fcn.004060b8
add esp, 8
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
jmp 0x402021
mov dword [0x40a978], 1
jmp 0x402177
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x40]
mov dword [edx], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
test edx, edx
jne 0x40207d
mov eax, dword [ebp - 0x1c]
sub eax, 1
test eax, eax
je 0x40207d
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2d
je 0x40207d
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2f
je 0x40207d
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x40]
add edx, 4
mov dword [ebp - 0x40], edx
mov dword [0x40a944], 1
jmp 0x402177
mov dword [ebp - 0xf60], 1
jmp 0x402177
mov dword [ebp - 0x20], 1
jmp 0x402177
mov dword [0x40a954], 1
jmp 0x402177
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x40]
mov dword [edx], ecx
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
xor edx, edx
mov dx, word [ecx]
test edx, edx
jne 0x40210d
mov eax, dword [ebp - 0x1c]
sub eax, 1
test eax, eax
je 0x40210d
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2d
je 0x40210d
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx + 4]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x2f
je 0x40210d
mov ecx, dword [ebp - 0x1c]
sub ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x40]
add edx, 4
mov dword [ebp - 0x40], edx
push 0xff
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
push ecx
push 0x40b920
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
mov word [0x40bb1e], 0
jmp 0x402177
push 0x100
push 0x40ad00
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.0040615e
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
push 0x40ad00
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
push edx
call fcn.00404d2d
add esp, 4
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
jmp 0x401268
mov eax, dword [0x40a984]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [0x40a984]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [0x40a984], 0
cmp dword [ebp - 0x1c], 0
jle 0x4021bd
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
push eax
call fcn.00404d2d
add esp, 4
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
xor ecx, ecx
mov cx, word [0x40c0c0]
test ecx, ecx
jne 0x4021e1
xor edx, edx
mov dx, word [0x40aca0]
test edx, edx
jne 0x4021e1
push 2
call fcn.00404df4
add esp, 4
xor eax, eax
mov ax, word [0x40ab20]
test eax, eax
jne 0x402200
push 0x40a080
push 0x40ab20
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0x40ab20
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
mov word [0x40a9f0], ax
push str.EDITOR
call dword [sym.imp.MSVCRT.dll__wgetenv]
add esp, 4
mov dword [0x40a998], eax
cmp dword [0x40a998], 0
jne 0x40223a
mov dword [0x40a998], str.EDIT
xor ecx, ecx
mov cx, word [0x40af20]
test ecx, ecx
je 0x4022a5
push 0x40a020
push 0x40a99c
push 0x40af20
call fcn.00403bf2
add esp, 0xc
test eax, eax
je 0x4022a3
push 0x100
push 0x40ad00
push 5
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.0040615e
push 0x40af20
push 0x40ad00
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
push 6
call fcn.00406123
add esp, 4
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
jmp 0x4022b1
mov edx, dword [sym.imp.MSVCRT.dll__iob]
mov dword [0x40a99c], edx
xor eax, eax
mov ax, word [0x40c360]
test eax, eax
je 0x402430
mov dword [ebp - 0xf6c], 0
cmp dword [ebp - 0x20], 0
je 0x4022dd
mov dword [0x40a01c], 1
jmp 0x4022e9
mov ecx, dword [0x40a020]
mov dword [0x40a01c], ecx
cmp dword [0x40a01c], 3
je 0x4022fb
cmp dword [0x40a01c], 2
jne 0x402314
push 0x40a0a4
push 0x40c360
push 0x40a9a0
call fcn.00406733
add esp, 0xc
jmp 0x402340
cmp dword [0x40a01c], 1
jne 0x402336
push 0x40a0ac
push 0x40c360
push 0x40a9a0
call fcn.00406733
add esp, 0xc
jmp 0x402340
mov dword [0x40a9a0], 0
cmp dword [0x40a9a0], 0
je 0x4023da
push 1
mov edx, dword [0x40a9a0]
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll__dup2]
add esp, 8
test eax, eax
jne 0x4023ce
cmp dword [0x40a01c], 1
jne 0x4023cc
mov word [ebp - 0xf70], 0xfeff
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
add ecx, 0x20
push ecx
push 1
push 2
lea edx, [ebp - 0xf70]
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
je 0x4023a7
mov dword [ebp - 0xf6c], 1
jmp 0x4023cc
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 4
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
add ecx, 0x20
push ecx
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 4
jmp 0x4023d8
mov dword [ebp - 0xf6c], 1
jmp 0x4023e4
mov dword [ebp - 0xf6c], 1
cmp dword [ebp - 0xf6c], 1
jne 0x40242e
push 0x100
push 0x40ad00
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.0040615e
push 0x40c360
push 0x40ad00
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
push 2
call fcn.00406123
add esp, 4
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
jmp 0x40243a
mov dword [0x40a01c], 3
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [0x40bc24], eax
push 0
mov edx, dword [ebp - 0x14]
and edx, 0xffff
push edx
push 0x67
mov eax, dword [0x40a9a8]
push eax
call sub.ODBC32.dll_SQLSetConnectAttrW
mov word [ebp - 0xc], ax
movsx ecx, word [ebp - 0xc]
test ecx, ecx
je 0x402490
mov edx, dword [0x40a9a8]
push edx
push 2
call fcn.00405dce
add esp, 8
movsx eax, word [ebp - 0xc]
cmp eax, 0xffffffff
jne 0x402490
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
cmp dword [ebp - 0xf5c], 0
je 0x4024e0
push 0
mov ecx, dword [ebp - 0xf5c]
push ecx
push 0x70
mov edx, dword [0x40a9a8]
push edx
call sub.ODBC32.dll_SQLSetConnectAttrW
mov word [ebp - 0xc], ax
movsx eax, word [ebp - 0xc]
test eax, eax
je 0x4024e0
mov ecx, dword [0x40a9a8]
push ecx
push 2
call fcn.00405dce
add esp, 8
movsx edx, word [ebp - 0xc]
cmp edx, 0xffffffff
jne 0x4024e0
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
cmp dword [0x40a950], 0
je 0x4024fd
push 1
push 0x4c1
mov eax, dword [0x40a9a8]
push eax
call sub.ODBC32.dll_SQLSetConnectOptionW
jmp 0x402510
push 0
push 0x4c1
mov ecx, dword [0x40a9a8]
push ecx
call sub.ODBC32.dll_SQLSetConnectOptionW
xor edx, edx
mov dx, word [0x40aca0]
test edx, edx
je 0x402549
push str.DSN
lea eax, [ebp - 0xf18]
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0x40aca0
lea ecx, [ebp - 0xf18]
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
jmp 0x402573
push str.DriverSQL_Server_Server
lea edx, [ebp - 0xf18]
push edx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0x40c0c0
lea eax, [ebp - 0xf18]
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
cmp dword [ebp - 0x48], 0
je 0x402593
push str._Trusted_ConnectionYES
lea ecx, [ebp - 0xf18]
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
jmp 0x40264a
push str._UID
lea edx, [ebp - 0xf18]
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
xor eax, eax
mov ax, word [0x40bd80]
test eax, eax
jne 0x4025c2
push 0
call fcn.00404df4
add esp, 4
test eax, eax
je 0x4025d9
push 0x40bd80
lea ecx, [ebp - 0xf18]
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
jmp 0x4025f3
call fcn.00404daa
push 0x40aa00
lea edx, [ebp - 0xf18]
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
cmp dword [ebp - 0xf54], 0
jne 0x402620
push 1
call fcn.00404df4
add esp, 4
test eax, eax
jne 0x402620
xor eax, eax
mov ax, word [0x40aca0]
test eax, eax
jne 0x402620
call fcn.00404eaf
call fcn.00404f41
push str._PWD
lea ecx, [ebp - 0xf18]
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
push 0x40bb20
lea edx, [ebp - 0xf18]
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
push str._APPOSQL_32_WSID
lea eax, [ebp - 0xf18]
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
xor ecx, ecx
mov cx, word [0x40ab60]
test ecx, ecx
je 0x402683
push 0x40ab60
lea edx, [ebp - 0xf18]
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
jmp 0x4026e9
push 0x40
lea eax, [ebp - 0xf48]
push eax
push str.COMPUTERNAME
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x4026d2
mov dword [0x40a9b8], 0x10
push 0x40a9b8
lea ecx, [ebp - 0xf48]
push ecx
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x4026d0
push str.Win32_PC_Client
lea edx, [ebp - 0xf18]
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
jmp 0x4026e9
lea eax, [ebp - 0xf48]
push eax
lea ecx, [ebp - 0xf18]
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
xor edx, edx
mov dx, word [0x40bc60]
test edx, edx
je 0x402720
push str._DATABASE
lea eax, [ebp - 0xf18]
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
push 0x40bc60
lea ecx, [ebp - 0xf18]
push ecx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
push 0x40a1bc
lea edx, [ebp - 0xf18]
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
push 0
push 0
push 0
push 0
push 0xfffffffffffffffd
lea eax, [ebp - 0xf18]
push eax
push 0
mov ecx, dword [0x40a9a8]
push ecx
call sub.ODBC32.dll_SQLDriverConnectW
mov word [ebp - 0xc], ax
movsx edx, word [ebp - 0xc]
test edx, edx
je 0x402788
mov eax, dword [0x40a9a8]
push eax
push 2
call fcn.00405dce
add esp, 8
movsx ecx, word [ebp - 0xc]
cmp ecx, 0xffffffff
jne 0x402788
call fcn.0040669b
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
cmp dword [ebp - 0x44], 0
je 0x4027d4
push 0xfffffffffffffffb
mov edx, dword [ebp - 0x44]
push edx
push 0x91a7
mov eax, dword [0x40a9a8]
push eax
call sub.ODBC32.dll_SQLSetConnectAttrW
mov word [ebp - 0xc], ax
movsx ecx, word [ebp - 0xc]
test ecx, ecx
je 0x4027d4
mov edx, dword [0x40a9a8]
push edx
push 2
call fcn.00405dce
add esp, 8
movsx eax, word [ebp - 0xc]
cmp eax, 0xffffffff
jne 0x4027d4
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
push 0x40a9ac
mov ecx, dword [0x40a9a8]
push ecx
push 3
call sub.ODBC32.dll_SQLAllocHandle
mov word [ebp - 0xc], ax
movsx edx, word [ebp - 0xc]
test edx, edx
je 0x402816
mov eax, dword [0x40a9a8]
push eax
push 2
call fcn.00405dce
add esp, 8
movsx ecx, word [ebp - 0xc]
cmp ecx, 0xffffffff
jne 0x402816
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
push 0xfffffffffffffffb
mov edx, dword [ebp - 0xf4c]
push edx
push 0
mov eax, dword [0x40a9ac]
push eax
call sub.ODBC32.dll_SQLSetStmtAttrW
mov word [ebp - 0xc], ax
movsx ecx, word [ebp - 0xc]
test ecx, ecx
je 0x40285c
mov edx, dword [0x40a9ac]
push edx
push 3
call fcn.00405dce
add esp, 8
movsx eax, word [ebp - 0xc]
cmp eax, 0xffffffff
jne 0x40285c
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
cmp dword [0x40a958], 0
je 0x4028ac
push 0xfffffffffffffffb
mov ecx, dword [0x40a958]
push ecx
push 3
mov edx, dword [0x40a9ac]
push edx
call sub.ODBC32.dll_SQLSetStmtAttrW
mov word [ebp - 0xc], ax
movsx eax, word [ebp - 0xc]
test eax, eax
je 0x4028ac
mov ecx, dword [0x40a9ac]
push ecx
push 3
call fcn.00405dce
add esp, 8
movsx edx, word [ebp - 0xc]
cmp edx, 0xffffffff
jne 0x4028ac
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
cmp dword [0x40a990], 0
je 0x4028f9
push 0xfffffffffffffffb
push 1
push 0x4cd
mov eax, dword [0x40a9ac]
push eax
call sub.ODBC32.dll_SQLSetStmtAttrW
mov word [ebp - 0xc], ax
movsx ecx, word [ebp - 0xc]
test ecx, ecx
je 0x4028f9
mov edx, dword [0x40a9ac]
push edx
push 3
call fcn.00405dce
add esp, 8
movsx eax, word [ebp - 0xc]
cmp eax, 0xffffffff
jne 0x4028f9
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
push 1
push 0x405705
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test eax, eax
jne 0x40291e
push 3
call fcn.00406123
add esp, 4
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
xor ecx, ecx
mov cx, word [0x40b920]
test ecx, ecx
je 0x402a11
mov word [ebp - 0x1740], 0
mov ecx, 0x1f3
xor eax, eax
lea edi, [ebp - 0x173e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x174c], 0
mov dword [ebp - 0x1744], 0
mov dword [ebp - 0x1748], 0xfffffffd
push 0x40a1c0
lea edx, [ebp - 0x1740]
push edx
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
lea eax, [ebp - 0x1744]
push eax
push 0
lea ecx, [ebp - 0x174c]
push ecx
push 0
push 0
push 4
push 0xfffffffffffffff0
push 4
push 1
mov edx, dword [0x40a9ac]
push edx
call sub.ODBC32.dll_SQLBindParameter
mov word [ebp - 0xc], ax
lea eax, [ebp - 0x1748]
push eax
push 0
push 0x40b920
push 0
push 0xff
push 1
push 0xfffffffffffffff8
push 1
push 2
mov ecx, dword [0x40a9ac]
push ecx
call sub.ODBC32.dll_SQLBindParameter
mov word [ebp - 0xc], ax
push 0xfffffffffffffffd
lea edx, [ebp - 0x1740]
push edx
mov eax, dword [0x40a9ac]
push eax
call sub.ODBC32.dll_SQLExecDirectW
mov word [ebp - 0xc], ax
movsx ecx, word [ebp - 0xc]
cmp ecx, 0xffffffff
jne 0x402a11
mov edx, dword [0x40a9ac]
push edx
push 3
call fcn.00405dce
add esp, 8
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
push 0x1000
push 0x400
push 0x40c13c
call fcn.00405c6a
add esp, 0xc
cmp dword [0x40a978], 0
jne 0x402a65
cmp dword [0x40a974], 0
jne 0x402a65
cmp dword [0x40a944], 0
jne 0x402a65
push 0x40ac80
mov eax, dword [0x40bc24]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x402a65
movsx ecx, word [0x40ac80]
mov dword [0x40a7dc], ecx
mov edx, 1
test edx, edx
je 0x403ab1
mov dword [ebp - 0x1754], 0
mov dword [ebp - 0x1750], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1b74], eax
cmp dword [ebp - 0x1b74], 1
je 0x402aac
cmp dword [ebp - 0x1b74], 2
je 0x402ab8
cmp dword [ebp - 0x1b74], 3
je 0x402ae0
jmp 0x402aff
mov dword [ebp - 0x10], 2
jmp 0x402c7f
push 0x40ab20
push 0x40b140
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
mov ecx, dword [ebp - 0xf20]
neg ecx
sbb ecx, ecx
and ecx, 3
mov dword [ebp - 0x10], ecx
jmp 0x402c7f
push 0x40a210
push 0x40b140
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
mov dword [ebp - 0x10], 0
jmp 0x402c7f
cmp dword [0x40a944], 0
jne 0x402be9
cmp dword [0x40a994], 0
jne 0x402b70
cmp dword [0x40a010], 0
je 0x402b5c
xor edx, edx
mov dx, word [0x40a014]
mov dword [ebp - 0x1b78], edx
mov eax, dword [ebp - 0x1b78]
push eax
push 0x40a21c
mov cx, word [0x40a014]
add cx, 1
mov word [0x40a014], cx
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
mov dword [ebp - 0x1b7c], eax
jmp 0x402b66
mov dword [ebp - 0x1b7c], 1
mov dword [0x40af00], 1
mov edx, dword [0x40a99c]
push edx
push 0x3e8
push 0x40b140
call dword [sym.imp.MSVCRT.dll_fgetws]
add esp, 0xc
test eax, eax
jne 0x402bda
cmp dword [0x40a9b4], 0
jne 0x402bda
cmp dword [0x40a994], 0
jne 0x402bc9
push 0x40ab20
push 0x40b140
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
mov dword [0x40a994], 1
mov dword [0x40a9b4], 0
jmp 0x402bd8
mov dword [ebp - 0x1754], 1
jmp 0x402c7f
jmp 0x402be4
mov dword [0x40a9b4], 0
jmp 0x402c7f
cmp dword [0x40a010], 0
je 0x402c2f
xor eax, eax
mov ax, word [0x40a014]
mov dword [ebp - 0x1b80], eax
mov ecx, dword [ebp - 0x1b80]
push ecx
push str._d_
mov dx, word [0x40a014]
add dx, 1
mov word [0x40a014], dx
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
mov dword [ebp - 0x1b84], eax
jmp 0x402c39
mov dword [ebp - 0x1b84], 1
mov dword [0x40af00], 1
mov eax, dword [0x40a99c]
push eax
push 0x3e8
push 0x40b140
call dword [sym.imp.MSVCRT.dll_fgetws]
add esp, 0xc
test eax, eax
jne 0x402c75
cmp dword [0x40a9b4], 0
jne 0x402c75
mov dword [ebp - 0x1754], 1
jmp 0x402c7f
mov dword [0x40a9b4], 0
cmp dword [ebp - 0x1754], 0
je 0x402c8d
jmp 0x403ab1
push 0x40b140
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
cmp eax, 0x3e8
jbe 0x402cac
push 0x22
call fcn.00406123
add esp, 4
mov dword [0x40af00], 0
push 0x40b140
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
sub eax, 1
mov dword [ebp - 0xf24], eax
mov ecx, dword [ebp - 0xf24]
xor edx, edx
mov dx, word [ecx*2 + 0x40b140]
cmp edx, 0xa
jne 0x402d2b
cmp dword [0x40a020], 1
jne 0x402d1b
cmp dword [ebp - 0xf24], 0
jle 0x402d19
mov eax, dword [ebp - 0xf24]
xor ecx, ecx
mov cx, word [eax*2 + 0x40b13e]
cmp ecx, 0xd
jne 0x402d19
mov edx, dword [ebp - 0xf24]
mov word [edx*2 + 0x40b13e], 0
jmp 0x402d2b
mov eax, dword [ebp - 0xf24]
mov word [eax*2 + 0x40b140], 0
push 4
push str.quit
push 0x40b140
call fcn.00405a9c
add esp, 0xc
test eax, eax
jne 0x403a85
push 4
push 0x40a240
push 0x40b140
call fcn.00405a9c
add esp, 0xc
test eax, eax
jne 0x403a85
cmp dword [0x40a9bc], 0
jne 0x402e24
push 4
push str.exit
push 0x40b140
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x402e24
mov dword [ebp - 0x1758], 0x40b148
jmp 0x402da8
mov ecx, dword [ebp - 0x1758]
add ecx, 2
mov dword [ebp - 0x1758], ecx
mov edx, dword [ebp - 0x1758]
xor eax, eax
mov ax, word [edx]
test eax, eax
je 0x402dd9
mov ecx, dword [ebp - 0x1758]
xor edx, edx
mov dx, word [ecx]
cmp edx, 0x20
je 0x402dd7
mov eax, dword [ebp - 0x1758]
xor ecx, ecx
mov cx, word [eax]
cmp ecx, 9
jne 0x402dd9
jmp 0x402d99
mov edx, dword [ebp - 0x1758]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x28
jne 0x402e24
jmp 0x402e05
mov ecx, dword [ebp - 0x1758]
mov word [ecx], 0x20
mov edx, dword [ebp - 0x1758]
sub edx, 2
mov dword [ebp - 0x1758], edx
cmp dword [ebp - 0x1758], 0x40b140
jb 0x402e13
jmp 0x402deb
mov dword [0x40a9bc], 1
mov dword [ebp - 0x24], 1
cmp dword [0x40a9bc], 0
je 0x402f05
mov dword [ebp - 0x175c], 0x40b140
jmp 0x402e4c
mov eax, dword [ebp - 0x175c]
add eax, 2
mov dword [ebp - 0x175c], eax
mov ecx, dword [ebp - 0x175c]
xor edx, edx
mov dx, word [ecx]
test edx, edx
je 0x402ec3
cmp dword [ebp - 0x24], 0
je 0x402ec3
mov eax, dword [ebp - 0x175c]
xor ecx, ecx
mov cx, word [eax]
mov dword [ebp - 0x1b88], ecx
mov edx, dword [ebp - 0x1b88]
sub edx, 9
mov dword [ebp - 0x1b88], edx
cmp dword [ebp - 0x1b88], 0x20
ja case.0x402e98.3
mov ecx, dword [ebp - 0x1b88]
xor eax, eax
mov al, byte [ecx + 0x403bd1]
jmp dword [eax*4 + 0x403bc1]
jmp 0x402ebe
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
jmp 0x402ebe
mov eax, dword [ebp - 0x24]
sub eax, 1
mov dword [ebp - 0x24], eax
jmp 0x402ebe
mov dword [ebp - 8], 1
jmp 0x402e3d
cmp dword [ebp - 0x24], 0
jne 0x402ef6
mov ecx, dword [ebp - 0x175c]
mov word [ecx - 2], 0
cmp dword [ebp - 8], 0
jne 0x402ef6
mov dword [ebp - 0x10], 2
mov dword [ebp - 0xf20], 1
mov dword [0x40a9bc], 0
mov dword [ebp - 0x1750], 1
jmp 0x403074
push 2
push 0x40a258
push 0x40b140
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x402f50
mov edx, dword [sym.imp.MSVCRT.dll__iob]
add edx, 0x20
push edx
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 4
mov eax, dword [0x40a01c]
push eax
mov ecx, dword [0x40a9a0]
push ecx
push 0x40b144
call fcn.00406372
add esp, 0xc
jmp 0x402a65
push 2
push 0x40a260
push 0x40b140
call fcn.00405a9c
add esp, 0xc
test eax, eax
je 0x402f7e
mov dword [ebp - 0x38], 0
call fcn.00405116
call fcn.0040538e
jmp 0x402a65
push 2
push 0x40a268
push 0x40b140
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x402fd4
cmp dword [ebp - 0x38], 0
je 0x402fb1
mov edx, dword [0x40c13c]
mov dword [edx + 4], 0
mov dword [ebp - 0x38], 0
call fcn.00405540
call fcn.004055b5
mov eax, dword [0x40c13c]
cmp dword [eax + 4], 0
jne 0x402fcf
mov word [0x40b128], 0
jmp 0x402a65
push 5
push str.reset
push 0x40b140
call fcn.00405a9c
add esp, 0xc
test eax, eax
je 0x403019
mov word [0x40b140], 0
mov word [0x40a014], 1
mov ecx, dword [0x40c13c]
mov dword [ecx + 4], 0
mov word [0x40b128], 0
jmp 0x402a65
xor edx, edx
mov dx, word [0x40a960]
test edx, edx
je 0x40304a
xor eax, eax
mov ax, word [0x40a960]
push eax
push 0x40bc40
push 0x40b140
call fcn.00405a9c
add esp, 0xc
test eax, eax
je 0x40304a
jmp 0x402a65
xor ecx, ecx
mov cx, word [0x40a9f0]
push ecx
push 0x40ab20
push 0x40b140
call fcn.00405a9c
add esp, 0xc
test eax, eax
jne 0x403074
mov dword [ebp - 0x1750], 1
cmp dword [ebp - 0x1750], 0
je 0x403142
cmp dword [ebp - 0x38], 0
je 0x40309b
mov edx, dword [0x40c13c]
mov dword [edx + 4], 0
mov dword [ebp - 0x38], 0
push 0x40b140
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
cmp eax, 0x3e7
je 0x4030e1
cmp dword [0x40a944], 0
je 0x4030ce
push 0x40a27c
push 0x40b140
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
jmp 0x4030e1
push 0x40a280
push 0x40b140
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
push 0xfffffffffffffffd
push 0x40b140
push 0x40c13c
call fcn.00405cc6
add esp, 0xc
mov ax, word [0x40b128]
add ax, 1
mov word [0x40b128], ax
cmp dword [0x40a9b0], 0
je 0x40312e
mov ecx, dword [0x40c13c]
mov dword [ecx + 4], 0
mov word [0x40a014], 2
mov dword [0x40a9b0], 0
cmp dword [0x40a9bc], 0
je 0x40313d
cmp dword [ebp - 0x24], 0
je 0x403142
jmp 0x402a65
cmp dword [0x40a994], 0
je 0x4031a1
push 0x19
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x40a9b0], 0
je 0x4031a1
push 0x40a288
call fcn.00406c30
add esp, 4
mov word [0x40b140], 0
mov word [0x40a014], 1
mov edx, dword [0x40c13c]
mov dword [edx + 4], 0
mov dword [0x40a994], 0
mov dword [0x40a9b0], 0
jmp 0x402a65
movsx eax, word [0x40b914]
cmp eax, 1
jge 0x4031b6
mov word [0x40b914], 1
cmp dword [ebp - 0x38], 0
je 0x4031d2
mov ecx, dword [0x40c13c]
mov dword [ecx + 4], 0
mov word [0x40b128], 0
xor edx, edx
mov dx, word [0x40b128]
test edx, edx
jne 0x4031ed
mov word [0x40a014], 1
jmp 0x402a65
call dword [sym.imp.MSVCRT.dll_clock]
mov dword [0x40c0ac], eax
cmp dword [0x40a948], 0
je 0x403214
cmp dword [0x40a94c], 0
je 0x403214
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
push 0
movsx eax, word [0x40b914]
push eax
mov ecx, dword [0x40a9ac]
push ecx
call sub.ODBC32.dll_SQLParamOptions
movsx edx, ax
test edx, edx
je 0x403241
mov eax, dword [0x40a9ac]
push eax
push 3
call fcn.00405dce
add esp, 8
mov dword [0x40a95c], 0
mov word [ebp - 0xf1c], 0
mov dword [ebp - 0x3c], 0x64
cmp dword [ebp - 0xf4c], 0
je 0x403272
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [ebp - 0x2c], eax
push 0xfffffffffffffffb
push 1
push 4
mov ecx, dword [0x40a9ac]
push ecx
call sub.ODBC32.dll_SQLSetStmtAttrW
mov word [ebp - 0xc], ax
movsx edx, word [ebp - 0xc]
test edx, edx
je 0x4032b3
mov eax, dword [0x40a9ac]
push eax
push 3
call fcn.00405dce
add esp, 8
movsx ecx, word [ebp - 0xc]
cmp ecx, 0xffffffff
jne 0x4032b3
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
mov edx, dword [0x40c13c]
mov eax, dword [edx + 4]
shr eax, 1
push eax
mov ecx, dword [0x40c13c]
add ecx, 0xc
push ecx
mov edx, dword [0x40a9ac]
push edx
call sub.ODBC32.dll_SQLExecDirectW
mov word [ebp - 0xc], ax
movsx eax, word [ebp - 0xc]
cmp eax, 2
jne 0x4033aa
mov ecx, dword [0x40a9ac]
push ecx
push 3
call fcn.00405dce
add esp, 8
cmp dword [ebp - 0xf4c], 0
je 0x40337f
mov edx, dword [ebp - 0xf1c]
and edx, 0xffff
cmp edx, 5
jge 0x40331b
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0xf1c]
push ecx
lea edx, [ebp - 0x3c]
push edx
call fcn.00405a3a
add esp, 8
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x2c]
and eax, 0xffff
cmp eax, dword [ebp - 0xf4c]
jle 0x403368
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [ebp - 0x2c], eax
push 7
call fcn.00406123
add esp, 4
mov ecx, dword [0x40a9ac]
push ecx
call sub.ODBC32.dll_SQLCancel
cmp dword [0x40a9b0], 0
je 0x40337d
mov edx, dword [0x40a9ac]
push edx
call sub.ODBC32.dll_SQLCancel
jmp 0x4033a5
cmp dword [0x40a9b0], 0
je 0x403395
mov eax, dword [0x40a9ac]
push eax
call sub.ODBC32.dll_SQLCancel
jmp 0x4033a5
cmp dword [ebp - 0x3c], 0
je 0x4033a5
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4032b3
movsx edx, word [ebp - 0xc]
test edx, edx
je 0x4033da
mov eax, dword [0x40a9ac]
push eax
push 3
call fcn.00405dce
add esp, 8
movsx ecx, word [ebp - 0xc]
cmp ecx, 1
je 0x4033d4
movsx edx, word [ebp - 0xc]
cmp edx, 0x64
jne 0x4033da
mov word [ebp - 0xc], 0
push 0xfffffffffffffffb
push 0
push 4
mov eax, dword [0x40a9ac]
push eax
call sub.ODBC32.dll_SQLSetStmtAttrW
mov word [ebp - 0xc], ax
movsx ecx, word [ebp - 0xc]
test ecx, ecx
je 0x40341b
mov edx, dword [0x40a9ac]
push edx
push 3
call fcn.00405dce
add esp, 8
movsx eax, word [ebp - 0xc]
cmp eax, 0xffffffff
jne 0x40341b
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
mov dword [ebp - 0x38], 1
cmp dword [ebp - 0x30], 0
je 0x40348e
mov dword [ebp - 0xf24], 0
jmp 0x403443
mov ecx, dword [ebp - 0xf24]
add ecx, 1
mov dword [ebp - 0xf24], ecx
mov edx, dword [0x40c13c]
mov eax, dword [edx + 4]
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp - 0xf24], eax
jge 0x40348e
mov eax, dword [ebp - 0xf24]
mov ecx, dword [0x40c13c]
xor edx, edx
mov dx, word [ecx + eax*2 + 0xc]
cmp edx, 0xd
je 0x40348c
mov eax, dword [ebp - 0xf24]
mov ecx, dword [0x40c13c]
mov dx, word [ecx + eax*2 + 0xc]
push edx
call dword [sym.imp.MSVCRT.dll__fputwchar]
add esp, 4
jmp 0x403434
mov dword [ebp - 0xf24], 0xfffffffa
lea eax, [ebp - 0xf28]
push eax
lea ecx, [ebp - 0xf24]
push ecx
push 0
push 0
push 0x4b5
push 1
mov edx, dword [0x40a9ac]
push edx
call sub.ODBC32.dll_SQLColAttributeW
movsx eax, ax
test eax, eax
jne 0x4035dc
cmp dword [ebp - 0xf28], 0
jle 0x4035dc
cmp dword [ebp - 0xf58], 0
je 0x4034f8
mov ecx, dword [ebp - 0xf58]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [ebp - 0xf58], 0
mov dword [ebp - 0xf24], 0xfffffffa
lea edx, [ebp - 0xf28]
push edx
lea eax, [ebp - 0xf24]
push eax
push 0
push 0
push 0x3e9
push 1
mov ecx, dword [0x40a9ac]
push ecx
call sub.ODBC32.dll_SQLColAttributeW
mov edx, dword [ebp - 0xf28]
shl edx, 2
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0xf58], eax
cmp dword [ebp - 0xf58], 0
jne 0x403561
push 0x6fa
push 0x40a290
push 0x40a2ac
call dword [sym.imp.MSVCRT.dll__assert]
add esp, 0xc
mov ecx, dword [ebp - 0xf58]
mov dword [0x40a9cc], ecx
mov edx, dword [ebp - 0xf28]
shl edx, 2
push edx
push 0
mov eax, dword [ebp - 0xf58]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0xf24], 1
jmp 0x4035a3
mov ecx, dword [ebp - 0xf24]
add ecx, 1
mov dword [ebp - 0xf24], ecx
mov edx, dword [ebp - 0xf24]
cmp edx, dword [ebp - 0xf28]
jg 0x4035dc
mov eax, dword [ebp - 0xf24]
push eax
mov ecx, dword [0x40a9ac]
push ecx
call fcn.00408872
add esp, 8
movsx edx, ax
mov eax, dword [ebp - 0xf24]
mov ecx, dword [ebp - 0xf58]
mov dword [ecx + eax*4 - 4], edx
jmp 0x403594
mov dword [ebp - 0xf28], 0
movsx edx, word [ebp - 0xc]
test edx, edx
je 0x4035fb
movsx eax, word [ebp - 0xc]
cmp eax, 1
jne 0x4039c6
cmp dword [0x40a9bc], 0
je 0x40360e
mov dword [0x40a9c0], 0xffffff9c
cmp dword [0x40a968], 0
je 0x403624
push 0x1776
call fcn.004057e8
add esp, 4
cmp dword [0x40a96c], 0
je 0x40363c
mov ecx, dword [0x40a96c]
push ecx
call fcn.004057e8
add esp, 4
cmp dword [0x40a9b0], 0
je 0x403656
mov edx, dword [0x40a9ac]
push edx
call sub.ODBC32.dll_SQLCancel
jmp 0x4039c6
mov dword [ebp - 0xf28], 1
cmp dword [ebp - 0xf58], 0
jne 0x4036ca
mov eax, dword [ebp - 0xf28]
shl eax, 2
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0xf58], eax
cmp dword [ebp - 0xf58], 0
jne 0x4036a3
push 0x726
push 0x40a2c0
push str.NULL___pColPrSize
call dword [sym.imp.MSVCRT.dll__assert]
add esp, 0xc
mov edx, dword [ebp - 0xf58]
mov dword [0x40a9cc], edx
mov eax, dword [ebp - 0xf28]
shl eax, 2
push eax
push 0
mov ecx, dword [ebp - 0xf58]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
movsx edx, word [ebp - 0xc]
test edx, edx
je 0x4036df
movsx eax, word [ebp - 0xc]
cmp eax, 1
jne 0x403942
cmp dword [0x40a9b0], 0
je 0x4036f9
mov ecx, dword [0x40a9ac]
push ecx
call sub.ODBC32.dll_SQLCancel
jmp 0x4039c6
cmp dword [0x40a96c], 0
je 0x403711
mov edx, dword [0x40a96c]
push edx
call fcn.004057e8
add esp, 4
movsx eax, word [ebp - 0xc]
cmp eax, 1
jne 0x40372b
mov ecx, dword [0x40a9ac]
push ecx
push 3
call fcn.00405dce
add esp, 8
lea edx, [ebp - 0xf24]
push edx
push 0
push 0
push 0
push 0x3e9
push 0
mov eax, dword [0x40a9ac]
push eax
call sub.ODBC32.dll_SQLColAttributeW
movsx ecx, ax
test ecx, ecx
je 0x40375b
mov dword [ebp - 0xf24], 0
cmp dword [0x40a9bc], 0
je 0x403777
cmp dword [ebp - 0xf24], 0
je 0x403777
mov dword [0x40a9c0], 0xffffff9b
mov edx, dword [ebp - 0xf58]
push edx
mov eax, dword [0x40a9ac]
push eax
call fcn.004085bd
add esp, 8
movsx ecx, ax
test ecx, ecx
jne 0x403798
jmp 0x4039c6
cmp dword [0x40a9b0], 0
jne 0x40382d
cmp dword [ebp - 0xf24], 0
je 0x40382d
mov dword [ebp - 0x850], 0
push 0x40a2f0
call fcn.00406c30
add esp, 4
lea edx, [ebp - 0x850]
push edx
mov eax, dword [0x40a9ac]
push eax
call sub.ODBC32.dll_SQLRowCount
cmp dword [ebp - 0x850], 0xffffffff
je 0x40381e
mov dword [ebp - 0x1760], 0
push 0
push 0xfffffffffffffffb
lea ecx, [ebp - 0x1760]
push ecx
push 0x4cf
mov edx, dword [0x40a9ac]
push edx
call sub.ODBC32.dll_SQLGetStmtAttrW
cmp dword [ebp - 0x1760], 0
jne 0x40381e
mov eax, dword [ebp - 0x850]
push eax
call fcn.00403d44
add esp, 4
mov dword [0x40a95c], 0
jmp 0x4038c9
cmp dword [0x40a9b0], 0
jne 0x403899
lea ecx, [ebp - 0x850]
push ecx
mov edx, dword [0x40a9ac]
push edx
call sub.ODBC32.dll_SQLRowCount
movsx eax, ax
test eax, eax
jne 0x403899
cmp dword [ebp - 0x850], 0xffffffff
je 0x403899
mov dword [ebp - 0x1764], 0
push 0
push 0xfffffffffffffffb
lea ecx, [ebp - 0x1764]
push ecx
push 0x4cf
mov edx, dword [0x40a9ac]
push edx
call sub.ODBC32.dll_SQLGetStmtAttrW
cmp dword [ebp - 0x1764], 0
jne 0x403897
mov eax, dword [ebp - 0x850]
push eax
call fcn.00403d44
add esp, 4
jmp 0x4038c9
cmp dword [0x40a968], 0
je 0x4038b1
push 0x1776
call fcn.004057e8
add esp, 4
jmp 0x4038c9
cmp dword [0x40a96c], 0
je 0x4038c9
mov ecx, dword [0x40a96c]
push ecx
call fcn.004057e8
add esp, 4
movsx edx, word [0x40b914]
cmp edx, 1
jle 0x40390e
cmp dword [ebp - 0xf60], 0
jne 0x40390e
push 0x100
push 0x40ad00
push 0xb
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.0040615e
movsx eax, word [0x40b914]
push eax
push 0x40ad00
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
cmp dword [0x40a9b0], 0
jne 0x403942
cmp dword [ebp - 0xf60], 0
je 0x403942
call dword [sym.imp.MSVCRT.dll_clock]
mov dword [0x40a9f4], eax
mov ecx, dword [0x40a9f4]
sub ecx, dword [0x40c0ac]
mov dword [0x40c0a8], ecx
call fcn.00404ff5
mov dword [0x40a970], 1
mov edx, dword [0x40a9ac]
push edx
call sub.ODBC32.dll_SQLMoreResults
mov word [ebp - 0xc], ax
mov dword [0x40a970], 0
movsx eax, word [ebp - 0xc]
cmp eax, 0xffffffff
jne 0x4039c1
lea ecx, [ebp - 0x196c]
push ecx
push 0x100
lea edx, [ebp - 0x1b6c]
push edx
lea eax, [ebp - 0x1968]
push eax
lea ecx, [ebp - 0x1964]
push ecx
mov edx, dword [0x40a9ac]
push edx
push 0
push 0
call sub.ODBC32.dll_SQLErrorW
push str.HY010
lea eax, [ebp - 0x1964]
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
add esp, 8
test eax, eax
jne 0x4039bb
jmp 0x4039c6
mov word [ebp - 0xc], 1
jmp 0x4035e6
cmp dword [0x40a96c], 0
je 0x4039de
mov ecx, dword [0x40a96c]
push ecx
call fcn.004057e8
add esp, 4
cmp dword [0x40a9bc], 0
je 0x403a22
mov edx, dword [0x40a9c0]
mov dword [ebp - 0x1b8c], edx
cmp dword [ebp - 0x1b8c], 0xffffff9a
je 0x403a13
cmp dword [ebp - 0x1b8c], 0xffffff9b
je 0x403a07
jmp 0x403a1d
push 0x24
call fcn.00406123
add esp, 4
jmp 0x403a1d
push 0x25
call fcn.00406123
add esp, 4
jmp 0x403ab1
mov word [0x40b914], 1
mov dword [ebp - 0xf50], 0xfffffffa
lea eax, [ebp - 0xf50]
push eax
push 4
lea ecx, [ebp - 0xf24]
push ecx
push 0x4dc
mov edx, dword [0x40a9a8]
push edx
call sub.ODBC32.dll_SQLGetConnectAttrW
movsx eax, ax
test eax, eax
jne 0x403a70
cmp dword [ebp - 0xf24], 1
jne 0x403a70
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
mov dword [0x40a9b0], 0
mov word [0x40a014], 1
jmp 0x403aac
push 0x40b140
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
cmp eax, 4
jbe 0x403aaa
xor ecx, ecx
mov cx, word [0x40b148]
cmp ecx, 0x20
jne 0x403aa8
jmp 0x403ab1
jmp 0x403aac
jmp 0x403ab1
jmp 0x402a65
mov edx, dword [sym.imp.MSVCRT.dll__iob]
add edx, 0x20
push edx
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 4
cmp dword [0x40a948], 0
je 0x403ae0
cmp dword [0x40a94c], 0
je 0x403ae0
push 0xffffffffffffffff
call fcn.004057e8
add esp, 4
mov eax, dword [0x40a9c0]
push eax
call fcn.004057e8
add esp, 4
pop edi
mov esp, ebp
pop ebp
ret