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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1b90
call fcn.00409500
mov eax, dword [0x40b938]
mov dword [ebp - 0x2c], eax
push esi
push edi
mov dword [ebp - 0x24], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0xf20], 0
mov dword [ebp - 0xf44], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xf5c], 0
mov word [ebp - 0x1c], 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0xf0c], 0
mov word [ebp - 0xf40], 0
xor eax, eax
mov dword [ebp - 0xf3e], eax
mov dword [ebp - 0xf3a], eax
mov dword [ebp - 0xf36], eax
mov dword [ebp - 0xf32], eax
mov dword [ebp - 0xf2e], eax
mov dword [ebp - 0xf2a], eax
mov dword [ebp - 0xf26], eax
mov word [ebp - 0xf22], ax
mov dword [ebp - 0xf10], 0
mov dword [ebp - 0xf4c], 0
mov dword [ebp - 0xf64], 0
mov dword [ebp - 0xf58], 0
mov dword [ebp - 0xf54], 0
mov dword [ebp - 0xf18], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x6fc], 0
mov dword [ebp - 0x14], 0x400
mov dword [ebp - 0xf14], 0
mov dword [ebp - 0xf60], 0
mov dword [ebp - 0x704], 0
mov dword [ebp - 0x10], 0
push 1
call dword [sym.imp.MSVCR71.dll__dup]
add esp, 4
mov dword [0x40b034], eax
mov ecx, dword [ebp - 0x14]
push ecx
lea edx, [ebp - 0xf08]
push edx
push str.OSQLCMD
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0xf60], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov dword [ebp - 0x704], eax
mov eax, dword [ebp - 0x704]
push eax
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
add eax, dword [ebp - 0xf60]
lea ecx, [eax + eax + 4]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.MSVCR71.dll_malloc]
add esp, 4
mov dword [ebp - 0xf14], eax
mov eax, dword [ebp - 0x704]
push eax
mov ecx, dword [ebp - 0xf14]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
cmp dword [ebp - 0xf60], 0
je 0x4011e3
push 0x40b048
mov edx, dword [ebp - 0xf14]
push edx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
lea eax, [ebp - 0xf08]
push eax
mov ecx, dword [ebp - 0xf14]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0xf14]
push eax
call fcn.00407080
add esp, 8
mov dword [ebp - 0x6fc], eax
mov ecx, dword [ebp - 0x18]
mov dword [ebp + 8], ecx
mov edx, dword [ebp - 0xf14]
push edx
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
mov dword [ebp - 0xf14], 0
call fcn.00406770
push 0x40b04c
push 0
call dword [sym.imp.MSVCR71.dll__wsetlocale]
add esp, 8
test eax, eax
je 0x401245
push 0xfffffffffffffffe
call dword [sym.imp.MSVCR71.dll__setmbcp]
add esp, 4
cmp eax, 0xffffffff
jne 0x401259
push 0x2e
call fcn.004065d0
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
push 0x40b9c8
push 0
push 1
call sub.ODBC32.dll_SQLAllocHandle
movsx eax, ax
cmp eax, 0xffffffff
jne 0x401283
push 0x28
call fcn.004065d0
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
push 0
push 3
push 0xc8
mov ecx, dword [0x40b9c8]
push ecx
call sub.ODBC32.dll_SQLSetEnvAttr
mov word [ebp - 0xf1c], ax
movsx edx, word [ebp - 0xf1c]
test edx, edx
je 0x4012d0
mov eax, dword [0x40b9c8]
push eax
push 1
call fcn.00406250
add esp, 8
movsx ecx, word [ebp - 0xf1c]
cmp ecx, 0xffffffff
jne 0x4012d0
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
push 0x40b9cc
mov edx, dword [0x40b9c8]
push edx
push 2
call sub.ODBC32.dll_SQLAllocHandle
mov word [ebp - 0xf1c], ax
movsx eax, word [ebp - 0xf1c]
test eax, eax
je 0x40131c
mov ecx, dword [0x40b9c8]
push ecx
push 1
call fcn.00406250
add esp, 8
movsx edx, word [ebp - 0xf1c]
cmp edx, 0xffffffff
jne 0x40131c
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
mov word [0x40c940], 0
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jle 0x4024d4
mov ecx, dword [ebp - 0x6fc]
add ecx, 4
mov dword [ebp - 0x6fc], ecx
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x40136b
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
cmp ecx, 0x2f
jne 0x4024d4
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x6fc]
mov dword [ecx], eax
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
mov dword [ebp - 0x1b74], ecx
mov edx, dword [ebp - 0x1b74]
sub edx, 0x3f
mov dword [ebp - 0x1b74], edx
cmp dword [ebp - 0x1b74], 0x39
ja case.0x4013b8.1
mov eax, dword [ebp - 0x1b74]
movzx ecx, byte [eax + 0x403fe6]
jmp dword [ecx*4 + 0x403f4e]
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x6fc]
mov dword [ecx], eax
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
test ecx, ecx
jne 0x401423
mov edx, dword [ebp - 0x18]
sub edx, 1
je 0x401423
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2d
je 0x401423
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2f
je 0x401423
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x6fc]
add ecx, 4
mov dword [ebp - 0x6fc], ecx
push 0x80
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
push eax
push 0x40c800
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40c900], 0
push 0x40c800
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
test eax, eax
jne 0x401473
push 0x40b058
push 0x33
call fcn.00406550
add esp, 8
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x4024cf
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x6fc]
mov dword [eax], edx
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
movzx eax, word [edx]
test eax, eax
jne 0x4014dc
mov ecx, dword [ebp - 0x18]
sub ecx, 1
je 0x4014dc
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x4014dc
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x4014dc
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x6fc]
add eax, 4
mov dword [ebp - 0x6fc], eax
mov dword [ebp - 0x24], 1
push 0x80
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
push edx
push 0x40c940
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40ca40], 0
jmp 0x4024cf
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x6fc]
mov dword [edx], ecx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
test edx, edx
jne 0x401571
mov eax, dword [ebp - 0x18]
sub eax, 1
je 0x401571
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2d
je 0x401571
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x401571
mov ecx, dword [ebp - 0x18]
sub ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x6fc]
add edx, 4
mov dword [ebp - 0x6fc], edx
mov dword [ebp - 0xc], 1
jmp 0x4024cf
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x6fc]
mov dword [edx], ecx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
test edx, edx
jne 0x4015e1
mov eax, dword [ebp - 0x18]
sub eax, 1
je 0x4015e1
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2d
je 0x4015e1
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x4015e1
mov ecx, dword [ebp - 0x18]
sub ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x6fc]
add edx, 4
mov dword [ebp - 0x6fc], edx
push 0x20
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
push 0x40c5a0
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40c5e0], 0
push 0x40c5a0
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
test eax, eax
jne 0x40162e
push 0x40b060
push 0x33
call fcn.00406550
add esp, 8
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x4024cf
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x6fc]
mov dword [ecx], eax
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
test ecx, ecx
jne 0x401697
mov edx, dword [ebp - 0x18]
sub edx, 1
je 0x401697
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2d
je 0x401697
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2f
je 0x401697
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x6fc]
add ecx, 4
mov dword [ebp - 0x6fc], ecx
push 0x80
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
push eax
push 0x40d460
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40d560], 0
push 0x40d460
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
test eax, eax
jne 0x4016e7
push 0x40b068
push 0x33
call fcn.00406550
add esp, 8
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x4024cf
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x6fc]
mov dword [eax], edx
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
movzx eax, word [edx]
test eax, eax
jne 0x401750
mov ecx, dword [ebp - 0x18]
sub ecx, 1
je 0x401750
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x401750
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x401750
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x6fc]
add eax, 4
mov dword [ebp - 0x6fc], eax
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
push edx
call dword [sym.imp.MSVCR71.dll__wtol]
add esp, 4
mov dword [ebp - 0xf64], eax
cmp dword [ebp - 0xf64], 0x200
jb 0x401780
cmp dword [ebp - 0xf64], 0xffff
jbe 0x401794
push 0x29
call fcn.004065d0
add esp, 4
mov dword [ebp - 0xf64], 0
jmp 0x4024cf
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x6fc]
mov dword [edx], ecx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
test edx, edx
jne 0x4017fd
mov eax, dword [ebp - 0x18]
sub eax, 1
je 0x4017fd
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2d
je 0x4017fd
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x4017fd
mov ecx, dword [ebp - 0x18]
sub ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x6fc]
add edx, 4
mov dword [ebp - 0x6fc], edx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCR71.dll__wtol]
add esp, 4
mov dword [ebp - 0xf54], eax
jmp 0x4024cf
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x6fc]
mov dword [ecx], eax
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
test ecx, ecx
jne 0x40187e
mov edx, dword [ebp - 0x18]
sub edx, 1
je 0x40187e
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2d
je 0x40187e
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2f
je 0x40187e
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x6fc]
add ecx, 4
mov dword [ebp - 0x6fc], ecx
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCR71.dll__wtol]
add esp, 4
mov dword [0x40b9e8], eax
jmp 0x4024cf
mov dword [0x40b964], 1
jmp 0x4024cf
mov dword [0x40b96c], 1
jmp 0x4024cf
cmp dword [ebp + 8], 2
jne 0x4018e3
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [0x40ca44], eax
push 0
push 0
call fcn.00404230
add esp, 8
push 0
call fcn.00405c80
add esp, 4
jmp 0x4018f7
push 0x31
call fcn.004065d0
add esp, 4
push 0
call fcn.00405c80
add esp, 4
jmp 0x4024cf
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x6fc]
mov dword [eax], edx
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
movzx eax, word [edx]
test eax, eax
jne 0x401960
mov ecx, dword [ebp - 0x18]
sub ecx, 1
je 0x401960
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x401960
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x401960
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x6fc]
add eax, 4
mov dword [ebp - 0x6fc], eax
push 0x3d
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
push edx
push 0x40bd60
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40bdda], 0
push 0x40bd60
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
test eax, eax
je 0x4019ab
push 0x40b070
push 0x40bd60
call dword [sym.imp.MSVCR71.dll_wcscmp]
add esp, 8
test eax, eax
jne 0x4019be
push 0x40b074
push 0x40bd60
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
jmp 0x4024cf
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x6fc]
mov dword [edx], ecx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
test edx, edx
jne 0x401a27
mov eax, dword [ebp - 0x18]
sub eax, 1
je 0x401a27
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2d
je 0x401a27
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x401a27
mov ecx, dword [ebp - 0x18]
sub ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x6fc]
add edx, 4
mov dword [ebp - 0x6fc], edx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCR71.dll__wtoi]
add esp, 4
mov dword [ebp - 0xf5c], eax
jmp 0x4024cf
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x6fc]
mov dword [ecx], eax
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
test ecx, ecx
jne 0x401a86
mov edx, dword [ebp - 0x18]
sub edx, 1
je 0x401a86
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x6fc]
add ecx, 4
mov dword [ebp - 0x6fc], ecx
push 9
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
push eax
push 0x40c240
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40c252], 0
push 0x40c240
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
mov word [0x40b97c], ax
jmp 0x4024cf
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x6fc]
mov dword [eax], edx
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
movzx eax, word [edx]
test eax, eax
jne 0x401b25
mov ecx, dword [ebp - 0x18]
sub ecx, 1
je 0x401b25
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x401b25
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x401b25
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x6fc]
add eax, 4
mov dword [ebp - 0x6fc], eax
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
push edx
call dword [sym.imp.MSVCR71.dll__wtoi]
add esp, 4
mov word [ebp - 0x1c], ax
jmp 0x4024cf
mov dword [ebp - 0xf0c], 1
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x6fc]
mov dword [edx], ecx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
test edx, edx
jne 0x401bae
mov eax, dword [ebp - 0x18]
sub eax, 1
je 0x401bae
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2d
je 0x401bae
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x401bae
mov ecx, dword [ebp - 0x18]
sub ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x6fc]
add edx, 4
mov dword [ebp - 0x6fc], edx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
mov esi, eax
push 0x40c200
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
mov edx, 0x3e8
sub edx, eax
cmp esi, edx
jbe 0x401bef
push 0x37
call fcn.004065d0
add esp, 4
push 0
call fcn.00405c80
add esp, 4
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
mov dword [ebp - 0x20], 1
jmp 0x4024cf
mov dword [0x40b020], 0
jmp 0x4024cf
mov dword [0x40b9b4], 1
jmp 0x4024cf
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x6fc]
mov dword [ecx], eax
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
test ecx, ecx
jne 0x401c94
mov edx, dword [ebp - 0x18]
sub edx, 1
je 0x401c94
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2d
je 0x401c94
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2f
je 0x401c94
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x6fc]
add ecx, 4
mov dword [ebp - 0x6fc], ecx
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
test ecx, ecx
je 0x401d00
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x401d00
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x401d00
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCR71.dll__wtoi]
add esp, 4
mov dword [0x40b994], eax
cmp dword [0x40b994], 1
je 0x401cfe
mov ecx, dword [0x40b994]
push ecx
push 0x38
call fcn.00406550
add esp, 8
push 0
call fcn.00405c80
add esp, 4
jmp 0x401d0a
mov dword [0x40b994], 0xffffffff
jmp 0x4024cf
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x6fc]
mov dword [ecx], eax
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
test ecx, ecx
jne 0x401d73
mov edx, dword [ebp - 0x18]
sub edx, 1
je 0x401d73
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2d
je 0x401d73
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2f
je 0x401d73
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x6fc]
add ecx, 4
mov dword [ebp - 0x6fc], ecx
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCR71.dll__wtol]
add esp, 4
mov dword [0x40b974], eax
jmp 0x4024cf
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x6fc]
mov dword [eax], edx
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
movzx eax, word [edx]
test eax, eax
jne 0x401df3
mov ecx, dword [ebp - 0x18]
sub ecx, 1
je 0x401df3
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x401df3
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x401df3
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x6fc]
add eax, 4
mov dword [ebp - 0x6fc], eax
push 0x13
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
push edx
push 0x40c200
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40c226], 0
jmp 0x4024cf
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x6fc]
mov dword [edx], ecx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
test edx, edx
jne 0x401e7e
mov eax, dword [ebp - 0x18]
sub eax, 1
je 0x401e7e
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2d
je 0x401e7e
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x401e7e
mov ecx, dword [ebp - 0x18]
sub ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x6fc]
add edx, 4
mov dword [ebp - 0x6fc], edx
mov dword [0x40b028], 0
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
test edx, edx
je 0x401ece
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
cmp edx, 0x2d
je 0x401ece
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
cmp edx, 0x2f
je 0x401ece
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCR71.dll__wtoi]
add esp, 4
mov dword [0x40b028], eax
jmp 0x4024cf
mov dword [ebp - 0xf20], 1
jmp 0x4024cf
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x6fc]
mov dword [ecx], eax
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
test ecx, ecx
jne 0x401f46
mov edx, dword [ebp - 0x18]
sub edx, 1
je 0x401f46
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2d
je 0x401f46
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2f
je 0x401f46
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x6fc]
add ecx, 4
mov dword [ebp - 0x6fc], ecx
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCR71.dll__wtoi]
add esp, 4
mov word [0x40b980], ax
mov dword [0x40b984], 1
jmp 0x4024cf
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x6fc]
mov dword [eax], edx
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
movzx eax, word [edx]
test eax, eax
jne 0x401fd1
mov ecx, dword [ebp - 0x18]
sub ecx, 1
je 0x401fd1
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x401fd1
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x401fd1
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x6fc]
add eax, 4
mov dword [ebp - 0x6fc], eax
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
push edx
call dword [sym.imp.MSVCR71.dll__wtoi]
add esp, 4
mov dword [0x40b7d4], eax
mov dword [0x40b998], 1
cmp dword [0x40b7d4], 8
jle 0x402007
cmp dword [0x40b7d4], 0x10000
jle 0x40201b
push 0x23
call fcn.004065d0
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x4024cf
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x6fc]
mov dword [edx], ecx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
test edx, edx
jne 0x402084
mov eax, dword [ebp - 0x18]
sub eax, 1
je 0x402084
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2d
je 0x402084
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x402084
mov ecx, dword [ebp - 0x18]
sub ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x6fc]
add edx, 4
mov dword [ebp - 0x6fc], edx
push 0x80
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
push 0x40c260
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40c360], 0
jmp 0x4024cf
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x6fc]
mov dword [ecx], eax
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
test ecx, ecx
jne 0x402112
mov edx, dword [ebp - 0x18]
sub edx, 1
je 0x402112
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2d
je 0x402112
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2f
je 0x402112
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x6fc]
add ecx, 4
mov dword [ebp - 0x6fc], ecx
push 4
push 0
lea edx, [ebp - 0xf6c]
push edx
call sub.MSVCR71.dll_memset
add esp, 0xc
push 1
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
lea edx, [ebp - 0xf6c]
push edx
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
lea eax, [ebp - 0xf6c]
push eax
push 0x40b7d8
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
jmp 0x4024cf
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x6fc]
mov dword [eax], edx
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
movzx eax, word [edx]
test eax, eax
jne 0x4021be
mov ecx, dword [ebp - 0x18]
sub ecx, 1
je 0x4021be
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x4021be
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x4021be
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x6fc]
add eax, 4
mov dword [ebp - 0x6fc], eax
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
push edx
call dword [sym.imp.MSVCR71.dll__wtoi]
add esp, 4
mov dword [0x40b9fc], eax
jmp 0x4024cf
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
add ecx, 2
mov edx, dword [ebp - 0x6fc]
mov dword [edx], ecx
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
movzx edx, word [ecx]
test edx, edx
jne 0x40223e
mov eax, dword [ebp - 0x18]
sub eax, 1
je 0x40223e
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2d
je 0x40223e
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx + 4]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x40223e
mov ecx, dword [ebp - 0x18]
sub ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x6fc]
add edx, 4
mov dword [ebp - 0x6fc], edx
push 0x103
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
push 0x40c380
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40c586], 0
push 0x40c380
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
test eax, eax
jne 0x40228e
push 0x40b084
push 0x33
call fcn.00406550
add esp, 8
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x4024cf
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x6fc]
mov dword [ecx], eax
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
movzx ecx, word [eax]
test ecx, ecx
jne 0x4022f7
mov edx, dword [ebp - 0x18]
sub edx, 1
je 0x4022f7
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2d
je 0x4022f7
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax + 4]
movzx edx, word [ecx]
cmp edx, 0x2f
je 0x4022f7
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x6fc]
add ecx, 4
mov dword [ebp - 0x6fc], ecx
push 0x103
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
push eax
push 0x40d240
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40d446], 0
push 0x40d240
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
test eax, eax
jne 0x402349
push 0x40b08c
push 0x33
call fcn.00406550
add esp, 8
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x402353
mov dword [0x40b99c], 1
jmp 0x4024cf
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x6fc]
mov dword [eax], edx
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
movzx eax, word [edx]
test eax, eax
jne 0x4023bc
mov ecx, dword [ebp - 0x18]
sub ecx, 1
je 0x4023bc
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x4023bc
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x4023bc
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x6fc]
add eax, 4
mov dword [ebp - 0x6fc], eax
mov dword [0x40b960], 1
jmp 0x4024cf
mov dword [ebp - 0xf44], 1
jmp 0x4024cf
mov dword [ebp - 0xf18], 1
jmp 0x4024cf
mov dword [0x40b970], 1
jmp 0x4024cf
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x6fc]
mov dword [eax], edx
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
movzx eax, word [edx]
test eax, eax
jne 0x40245c
mov ecx, dword [ebp - 0x18]
sub ecx, 1
je 0x40245c
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2d
je 0x40245c
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx + 4]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x40245c
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x6fc]
add eax, 4
mov dword [ebp - 0x6fc], eax
push 0xff
mov ecx, dword [ebp - 0x6fc]
mov edx, dword [ecx]
push edx
push 0x40c600
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov word [0x40c7fe], 0
jmp 0x4024cf
push 0x100
push 0x40bde0
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.00406630
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
push 0x40bde0
call dword [sym.imp.MSVCR71.dll_wprintf]
add esp, 8
mov edx, dword [ebp - 0x6fc]
mov eax, dword [edx]
push eax
call fcn.00405110
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x401325
mov ecx, dword [0x40b9a8]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [0x40b9a8]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [0x40b9a8], 0
cmp dword [ebp - 0x18], 0
jle 0x402519
mov eax, dword [ebp - 0x6fc]
mov ecx, dword [eax]
push ecx
call fcn.00405110
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
movzx edx, word [0x40bd60]
test edx, edx
jne 0x402539
movzx eax, word [0x40c5a0]
test eax, eax
jne 0x402539
push 2
call fcn.00405210
add esp, 4
movzx ecx, word [0x40c200]
test ecx, ecx
jne 0x402557
push 0x40b094
push 0x40c200
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
push 0x40c200
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
mov word [0x40c902], ax
push str.EDITOR
call dword [sym.imp.MSVCR71.dll__wgetenv]
add esp, 4
mov dword [0x40b9bc], eax
cmp dword [0x40b9bc], 0
jne 0x402591
mov dword [0x40b9bc], str.EDIT
movzx edx, word [0x40c380]
test edx, edx
je 0x4025fa
push 0x40b030
push 0x40b9c0
push 0x40c380
call fcn.00404060
add esp, 0xc
test eax, eax
je 0x4025f8
push 0x100
push 0x40bde0
push 5
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.00406630
push 0x40c380
push 0x40bde0
call dword [sym.imp.MSVCR71.dll_wprintf]
add esp, 8
push 6
call fcn.004065d0
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x402604
mov eax, dword [sym.imp.MSVCR71.dll__iob]
mov dword [0x40b9c0], eax
movzx ecx, word [0x40d240]
test ecx, ecx
je 0x402785
mov dword [ebp - 0xf70], 0
cmp dword [ebp - 0xf18], 0
je 0x402632
mov dword [0x40b02c], 1
jmp 0x40263e
mov edx, dword [0x40b030]
mov dword [0x40b02c], edx
cmp dword [0x40b02c], 3
je 0x402650
cmp dword [0x40b02c], 2
jne 0x402669
push 0x40b0b8
push 0x40d240
push 0x40b9c4
call fcn.00406cb0
add esp, 0xc
jmp 0x402695
cmp dword [0x40b02c], 1
jne 0x40268b
push 0x40b0c0
push 0x40d240
push 0x40b9c4
call fcn.00406cb0
add esp, 0xc
jmp 0x402695
mov dword [0x40b9c4], 0
cmp dword [0x40b9c4], 0
je 0x40272f
push 1
mov eax, dword [0x40b9c4]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.MSVCR71.dll__dup2]
add esp, 8
test eax, eax
jne 0x402723
cmp dword [0x40b02c], 1
jne 0x402721
mov word [ebp - 0xf74], 0xfeff
mov edx, dword [sym.imp.MSVCR71.dll__iob]
add edx, 0x20
push edx
push 1
push 2
lea eax, [ebp - 0xf74]
push eax
call dword [sym.imp.MSVCR71.dll_fwrite]
add esp, 0x10
cmp eax, 1
je 0x4026fb
mov dword [ebp - 0xf70], 1
jmp 0x402721
mov ecx, dword [sym.imp.MSVCR71.dll__iob]
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCR71.dll_fflush]
add esp, 4
mov edx, dword [sym.imp.MSVCR71.dll__iob]
add edx, 0x20
push edx
call dword [sym.imp.MSVCR71.dll_fflush]
add esp, 4
jmp 0x40272d
mov dword [ebp - 0xf70], 1
jmp 0x402739
mov dword [ebp - 0xf70], 1
cmp dword [ebp - 0xf70], 1
jne 0x402783
push 0x100
push 0x40bde0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.00406630
push 0x40d240
push 0x40bde0
call dword [sym.imp.MSVCR71.dll_wprintf]
add esp, 8
push 2
call fcn.004065d0
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x40278f
mov dword [0x40b02c], 3
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [0x40ca44], eax
push 0
movzx eax, word [ebp - 0x1c]
push eax
push 0x67
mov ecx, dword [0x40b9cc]
push ecx
call sub.ODBC32.dll_SQLSetConnectAttrW
mov word [ebp - 0xf1c], ax
movsx edx, word [ebp - 0xf1c]
test edx, edx
je 0x4027e9
mov eax, dword [0x40b9cc]
push eax
push 2
call fcn.00406250
add esp, 8
movsx ecx, word [ebp - 0xf1c]
cmp ecx, 0xffffffff
jne 0x4027e9
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
cmp dword [ebp - 0xf64], 0
je 0x402841
push 0
mov edx, dword [ebp - 0xf64]
push edx
push 0x70
mov eax, dword [0x40b9cc]
push eax
call sub.ODBC32.dll_SQLSetConnectAttrW
mov word [ebp - 0xf1c], ax
movsx ecx, word [ebp - 0xf1c]
test ecx, ecx
je 0x402841
mov edx, dword [0x40b9cc]
push edx
push 2
call fcn.00406250
add esp, 8
movsx eax, word [ebp - 0xf1c]
cmp eax, 0xffffffff
jne 0x402841
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
cmp dword [0x40b96c], 0
je 0x40285f
push 1
push 0x4c1
mov ecx, dword [0x40b9cc]
push ecx
call sub.ODBC32.dll_SQLSetConnectOptionW
jmp 0x402872
push 0
push 0x4c1
mov edx, dword [0x40b9cc]
push edx
call sub.ODBC32.dll_SQLSetConnectOptionW
movzx eax, word [0x40c5a0]
test eax, eax
je 0x4028a9
push str.DSN
lea ecx, [ebp - 0x6f8]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
push 0x40c5a0
lea edx, [ebp - 0x6f8]
push edx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
jmp 0x4028d3
push str.DriverSQL_Server_Server
lea eax, [ebp - 0x6f8]
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
push 0x40bd60
lea ecx, [ebp - 0x6f8]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
cmp dword [ebp - 0xc], 0
je 0x40292e
push str._Trusted_ConnectionYES
lea edx, [ebp - 0x6f8]
push edx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
movzx eax, word [0x40c800]
test eax, eax
je 0x40290f
push 0x35
call fcn.004065d0
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x402929
cmp dword [ebp - 0x24], 0
je 0x402929
push 0x36
call fcn.004065d0
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
jmp 0x402a2b
push str._UID
lea ecx, [ebp - 0x6f8]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
movzx edx, word [0x40c800]
test edx, edx
jne 0x40295c
push 0
call fcn.00405210
add esp, 4
test eax, eax
je 0x402973
push 0x40c800
lea eax, [ebp - 0x6f8]
push eax
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
jmp 0x402987
push 0x34
call fcn.004065d0
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
cmp dword [ebp - 0x24], 0
jne 0x402a01
push 1
call fcn.00405210
add esp, 4
test eax, eax
jne 0x402a01
movzx ecx, word [0x40c5a0]
test ecx, ecx
jne 0x402a01
push 0x40b148
mov edx, dword [0x40b034]
push edx
call dword [sym.imp.MSVCR71.dll__fdopen]
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4029cf
mov eax, dword [sym.imp.MSVCR71.dll__iob]
add eax, 0x20
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.004052e0
add esp, 4
mov edx, dword [ebp - 0x10]
push edx
call fcn.00405380
add esp, 4
mov eax, dword [sym.imp.MSVCR71.dll__iob]
add eax, 0x20
cmp eax, dword [ebp - 0x10]
je 0x402a01
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.MSVCR71.dll_fclose]
add esp, 4
push 0x40b14c
lea edx, [ebp - 0x6f8]
push edx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
push 0x40c940
lea eax, [ebp - 0x6f8]
push eax
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
push str._APPOSQL_32_WSID
lea ecx, [ebp - 0x6f8]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
movzx edx, word [0x40d460]
test edx, edx
je 0x402a62
push 0x40d460
lea eax, [ebp - 0x6f8]
push eax
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
jmp 0x402ad1
push 0x10
lea ecx, [ebp - 0xf40]
push ecx
push str.COMPUTERNAME
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x402ab1
mov dword [0x40b9dc], 0x10
push 0x40b9dc
lea edx, [ebp - 0xf40]
push edx
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x402aaf
push str.Win32_PC_Client
lea eax, [ebp - 0x6f8]
push eax
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
jmp 0x402ad1
mov word [ebp - 0xf22], 0
lea ecx, [ebp - 0xf40]
push ecx
lea edx, [ebp - 0x6f8]
push edx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
movzx eax, word [0x40c260]
test eax, eax
je 0x402b06
push str._DATABASE
lea ecx, [ebp - 0x6f8]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
push 0x40c260
lea edx, [ebp - 0x6f8]
push edx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
push 0x40b1d4
lea eax, [ebp - 0x6f8]
push eax
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
push 0
push 0
push 0
push 0
push 0xfffffffffffffffd
lea ecx, [ebp - 0x6f8]
push ecx
push 0
mov edx, dword [0x40b9cc]
push edx
call sub.ODBC32.dll_SQLDriverConnectW
mov word [ebp - 0xf1c], ax
movsx eax, word [ebp - 0xf1c]
test eax, eax
je 0x402b78
mov ecx, dword [0x40b9cc]
push ecx
push 2
call fcn.00406250
add esp, 8
movsx edx, word [ebp - 0xf1c]
cmp edx, 0xffffffff
jne 0x402b78
call fcn.00406c10
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
cmp dword [ebp - 0xf54], 0
je 0x402bd3
push 0xfffffffffffffffb
mov eax, dword [ebp - 0xf54]
push eax
push 0x91a7
mov ecx, dword [0x40b9cc]
push ecx
call sub.ODBC32.dll_SQLSetConnectAttrW
mov word [ebp - 0xf1c], ax
movsx edx, word [ebp - 0xf1c]
test edx, edx
je 0x402bd3
mov eax, dword [0x40b9cc]
push eax
push 2
call fcn.00406250
add esp, 8
movsx ecx, word [ebp - 0xf1c]
cmp ecx, 0xffffffff
jne 0x402bd3
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
push 0x40b9d0
mov edx, dword [0x40b9cc]
push edx
push 3
call sub.ODBC32.dll_SQLAllocHandle
mov word [ebp - 0xf1c], ax
movsx eax, word [ebp - 0xf1c]
test eax, eax
je 0x402c1f
mov ecx, dword [0x40b9cc]
push ecx
push 2
call fcn.00406250
add esp, 8
movsx edx, word [ebp - 0xf1c]
cmp edx, 0xffffffff
jne 0x402c1f
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
push 0xfffffffffffffffb
mov eax, dword [ebp - 0xf5c]
push eax
push 0
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLSetStmtAttrW
mov word [ebp - 0xf1c], ax
movsx edx, word [ebp - 0xf1c]
test edx, edx
je 0x402c6e
mov eax, dword [0x40b9d0]
push eax
push 3
call fcn.00406250
add esp, 8
movsx ecx, word [ebp - 0xf1c]
cmp ecx, 0xffffffff
jne 0x402c6e
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
cmp dword [0x40b974], 0
je 0x402cc6
push 0xfffffffffffffffb
mov edx, dword [0x40b974]
push edx
push 3
mov eax, dword [0x40b9d0]
push eax
call sub.ODBC32.dll_SQLSetStmtAttrW
mov word [ebp - 0xf1c], ax
movsx ecx, word [ebp - 0xf1c]
test ecx, ecx
je 0x402cc6
mov edx, dword [0x40b9d0]
push edx
push 3
call fcn.00406250
add esp, 8
movsx eax, word [ebp - 0xf1c]
cmp eax, 0xffffffff
jne 0x402cc6
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
cmp dword [0x40b9b4], 0
je 0x402d1c
push 0xfffffffffffffffb
push 1
push 0x4cd
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLSetStmtAttrW
mov word [ebp - 0xf1c], ax
movsx edx, word [ebp - 0xf1c]
test edx, edx
je 0x402d1c
mov eax, dword [0x40b9d0]
push eax
push 3
call fcn.00406250
add esp, 8
movsx ecx, word [ebp - 0xf1c]
cmp ecx, 0xffffffff
jne 0x402d1c
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
push 1
push 0x405b80
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
test eax, eax
jne 0x402d41
push 3
call fcn.004065d0
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
movzx edx, word [0x40c600]
test edx, edx
je 0x402e3d
mov word [ebp - 0x1748], 0
mov ecx, 0x1f3
xor eax, eax
lea edi, [ebp - 0x1746]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x174c], 0
mov dword [ebp - 0x1750], 0
mov dword [ebp - 0xf78], 0xfffffffd
push 0x40b1d8
lea eax, [ebp - 0x1748]
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
lea ecx, [ebp - 0x1750]
push ecx
push 0
lea edx, [ebp - 0x174c]
push edx
push 0
push 0
push 4
push 0xfffffffffffffff0
push 4
push 1
mov eax, dword [0x40b9d0]
push eax
call sub.ODBC32.dll_SQLBindParameter
mov word [ebp - 0xf1c], ax
lea ecx, [ebp - 0xf78]
push ecx
push 0
push 0x40c600
push 0
push 0xff
push 1
push 0xfffffffffffffff8
push 1
push 2
mov edx, dword [0x40b9d0]
push edx
call sub.ODBC32.dll_SQLBindParameter
mov word [ebp - 0xf1c], ax
push 0xfffffffffffffffd
lea eax, [ebp - 0x1748]
push eax
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLExecDirectW
mov word [ebp - 0xf1c], ax
movsx edx, word [ebp - 0xf1c]
cmp edx, 0xffffffff
jne 0x402e3d
mov eax, dword [0x40b9d0]
push eax
push 3
call fcn.00406250
add esp, 8
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
push 0x1000
push 0x400
push 0x40c908
call fcn.004060d0
add esp, 0xc
cmp dword [0x40b99c], 0
jne 0x402e92
cmp dword [0x40b998], 0
jne 0x402e92
cmp dword [0x40b960], 0
jne 0x402e92
push 0x40c920
mov ecx, dword [0x40ca44]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x402e92
movsx edx, word [0x40c920]
mov dword [0x40b7d4], edx
mov eax, 1
test eax, eax
je 0x403f00
mov dword [ebp - 0x1758], 0
mov dword [ebp - 0x1754], 0
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x1b78], ecx
cmp dword [ebp - 0x1b78], 1
je 0x402ed9
cmp dword [ebp - 0x1b78], 2
je 0x402ee5
cmp dword [ebp - 0x1b78], 3
je 0x402f0d
jmp 0x402f2c
mov dword [ebp - 0x20], 2
jmp 0x4030a9
push 0x40c200
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
mov edx, dword [ebp - 0xf0c]
neg edx
sbb edx, edx
and edx, 3
mov dword [ebp - 0x20], edx
jmp 0x4030a9
push 0x40b228
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
mov dword [ebp - 0x20], 0
jmp 0x4030a9
cmp dword [0x40b960], 0
jne 0x403013
cmp dword [0x40b9b8], 0
jne 0x402f9b
cmp dword [0x40b020], 0
je 0x402f87
movzx eax, word [0x40b024]
mov dword [ebp - 0x1b7c], eax
mov cx, word [0x40b024]
add cx, 1
mov word [0x40b024], cx
mov edx, dword [ebp - 0x1b7c]
push edx
push 0x40b234
call dword [sym.imp.MSVCR71.dll_wprintf]
add esp, 8
mov dword [ebp - 0x1b80], eax
jmp 0x402f91
mov dword [ebp - 0x1b80], 1
mov dword [0x40c904], 1
mov eax, dword [0x40b9c0]
push eax
push 0x3e8
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_fgetws]
add esp, 0xc
test eax, eax
jne 0x403004
cmp dword [0x40b9d8], 0
jne 0x403004
cmp dword [0x40b9b8], 0
jne 0x402ff3
push 0x40c200
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
mov dword [0x40b9b8], 1
mov dword [0x40b9d8], 0
jmp 0x403002
mov dword [ebp - 0x1758], 1
jmp 0x4030a9
jmp 0x40300e
mov dword [0x40b9d8], 0
jmp 0x4030a9
cmp dword [0x40b020], 0
je 0x403058
movzx ecx, word [0x40b024]
mov dword [ebp - 0x1b84], ecx
mov dx, word [0x40b024]
add dx, 1
mov word [0x40b024], dx
mov eax, dword [ebp - 0x1b84]
push eax
push str._d_
call dword [sym.imp.MSVCR71.dll_wprintf]
add esp, 8
mov dword [ebp - 0x1b88], eax
jmp 0x403062
mov dword [ebp - 0x1b88], 1
mov dword [0x40c904], 1
mov ecx, dword [0x40b9c0]
push ecx
push 0x3e8
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_fgetws]
add esp, 0xc
test eax, eax
jne 0x40309f
cmp dword [0x40b9d8], 0
jne 0x40309f
mov dword [ebp - 0x1758], 1
jmp 0x4030a9
mov dword [0x40b9d8], 0
cmp dword [ebp - 0x1758], 0
je 0x4030b7
jmp 0x403f00
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
cmp eax, 0x3e8
jbe 0x4030e0
push 0x22
call fcn.004065d0
add esp, 4
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
mov dword [0x40c904], 0
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
sub eax, 1
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x28]
movzx eax, word [edx*2 + 0x40ca60]
cmp eax, 0xa
jne 0x403149
cmp dword [0x40b030], 1
jne 0x40313c
cmp dword [ebp - 0x28], 0
jle 0x40313a
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx*2 + 0x40ca5e]
cmp edx, 0xd
jne 0x40313a
mov eax, dword [ebp - 0x28]
mov word [eax*2 + 0x40ca5e], 0
jmp 0x403149
mov ecx, dword [ebp - 0x28]
mov word [ecx*2 + 0x40ca60], 0
push 4
push str.quit
push 0x40ca60
call fcn.00405ef0
add esp, 0xc
test eax, eax
jne 0x403ed6
push 4
push 0x40b258
push 0x40ca60
call fcn.00405ef0
add esp, 0xc
test eax, eax
jne 0x403ed6
cmp dword [0x40b9e0], 0
jne 0x40323d
push 4
push str.exit
push 0x40ca60
call dword [sym.imp.MSVCR71.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x40323d
mov dword [ebp - 0x175c], 0x40ca68
jmp 0x4031c6
mov edx, dword [ebp - 0x175c]
add edx, 2
mov dword [ebp - 0x175c], edx
mov eax, dword [ebp - 0x175c]
movzx ecx, word [eax]
test ecx, ecx
je 0x4031f1
mov edx, dword [ebp - 0x175c]
movzx eax, word [edx]
cmp eax, 0x20
je 0x4031ef
mov ecx, dword [ebp - 0x175c]
movzx edx, word [ecx]
cmp edx, 9
jne 0x4031f1
jmp 0x4031b7
mov eax, dword [ebp - 0x175c]
movzx ecx, word [eax]
cmp ecx, 0x28
jne 0x40323d
jmp 0x40321b
mov edx, dword [ebp - 0x175c]
mov word [edx], 0x20
mov eax, dword [ebp - 0x175c]
sub eax, 2
mov dword [ebp - 0x175c], eax
cmp dword [ebp - 0x175c], 0x40ca60
jb 0x403229
jmp 0x403201
mov dword [0x40b9e0], 1
mov dword [ebp - 0xf10], 1
cmp dword [0x40b9e0], 0
je 0x403331
mov dword [ebp - 0x1760], 0x40ca60
jmp 0x403265
mov ecx, dword [ebp - 0x1760]
add ecx, 2
mov dword [ebp - 0x1760], ecx
mov edx, dword [ebp - 0x1760]
movzx eax, word [edx]
test eax, eax
je 0x4032e9
cmp dword [ebp - 0xf10], 0
je 0x4032e9
mov ecx, dword [ebp - 0x1760]
movzx edx, word [ecx]
mov dword [ebp - 0x1b8c], edx
mov eax, dword [ebp - 0x1b8c]
sub eax, 9
mov dword [ebp - 0x1b8c], eax
cmp dword [ebp - 0x1b8c], 0x20
ja case.0x4032af.1
mov ecx, dword [ebp - 0x1b8c]
movzx edx, byte [ecx + 0x404030]
jmp dword [edx*4 + 0x404020]
jmp 0x4032e4
mov eax, dword [ebp - 0xf10]
add eax, 1
mov dword [ebp - 0xf10], eax
jmp 0x4032e4
mov ecx, dword [ebp - 0xf10]
sub ecx, 1
mov dword [ebp - 0xf10], ecx
jmp 0x4032e4
mov dword [ebp - 0xf4c], 1
jmp 0x403256
cmp dword [ebp - 0xf10], 0
jne 0x403322
mov edx, dword [ebp - 0x1760]
mov word [edx - 2], 0
cmp dword [ebp - 0xf4c], 0
jne 0x403322
mov dword [ebp - 0x20], 2
mov dword [ebp - 0xf0c], 1
mov dword [0x40b9e0], 0
mov dword [ebp - 0x1754], 1
jmp 0x40350d
push 2
push 0x40b270
push 0x40ca60
call dword [sym.imp.MSVCR71.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x4033b4
cmp dword [0x40b994], 0
jne 0x403382
mov eax, dword [sym.imp.MSVCR71.dll__iob]
add eax, 0x20
push eax
call dword [sym.imp.MSVCR71.dll_fflush]
add esp, 4
mov ecx, dword [0x40b02c]
push ecx
mov edx, dword [0x40b9c4]
push edx
push 0x40ca64
call fcn.00406880
add esp, 0xc
jmp 0x4033af
push 0x39
call fcn.004065d0
add esp, 4
cmp dword [0x40b994], 1
jne 0x40339f
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
mov ax, word [0x40b024]
sub ax, 1
mov word [0x40b024], ax
jmp 0x402e92
push 2
push 0x40b278
push 0x40ca60
call fcn.00405ef0
add esp, 0xc
test eax, eax
je 0x40341c
cmp dword [0x40b994], 0
jne 0x4033e8
mov dword [ebp - 8], 0
call fcn.00405560
call fcn.004057e0
jmp 0x403417
push 0x39
call fcn.004065d0
add esp, 4
cmp dword [0x40b994], 1
jne 0x403405
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
mov cx, word [0x40b024]
sub cx, 1
mov word [0x40b024], cx
jmp 0x402e92
push 2
push 0x40b280
push 0x40ca60
call dword [sym.imp.MSVCR71.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x403472
cmp dword [ebp - 8], 0
je 0x40344f
mov edx, dword [0x40c908]
mov dword [edx + 4], 0
mov dword [ebp - 8], 0
call fcn.004059a0
call fcn.00405a20
mov eax, dword [0x40c908]
cmp dword [eax + 4], 0
jne 0x40346d
mov word [0x40c58c], 0
jmp 0x402e92
push 5
push str.reset
push 0x40ca60
call fcn.00405ef0
add esp, 0xc
test eax, eax
je 0x4034b7
mov word [0x40ca60], 0
mov word [0x40b024], 1
mov ecx, dword [0x40c908]
mov dword [ecx + 4], 0
mov word [0x40c58c], 0
jmp 0x402e92
movzx edx, word [0x40b97c]
test edx, edx
je 0x4034e5
movzx eax, word [0x40b97c]
push eax
push 0x40c240
push 0x40ca60
call fcn.00405ef0
add esp, 0xc
test eax, eax
je 0x4034e5
jmp 0x402e92
movzx ecx, word [0x40c902]
push ecx
push 0x40c200
push 0x40ca60
call fcn.00405ef0
add esp, 0xc
test eax, eax
jne 0x40350d
mov dword [ebp - 0x1754], 1
cmp dword [ebp - 0x1754], 0
je 0x4035de
cmp dword [ebp - 8], 0
je 0x403534
mov edx, dword [0x40c908]
mov dword [edx + 4], 0
mov dword [ebp - 8], 0
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
cmp eax, 0x3e7
je 0x40357a
cmp dword [0x40b960], 0
je 0x403567
push 0x40b294
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
jmp 0x40357a
push 0x40b298
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
push 0xfffffffffffffffd
push 0x40ca60
push 0x40c908
call fcn.00406140
add esp, 0xc
mov ax, word [0x40c58c]
add ax, 1
mov word [0x40c58c], ax
cmp dword [0x40b9d4], 0
je 0x4035c7
mov ecx, dword [0x40c908]
mov dword [ecx + 4], 0
mov word [0x40b024], 2
mov dword [0x40b9d4], 0
cmp dword [0x40b9e0], 0
je 0x4035d9
cmp dword [ebp - 0xf10], 0
je 0x4035de
jmp 0x402e92
cmp dword [0x40b9b8], 0
je 0x40363d
push 0x19
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x40b9d4], 0
je 0x40363d
push 0x40b2a0
call fcn.00407200
add esp, 4
mov word [0x40ca60], 0
mov word [0x40b024], 1
mov edx, dword [0x40c908]
mov dword [edx + 4], 0
mov dword [0x40b9b8], 0
mov dword [0x40b9d4], 0
jmp 0x402e92
movsx eax, word [0x40c362]
cmp eax, 1
jge 0x403652
mov word [0x40c362], 1
cmp dword [ebp - 8], 0
je 0x40366e
mov ecx, dword [0x40c908]
mov dword [ecx + 4], 0
mov word [0x40c58c], 0
movzx edx, word [0x40c58c]
test edx, edx
jne 0x403687
mov word [0x40b024], 1
jmp 0x402e92
call dword [sym.imp.MSVCR71.dll_clock]
mov dword [0x40c90c], eax
cmp dword [0x40b964], 0
je 0x4036ae
cmp dword [0x40b968], 0
je 0x4036ae
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
push 0
movsx eax, word [0x40c362]
push eax
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLParamOptions
movsx edx, ax
test edx, edx
je 0x4036db
mov eax, dword [0x40b9d0]
push eax
push 3
call fcn.00406250
add esp, 8
mov dword [0x40b978], 0
cmp dword [ebp - 0xf5c], 0
je 0x4036ff
push 0
call dword [sym.imp.MSVCR71.dll_time]
add esp, 4
mov dword [ebp - 0xf50], eax
push 0xfffffffffffffffb
push 1
push 4
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLSetStmtAttrW
mov word [ebp - 0xf1c], ax
movsx edx, word [ebp - 0xf1c]
test edx, edx
je 0x403749
mov eax, dword [0x40b9d0]
push eax
push 3
call fcn.00406250
add esp, 8
movsx ecx, word [ebp - 0xf1c]
cmp ecx, 0xffffffff
jne 0x403749
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
mov edx, dword [0x40c908]
mov eax, dword [edx + 4]
shr eax, 1
push eax
mov ecx, dword [0x40c908]
add ecx, 0xc
push ecx
mov edx, dword [0x40b9d0]
push edx
call sub.ODBC32.dll_SQLExecDirectW
mov word [ebp - 0xf1c], ax
movsx eax, word [ebp - 0xf1c]
cmp eax, 2
jne 0x403823
mov ecx, dword [0x40b9d0]
push ecx
push 3
call fcn.00406250
add esp, 8
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0xf5c], 0
je 0x40380a
push 0
call dword [sym.imp.MSVCR71.dll_time]
add esp, 4
mov dword [ebp - 0x700], eax
mov edx, dword [ebp - 0x700]
sub edx, dword [ebp - 0xf50]
movzx eax, dx
cmp eax, dword [ebp - 0xf5c]
jle 0x4037f3
push 0
call dword [sym.imp.MSVCR71.dll_time]
add esp, 4
mov dword [ebp - 0xf50], eax
push 7
call fcn.004065d0
add esp, 4
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLCancel
cmp dword [0x40b9d4], 0
je 0x403808
mov edx, dword [0x40b9d0]
push edx
call sub.ODBC32.dll_SQLCancel
jmp 0x40381e
cmp dword [0x40b9d4], 0
je 0x40381e
mov eax, dword [0x40b9d0]
push eax
call sub.ODBC32.dll_SQLCancel
jmp 0x403749
movsx ecx, word [ebp - 0xf1c]
test ecx, ecx
je 0x403860
mov edx, dword [0x40b9d0]
push edx
push 3
call fcn.00406250
add esp, 8
movsx eax, word [ebp - 0xf1c]
cmp eax, 1
je 0x403857
movsx ecx, word [ebp - 0xf1c]
cmp ecx, 0x64
jne 0x403860
mov word [ebp - 0xf1c], 0
push 0xfffffffffffffffb
push 0
push 4
mov edx, dword [0x40b9d0]
push edx
call sub.ODBC32.dll_SQLSetStmtAttrW
mov word [ebp - 0xf1c], ax
movsx eax, word [ebp - 0xf1c]
test eax, eax
je 0x4038ab
mov ecx, dword [0x40b9d0]
push ecx
push 3
call fcn.00406250
add esp, 8
movsx edx, word [ebp - 0xf1c]
cmp edx, 0xffffffff
jne 0x4038ab
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
mov dword [ebp - 8], 1
cmp dword [ebp - 0xf20], 0
je 0x40390b
mov dword [ebp - 0x28], 0
jmp 0x4038cd
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x28], eax
mov ecx, dword [0x40c908]
mov eax, dword [ecx + 4]
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp - 0x28], eax
jge 0x40390b
mov edx, dword [ebp - 0x28]
mov eax, dword [0x40c908]
movzx ecx, word [eax + edx*2 + 0xc]
cmp ecx, 0xd
je 0x403909
mov edx, dword [ebp - 0x28]
mov eax, dword [0x40c908]
mov cx, word [eax + edx*2 + 0xc]
push ecx
call dword [sym.imp.MSVCR71.dll__fputwchar]
add esp, 4
jmp 0x4038c4
mov dword [ebp - 0x28], 0xfffffffa
lea edx, [ebp - 0xf68]
push edx
lea eax, [ebp - 0x28]
push eax
push 0
push 0
push 0x4b5
push 1
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLColAttributeW
movsx edx, ax
test edx, edx
jne 0x403a38
cmp dword [ebp - 0xf68], 0
jle 0x403a38
cmp dword [ebp - 0xf58], 0
je 0x40396f
mov eax, dword [ebp - 0xf58]
push eax
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
mov dword [ebp - 0xf58], 0
mov dword [ebp - 0x28], 0xfffffffa
lea ecx, [ebp - 0xf68]
push ecx
lea edx, [ebp - 0x28]
push edx
push 0
push 0
push 0x3e9
push 1
mov eax, dword [0x40b9d0]
push eax
call sub.ODBC32.dll_SQLColAttributeW
mov ecx, dword [ebp - 0xf68]
shl ecx, 2
push ecx
call dword [sym.imp.MSVCR71.dll_malloc]
add esp, 4
mov dword [ebp - 0xf58], eax
cmp dword [ebp - 0xf58], 0
jne 0x4039d1
push 0x752
push 0x40b2a8
push 0x40b2c0
call dword [sym.imp.MSVCR71.dll__assert]
add esp, 0xc
mov eax, dword [ebp - 0xf58]
mov dword [0x40b9f0], eax
mov ecx, dword [ebp - 0xf68]
shl ecx, 2
push ecx
push 0
mov edx, dword [ebp - 0xf58]
push edx
call sub.MSVCR71.dll_memset
add esp, 0xc
mov dword [ebp - 0x28], 1
jmp 0x403a09
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
cmp ecx, dword [ebp - 0xf68]
jg 0x403a38
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [0x40b9d0]
push eax
call fcn.00408fc0
add esp, 8
movsx ecx, ax
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0xf58]
mov dword [eax + edx*4 - 4], ecx
jmp 0x403a00
mov dword [ebp - 0xf68], 0
movsx ecx, word [ebp - 0xf1c]
test ecx, ecx
je 0x403a5d
movsx edx, word [ebp - 0xf1c]
cmp edx, 1
jne 0x403e1e
cmp dword [0x40b9e0], 0
je 0x403a70
mov dword [0x40b9e4], 0xffffff9c
cmp dword [0x40b988], 0
je 0x403a86
push 0x1776
call fcn.00405c80
add esp, 4
cmp dword [0x40b98c], 0
je 0x403a9d
mov eax, dword [0x40b98c]
push eax
call fcn.00405c80
add esp, 4
cmp dword [0x40b9d4], 0
je 0x403ab7
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLCancel
jmp 0x403e1e
mov dword [ebp - 0xf68], 1
cmp dword [ebp - 0xf58], 0
jne 0x403b2b
mov edx, dword [ebp - 0xf68]
shl edx, 2
push edx
call dword [sym.imp.MSVCR71.dll_malloc]
add esp, 4
mov dword [ebp - 0xf58], eax
cmp dword [ebp - 0xf58], 0
jne 0x403b04
push 0x77e
push 0x40b2d4
push str.NULL___pColPrSize
call dword [sym.imp.MSVCR71.dll__assert]
add esp, 0xc
mov ecx, dword [ebp - 0xf58]
mov dword [0x40b9f0], ecx
mov edx, dword [ebp - 0xf68]
shl edx, 2
push edx
push 0
mov eax, dword [ebp - 0xf58]
push eax
call sub.MSVCR71.dll_memset
add esp, 0xc
movsx ecx, word [ebp - 0xf1c]
test ecx, ecx
je 0x403b46
movsx edx, word [ebp - 0xf1c]
cmp edx, 1
jne 0x403d91
cmp dword [0x40b9d4], 0
je 0x403b5f
mov eax, dword [0x40b9d0]
push eax
call sub.ODBC32.dll_SQLCancel
jmp 0x403e1e
cmp dword [0x40b98c], 0
je 0x403b77
mov ecx, dword [0x40b98c]
push ecx
call fcn.00405c80
add esp, 4
movsx edx, word [ebp - 0xf1c]
cmp edx, 1
jne 0x403b93
mov eax, dword [0x40b9d0]
push eax
push 3
call fcn.00406250
add esp, 8
lea ecx, [ebp - 0xf68]
push ecx
push 0
push 0
push 0
push 0x3e9
push 0
mov edx, dword [0x40b9d0]
push edx
call sub.ODBC32.dll_SQLColAttributeW
movsx eax, ax
test eax, eax
je 0x403bc4
mov dword [ebp - 0xf68], 0
cmp dword [0x40b9e0], 0
je 0x403be0
cmp dword [ebp - 0xf68], 0
je 0x403be0
mov dword [0x40b9e4], 0xffffff9b
mov ecx, dword [ebp - 0xf58]
push ecx
mov edx, dword [0x40b9d0]
push edx
call fcn.00408d10
add esp, 8
movsx eax, ax
test eax, eax
jne 0x403c02
jmp 0x403e1e
cmp dword [0x40b9d4], 0
jne 0x403c88
cmp dword [ebp - 0xf68], 0
je 0x403c88
mov dword [ebp - 4], 0
push 0x40b300
call fcn.00407200
add esp, 4
lea ecx, [ebp - 4]
push ecx
mov edx, dword [0x40b9d0]
push edx
call sub.ODBC32.dll_SQLRowCount
cmp dword [ebp - 4], 0xffffffff
je 0x403c79
mov dword [ebp - 0x1764], 0
push 0
push 0xfffffffffffffffb
lea eax, [ebp - 0x1764]
push eax
push 0x4cf
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLGetStmtAttrW
cmp dword [ebp - 0x1764], 0
jne 0x403c79
mov edx, dword [ebp - 4]
push edx
call fcn.004041c0
add esp, 4
mov dword [0x40b978], 0
jmp 0x403d1a
cmp dword [0x40b9d4], 0
jne 0x403ceb
lea eax, [ebp - 4]
push eax
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLRowCount
movsx edx, ax
test edx, edx
jne 0x403ceb
cmp dword [ebp - 4], 0xffffffff
je 0x403ceb
mov dword [ebp - 0x1768], 0
push 0
push 0xfffffffffffffffb
lea eax, [ebp - 0x1768]
push eax
push 0x4cf
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLGetStmtAttrW
cmp dword [ebp - 0x1768], 0
jne 0x403ce9
mov edx, dword [ebp - 4]
push edx
call fcn.004041c0
add esp, 4
jmp 0x403d1a
cmp dword [0x40b988], 0
je 0x403d03
push 0x1776
call fcn.00405c80
add esp, 4
jmp 0x403d1a
cmp dword [0x40b98c], 0
je 0x403d1a
mov eax, dword [0x40b98c]
push eax
call fcn.00405c80
add esp, 4
movsx ecx, word [0x40c362]
cmp ecx, 1
jle 0x403d5f
cmp dword [ebp - 0xf44], 0
jne 0x403d5f
push 0x100
push 0x40bde0
push 0xb
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.00406630
movsx edx, word [0x40c362]
push edx
push 0x40bde0
call dword [sym.imp.MSVCR71.dll_wprintf]
add esp, 8
cmp dword [0x40b9d4], 0
jne 0x403d91
cmp dword [ebp - 0xf44], 0
je 0x403d91
call dword [sym.imp.MSVCR71.dll_clock]
mov dword [0x40c588], eax
mov eax, dword [0x40c588]
sub eax, dword [0x40c90c]
mov dword [0x40d448], eax
call fcn.00405430
mov dword [0x40b990], 1
mov ecx, dword [0x40b9d0]
push ecx
call sub.ODBC32.dll_SQLMoreResults
mov word [ebp - 0xf1c], ax
mov dword [0x40b990], 0
movsx edx, word [ebp - 0xf1c]
cmp edx, 0xffffffff
jne 0x403e19
lea eax, [ebp - 0x1770]
push eax
push 0x100
lea ecx, [ebp - 0x1970]
push ecx
lea edx, [ebp - 0x176c]
push edx
lea eax, [ebp - 0x1b70]
push eax
mov ecx, dword [0x40b9d0]
push ecx
push 0
push 0
call sub.ODBC32.dll_SQLErrorW
push str.HY010
lea edx, [ebp - 0x1b70]
push edx
call dword [sym.imp.MSVCR71.dll_wcscmp]
add esp, 8
test eax, eax
jne 0x403e10
jmp 0x403e1e
mov word [ebp - 0xf1c], 1
jmp 0x403a42
cmp dword [0x40b98c], 0
je 0x403e35
mov eax, dword [0x40b98c]
push eax
call fcn.00405c80
add esp, 4
cmp dword [0x40b9e0], 0
je 0x403e79
mov ecx, dword [0x40b9e4]
mov dword [ebp - 0x1b90], ecx
cmp dword [ebp - 0x1b90], 0xffffff9a
je 0x403e6a
cmp dword [ebp - 0x1b90], 0xffffff9b
je 0x403e5e
jmp 0x403e74
push 0x24
call fcn.004065d0
add esp, 4
jmp 0x403e74
push 0x25
call fcn.004065d0
add esp, 4
jmp 0x403f00
mov word [0x40c362], 1
mov dword [ebp - 0xf48], 0xfffffffa
lea edx, [ebp - 0xf48]
push edx
push 4
lea eax, [ebp - 0x28]
push eax
push 0x4dc
mov ecx, dword [0x40b9cc]
push ecx
call sub.ODBC32.dll_SQLGetConnectAttrW
movsx edx, ax
test edx, edx
jne 0x403ec1
cmp dword [ebp - 0x28], 1
jne 0x403ec1
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
mov dword [0x40b9d4], 0
mov word [0x40b024], 1
jmp 0x403efb
push 0x40ca60
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
cmp eax, 4
jbe 0x403ef9
movzx eax, word [0x40ca68]
cmp eax, 0x20
jne 0x403ef7
jmp 0x403f00
jmp 0x403efb
jmp 0x403f00
jmp 0x402e92
mov ecx, dword [sym.imp.MSVCR71.dll__iob]
add ecx, 0x20
push ecx
call dword [sym.imp.MSVCR71.dll_fflush]
add esp, 4
cmp dword [0x40b964], 0
je 0x403f2f
cmp dword [0x40b968], 0
je 0x403f2f
push 0xffffffffffffffff
call fcn.00405c80
add esp, 4
mov edx, dword [0x40b9e4]
push edx
call fcn.00405c80
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0x2c]
call fcn.004094e1
pop edi
pop esi
mov esp, ebp
pop ebp
ret