Function at 0x403b00
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416758
push 0x407eec
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xfffff6c4
mov eax, dword [0x41b2c0]
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x82c], 1
mov byte [ebp - 0x938], 0
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x937]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x93c], 0
mov dword [ebp - 0x424], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x18]
push eax
call fcn.00407800
add esp, 4
mov dword [ebp - 0x93c], eax
cmp dword [ebp - 0x93c], 4
jle 0x403be2
push 0x41623c
mov ecx, dword [ebp - 0x93c]
mov edx, dword [ebp + 0x18]
lea eax, [edx + ecx - 4]
push eax
call fcn.00407890
add esp, 8
test eax, eax
jne 0x403be2
mov ecx, dword [ebp - 0x93c]
sub ecx, 4
push ecx
mov edx, dword [ebp + 0x18]
push edx
lea eax, [ebp - 0x938]
push eax
call fcn.00407b20
add esp, 0xc
push 0x416244
mov ecx, dword [ebp - 0x93c]
lea edx, [ebp + ecx - 0x93c]
push edx
call fcn.00407700
add esp, 8
jmp 0x403c09
mov eax, dword [ebp + 0x18]
push eax
lea ecx, [ebp - 0x938]
push ecx
call fcn.00407700
add esp, 8
push 0x41624c
lea edx, [ebp - 0x938]
push edx
call fcn.00407710
add esp, 8
mov eax, dword [ebp + 0x14]
push eax
call sub.ODBC32.dll_SQLCancel
lea ecx, [ebp - 0x938]
push ecx
push str.___xp_trace_flushqueryhistory__s
lea edx, [ebp - 0x828]
push edx
call fcn.00407ff2
add esp, 0xc
push 0
lea eax, [ebp - 0x940]
push eax
push 2
push 0x416278
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x400
push 0
push 0x41bc40
call fcn.00407c90
add esp, 0xc
lea eax, [ebp - 0x828]
push eax
push 0x41bc40
call fcn.00407700
add esp, 8
push 0
lea ecx, [ebp - 0x940]
push ecx
push 0x41bc40
call fcn.00407800
add esp, 4
push eax
push 0x41bc40
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [ebp - 0x940]
push ecx
push 2
push 0x41627c
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push str._call_xp_trace_flushqueryhistory___
lea ecx, [ebp - 0x420]
push ecx
call fcn.00407700
add esp, 8
mov dword [ebp - 0x94c], 0
lea edx, [ebp - 0x94c]
push edx
push 8
lea eax, [ebp - 0x944]
push eax
push 0
push 0xa
push 4
push 0xffffffffffffffee
push 4
push 1
mov ecx, dword [ebp + 0x14]
push ecx
call sub.ODBC32.dll_SQLBindParameter
movsx edx, ax
mov dword [ebp - 0x948], edx
cmp dword [ebp - 0x948], 0
je 0x403d37
cmp dword [ebp - 0x948], 1
je 0x403d37
mov eax, dword [ebp - 0x948]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00405cd0
add esp, 8
push 0
push 0
push 0
push 0xe0000105
call dword [sym.imp.KERNEL32.dll_RaiseException]
lea edx, [ebp - 0x938]
push edx
call fcn.00407800
add esp, 4
mov dword [ebp - 0x830], eax
lea eax, [ebp - 0x830]
push eax
mov ecx, dword [ebp - 0x830]
push ecx
lea edx, [ebp - 0x938]
push edx
push 0
mov eax, dword [ebp - 0x830]
push eax
push 0xfffffffffffffff7
push 1
push 1
push 2
mov ecx, dword [ebp + 0x14]
push ecx
call sub.ODBC32.dll_SQLBindParameter
movsx edx, ax
mov dword [ebp - 0x948], edx
cmp dword [ebp - 0x948], 0
je 0x403dba
cmp dword [ebp - 0x948], 1
je 0x403dba
mov eax, dword [ebp - 0x948]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.00405cd0
add esp, 8
push 0
push 0
push 0
push 0xe0000105
call dword [sym.imp.KERNEL32.dll_RaiseException]
push 0xfffffffffffffffd
lea edx, [ebp - 0x420]
push edx
mov eax, dword [ebp + 0x14]
push eax
call sub.ODBC32.dll_SQLExecDirect
movsx ecx, ax
mov dword [ebp - 0x948], ecx
cmp dword [ebp - 0x948], 0
je 0x403e0b
cmp dword [ebp - 0x948], 1
je 0x403e0b
mov edx, dword [ebp - 0x948]
push edx
mov eax, dword [ebp + 0x14]
push eax
call fcn.00405cd0
add esp, 8
push 0
push 0
push 0
push 0xe0000105
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov dword [ebp - 4], 0xffffffff
jmp 0x403e2e
cmp dword [ebp - 0x82c], 0
jne 0x403e8d
push 0
lea ecx, [ebp - 0x940]
push ecx
push 0x4162a8
call fcn.00407800
add esp, 4
push eax
push 0x4162c0
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [ebp - 0x940]
push ecx
push 2
push 0x4162d8
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push str._Unable_to_get_last_100_queries__n
push 0x41b080
call fcn.00407930
add esp, 8
mov eax, dword [ebp - 0x82c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x1c]
call fcn.00407d96
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret